prefer mkpathdup to mkpath in assignments
commite3cf230324f740653d4fb4a3087c2daf9da62029
authorJeff King <peff@peff.net>
Mon, 10 Aug 2015 09:35:38 +0000 (10 05:35 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Aug 2015 22:37:12 +0000 (10 15:37 -0700)
treea463f382e6d547ae669948bf4a40175be3063113
parentfcd12db6af118b70b5c15cf5fdd6800eeecc370a
prefer mkpathdup to mkpath in assignments

As with the previous commit to git_path, assigning the
result of mkpath is suspicious, since it is not clear
whether we will still depend on the value after it may have
been overwritten by subsequent calls. This patch converts
low-hanging fruit to use mkpathdup instead of mkpath (with
the downside that we must remember to free the result).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/repack.c
refs.c