From: Vikrant Varma <vikrant.varma94@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Ramkumar Ramachandra <artagnon@gmail.com>,
Vikrant Varma <vikrant.varma94@gmail.com>
Subject: [PATCH v2 2/2] merge: use help_unknown_ref
Date: Sat, 4 May 2013 05:34:20 +0530 [thread overview]
Message-ID: <1367625860-20746-3-git-send-email-vikrant.varma94@gmail.com> (raw)
In-Reply-To: <1367625860-20746-1-git-send-email-vikrant.varma94@gmail.com>
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>
---
builtin/merge.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index 3e2daa3..2ebe732 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -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;
--
1.7.10.4
prev parent reply other threads:[~2013-05-04 0:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-04 0:04 [PATCH v2 0/2] Show suggested refs when ref unknown Vikrant Varma
2013-05-04 0:04 ` [PATCH v2 1/2] help: add help_unknown_ref Vikrant Varma
2013-05-08 22:49 ` Junio C Hamano
2013-05-09 21:04 ` Vikrant Varma
2013-05-04 0:04 ` Vikrant Varma [this message]
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=1367625860-20746-3-git-send-email-vikrant.varma94@gmail.com \
--to=vikrant.varma94@gmail.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).