diff options
author | 2019-01-11 17:16:55 -0500 | |
---|---|---|
committer | 2019-01-11 18:48:59 -0800 | |
commit | d64bb065c0279e523db5270bbcf0ddda74fa9c8f (patch) | |
tree | b67050d2ee715cd630bd1e67dd6e54af06f38779 /pack-bitmap.c | |
parent | init: make a copy of $GIT_DIR string (diff) | |
download | tgif-d64bb065c0279e523db5270bbcf0ddda74fa9c8f.tar.xz |
merge-recursive: copy $GITHEAD strings
If $GITHEAD_1234abcd is set in the environment, we use its value as a
"better branch name" in generating conflict markers. However, we pick
these better names early in the process, and the return value from
getenv() is not guaranteed to stay valid.
Let's make a copy of the returned string. And to make memory management
easier, let's just always return an allocated string from
better_branch_name(), so we know that it must always be freed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.c')
0 files changed, 0 insertions, 0 deletions