builtin/branch: remove redundant check for HEAD
authorKaartic Sivaraam <kaartic.sivaraam@gmail.com>
Tue, 14 Nov 2017 11:42:59 +0000 (17:12 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Nov 2017 02:43:29 +0000 (11:43 +0900)
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>
builtin/branch.c
index e5bbfb4a171fcacd92ca9614dbcd0f97627d8c77..945790b60b355b06cebebbf76d29fa428d414d0e 100644 (file)
@@ -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]);