aboutsummaryrefslogtreecommitdiff
path: root/builtin/branch.c
diff options
context:
space:
mode:
authorJonathon Mah <me@JonathonMah.com>2013-03-30 18:27:44 -0700
committerJunio C Hamano <gitster@pobox.com>2013-03-31 19:58:02 -0700
commitd1520c4b1a6105356c7a2def6b90239057270598 (patch)
tree04753c6f1192a4c64116f0e41962350848888268 /builtin/branch.c
parent631bc94e67383b66da190550866566f09d32f299 (diff)
downloadgit-d1520c4b1a6105356c7a2def6b90239057270598.tar.gz
git-d1520c4b1a6105356c7a2def6b90239057270598.tar.xz
branch: give better message when no names specified for rename
Signed-off-by: Jonathon Mah <me@JonathonMah.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, 3 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 00d17d25d..580107fd7 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -880,7 +880,9 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
if (edit_branch_description(branch_name))
return 1;
} else if (rename) {
- if (argc == 1)
+ if (!argc)
+ die(_("branch name required"));
+ else if (argc == 1)
rename_branch(head, argv[0], rename > 1);
else if (argc == 2)
rename_branch(argv[0], argv[1], rename > 1);