summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-06-24 20:58:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-25 17:33:27 (GMT)
commitcb6c38d5cce7d8d48a57346b332a68cea1489df1 (patch)
treeef4436eafe8397d1b922ddb3b4d723f76ea5df38 /builtin/apply.c
parent45bc131dd3e1eb6edd903957cf9d42f37ad02181 (diff)
downloadgit-cb6c38d5cce7d8d48a57346b332a68cea1489df1.zip
git-cb6c38d5cce7d8d48a57346b332a68cea1489df1.tar.gz
git-cb6c38d5cce7d8d48a57346b332a68cea1489df1.tar.bz2
setup_git_env(): introduce git_path_from_env() helper
"Check the value of an environment and fall back to a known path inside $GIT_DIR" is repeated a few times to determine the location of the data store, the index and the graft file, but the return value of getenv is not guaranteed to survive across further invocations of setenv or even getenv. Make sure to xstrdup() the value we receive from getenv(3), and encapsulate the pattern into a helper function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/apply.c')
0 files changed, 0 insertions, 0 deletions