mirror of
https://github.com/git/git.git
synced 2024-11-25 19:04:18 +08:00
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 <vikrant.varma94@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e56181060e
commit
f3f8af0e54
@ -1054,7 +1054,8 @@ static struct commit_list *collect_parents(struct commit *head_commit,
|
|||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
struct commit *commit = get_merge_parent(argv[i]);
|
struct commit *commit = get_merge_parent(argv[i]);
|
||||||
if (!commit)
|
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 = &commit_list_insert(commit, remotes)->next;
|
||||||
}
|
}
|
||||||
*remotes = NULL;
|
*remotes = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user