From: Jari Aalto <jari.aalto@cante.net>
To: git@vger.kernel.org
Subject: [PATCH] Improve error message: not a valid branch name
Date: Sun, 26 Aug 2007 18:28:18 +0300 [thread overview]
Message-ID: <y7fyfh7x.fsf@cante.net> (raw)
(create_branch): Extend die message from 'is not a valid branch name'
to '...(see git-check-ref-format)'.
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
builtin-branch.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/builtin-branch.c b/builtin-branch.c
index 7408285..1006a85 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -431,7 +431,8 @@ static void create_branch(const char *name, const char *start_name,
snprintf(ref, sizeof ref, "refs/heads/%s", name);
if (check_ref_format(ref))
- die("'%s' is not a valid branch name.", name);
+ die("'%s' is not a valid branch name "
+ "(see git-check-ref-format)", name);
if (resolve_ref(ref, sha1, 1, NULL)) {
if (!force)
@@ -502,13 +503,15 @@ static void rename_branch(const char *oldname, const char *newname, int force)
die("Old branchname too long");
if (check_ref_format(oldref))
- die("Invalid branch name: %s", oldref);
+ die("Invalid branch name: %s "
+ "(see git-check-ref-format)", oldref);
if (snprintf(newref, sizeof(newref), "refs/heads/%s", newname) > sizeof(newref))
die("New branchname too long");
if (check_ref_format(newref))
- die("Invalid branch name: %s", newref);
+ die("Invalid branch name: %s "
+ "(see git-check-ref-format)", newref);
if (resolve_ref(newref, sha1, 1, NULL) && !force)
die("A branch named '%s' already exists.", newname);
--
1.5.3.rc5
next reply other threads:[~2007-08-26 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-26 15:28 Jari Aalto [this message]
2007-08-26 21:26 ` [PATCH] Improve error message: not a valid branch name Junio C Hamano
2007-08-26 22:09 ` Jari Aalto
2007-08-26 22:25 ` J. Bruce Fields
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=y7fyfh7x.fsf@cante.net \
--to=jari.aalto@cante.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.