summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-11 22:16:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-12 02:48:59 (GMT)
commitd64bb065c0279e523db5270bbcf0ddda74fa9c8f (patch)
treeb67050d2ee715cd630bd1e67dd6e54af06f38779 /submodule.c
parente5b07c539deefb13a4830fe9303e3d7590713f26 (diff)
downloadgit-d64bb065c0279e523db5270bbcf0ddda74fa9c8f.zip
git-d64bb065c0279e523db5270bbcf0ddda74fa9c8f.tar.gz
git-d64bb065c0279e523db5270bbcf0ddda74fa9c8f.tar.bz2
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 'submodule.c')
0 files changed, 0 insertions, 0 deletions