Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/show-branch.c')
-rw-r--r--builtin/show-branch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 408ce70307..092b59b0b3 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -743,6 +743,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
fake_av[1] = NULL;
av = fake_av;
ac = 1;
+ if (!*av)
+ die("no branches given, and HEAD is not valid");
}
if (ac != 1)
die("--reflog option needs one branch name");