Skip to content

Commit

Permalink
builtin/branch: remove redundant check for HEAD
Browse files Browse the repository at this point in the history
The lower level code has been made to handle this case for the
sake of consistency. This has made this check redundant.

So, remove the redundant check.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
sivaraam authored and gitster committed Nov 15, 2017
1 parent a625b09 commit 662a4c8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions builtin/branch.c
Expand Up @@ -793,9 +793,6 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
} else if (argc > 0 && argc <= 2) {
struct branch *branch = branch_get(argv[0]);

if (!strcmp(argv[0], "HEAD"))
die(_("it does not make sense to create 'HEAD' manually"));

if (!branch)
die(_("no such branch '%s'"), argv[0]);

Expand Down

0 comments on commit 662a4c8

Please sign in to comment.