Thread (13 messages) flat view 13 messages, 5 authors, 2016-06-15
DORMANTno replies

[PATCH 2/2] merge: use help_unknown_ref instead of die

From: Vikrant Varma <hidden>
Date: 2016-06-15 22:57:06
Subsystem: the rest · Maintainer: Linus Torvalds

The previous patch added help_unknown_ref to print a more helpful error 
message when trying to merge a branch that doesn't exist, by printing a 
list of remote branches the user might have meant. Use it.

Signed-off-by: Vikrant Varma <redacted>
---
 builtin/merge.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index 3e2daa3..0f1f39b 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1053,8 +1053,8 @@ static struct commit_list *collect_parents(struct commit *head_commit,
 		remotes = &commit_list_insert(head_commit, remotes)->next;
 	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]);
+		if (!commit) 
+		        help_unknown_ref(argv[i]);		        
 		remotes = &commit_list_insert(commit, remotes)->next;
 	}
 	*remotes = NULL;
-- 
1.8.3-rc0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help