Skip to content

Commit f3f8af0

Browse files
amravgitster
authored andcommitted
merge: use help_unknown_ref()
Use help.c:help_unknown_ref() instead of die() to provide a friendlier error message before exiting, when one of the refs specified in a merge is unknown. Signed-off-by: Vikrant Varma <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e561810 commit f3f8af0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/merge.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,8 @@ static struct commit_list *collect_parents(struct commit *head_commit,
10541054
for (i = 0; i < argc; i++) {
10551055
struct commit *commit = get_merge_parent(argv[i]);
10561056
if (!commit)
1057-
die(_("%s - not something we can merge"), argv[i]);
1057+
help_unknown_ref(argv[i], "merge",
1058+
"not something we can merge");
10581059
remotes = &commit_list_insert(commit, remotes)->next;
10591060
}
10601061
*remotes = NULL;

0 commit comments

Comments
 (0)