summaryrefslogtreecommitdiff
path: root/builtin/branch.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-01-28 01:18:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-30 17:00:41 (GMT)
commit43722c4d9e04b3749372b13598b32cdceb1f1252 (patch)
treed0adb7e0791b95b2ce37563ec731b41eb1526136 /builtin/branch.c
parent640d0401be5f29db8c9e914d8a19dbc9b950448d (diff)
downloadgit-43722c4d9e04b3749372b13598b32cdceb1f1252.zip
git-43722c4d9e04b3749372b13598b32cdceb1f1252.tar.gz
git-43722c4d9e04b3749372b13598b32cdceb1f1252.tar.bz2
branch: give a more helpful message on redundant arguments
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/branch.c')
-rw-r--r--builtin/branch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 50fcacc..531a21e 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -859,7 +859,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
else if (argc == 1)
branch_name = argv[0];
else
- usage_with_options(builtin_branch_usage, options);
+ die(_("cannot edit description of more than one branch"));
strbuf_addf(&branch_ref, "refs/heads/%s", branch_name);
if (!ref_exists(branch_ref.buf)) {
@@ -881,7 +881,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
else if (argc == 2)
rename_branch(argv[0], argv[1], rename > 1);
else
- usage_with_options(builtin_branch_usage, options);
+ die(_("too many branches for a rename operation"));
} else if (new_upstream) {
struct branch *branch = branch_get(argv[0]);