]> git.ipfire.org Git - thirdparty/git.git/commitdiff
receive-pack.c: die instead of error in case of possible future bug
authorStefan Beller <sbeller@google.com>
Thu, 8 Jan 2015 03:23:16 +0000 (19:23 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2015 03:56:42 +0000 (19:56 -0800)
Discussion on the previous patch revealed we rather want to err on the
safe side. To do so we need to stop receive-pack in case of the possible
future bug when connectivity is not checked on a shallow push.

Also while touching that code we considered that removing the reported
refs may be harmful in some situations. Sound the message more like a
"This Cannot Happen, Please Investigate!" instead of giving advice to
remove refs.

Suggested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c

index 2ebaf6695f73ee6a4bde4f7805d41c8673d601d3..3bdb1586d6baf724eec198c98aaa95a6b4bc4dba 100644 (file)
@@ -1061,9 +1061,7 @@ static void warn_if_skipped_connectivity_check(struct command *commands,
                }
        }
        if (!checked_connectivity)
-               error("BUG: run 'git fsck' for safety.\n"
-                     "If there are errors, try to remove "
-                     "the reported refs above");
+               die("BUG: connectivity check skipped???");
 }
 
 static void execute_commands(struct command *commands,