Skip to content

Commit

Permalink
merge: use help_unknown_ref()
Browse files Browse the repository at this point in the history
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 <vikrant.varma94@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Vikrant Varma authored and Junio C Hamano committed May 8, 2013
1 parent e561810 commit f3f8af0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,8 @@ static struct commit_list *collect_parents(struct commit *head_commit,
for (i = 0; i < argc; i++) {
struct commit *commit = get_merge_parent(argv[i]);
if (!commit)
die(_("%s - not something we can merge"), argv[i]);
help_unknown_ref(argv[i], "merge",
"not something we can merge");
remotes = &commit_list_insert(commit, remotes)->next;
}
*remotes = NULL;
Expand Down

0 comments on commit f3f8af0

Please sign in to comment.