Skip to content

Commit 662a4c8

Browse files
sivaraamgitster
authored andcommitted
builtin/branch: remove redundant check for HEAD
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a625b09 commit 662a4c8

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

builtin/branch.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -793,9 +793,6 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
793793
} else if (argc > 0 && argc <= 2) {
794794
struct branch *branch = branch_get(argv[0]);
795795

796-
if (!strcmp(argv[0], "HEAD"))
797-
die(_("it does not make sense to create 'HEAD' manually"));
798-
799796
if (!branch)
800797
die(_("no such branch '%s'"), argv[0]);
801798

0 commit comments

Comments
 (0)