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 <kaartic.sivaraam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kaartic Sivaraam committed
Nov 14, 2017 at 17:12 UTC
662a4c8a097248a3c08a671866ecf37743f3ca4d
1 file changed
-3
builtin/branch.c
-3
@@ -793,9 +793,6 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
793
} else if (argc > 0 && argc <= 2) {
794
struct branch *branch = branch_get(argv[0]);
795
796
- if (!strcmp(argv[0], "HEAD"))
797
- die(_("it does not make sense to create 'HEAD' manually"));
798
-
796
if (!branch)
797
die(_("no such branch '%s'"), argv[0]);
798