use git_path_* helper functions

Long ago we added functions like git_path_merge_msg() to
replace the more dangerous git_path("MERGE_MSG"). Over time
some new calls to the latter have crept it. Let's convert
them to use the safer form.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2017-04-20 17:08:54 -04:00
committed by Junio C Hamano
parent c10388c7dc
commit ca03e0670c
3 changed files with 11 additions and 11 deletions

View File

@ -821,9 +821,9 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
"If this is not correct, please remove the file\n"
" %s\n"
"and try again.\n"),
git_path(whence == FROM_MERGE
? "MERGE_HEAD"
: "CHERRY_PICK_HEAD"));
whence == FROM_MERGE ?
git_path_merge_head() :
git_path_cherry_pick_head());
}
fprintf(s->fp, "\n");