From ca03e0670c3ba71400b0f5ed199b045481efdb1e Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 20 Apr 2017 17:08:54 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/commit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builtin/commit.c') diff --git a/builtin/commit.c b/builtin/commit.c index 2de5f6cc64..bbaa4a0da5 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -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"); -- cgit v1.2.1