From: Vikrant Varma <vikrant.varma94@gmail.com>
To: git@vger.kernel.org
Cc: Vikrant Varma <vikrant.varma94@gmail.com>
Subject: [PATCH 2/2] merge: use help_unknown_ref instead of die
Date: Wed, 1 May 2013 16:52:07 +0530 [thread overview]
Message-ID: <1367407327-5216-3-git-send-email-vikrant.varma94@gmail.com> (raw)
In-Reply-To: <1367407327-5216-1-git-send-email-vikrant.varma94@gmail.com>
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 <vikrant.varma94@gmail.com>
---
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
next prev parent reply other threads:[~2013-05-01 11:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 11:22 [PATCH 0/2] Better advice on merge Vikrant Varma
2013-05-01 11:22 ` [PATCH 1/2] help: add help_unknown_ref Vikrant Varma
2013-05-01 12:23 ` Ramkumar Ramachandra
2013-05-01 14:06 ` Matthieu Moy
2013-05-01 19:55 ` Vikrant Varma
2013-05-01 20:23 ` Johannes Sixt
2013-05-01 20:32 ` Ramkumar Ramachandra
2013-05-01 21:45 ` Vikrant Varma
2013-05-01 22:12 ` Junio C Hamano
2013-05-01 18:35 ` Junio C Hamano
2013-05-01 22:26 ` Vikrant Varma
2013-05-01 23:07 ` Junio C Hamano
2013-05-01 11:22 ` Vikrant Varma [this message]
2013-05-01 18:36 ` [PATCH 2/2] merge: use help_unknown_ref instead of die Junio C Hamano
2013-05-01 18:27 ` [PATCH 0/2] Better advice on merge Jonathan Nieder
2013-05-01 23:06 ` Vikrant Varma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367407327-5216-3-git-send-email-vikrant.varma94@gmail.com \
--to=vikrant.varma94@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).