path: root/builtin/receive-pack.c
diff options
authorStefan Beller <>2015-01-08 03:23:16 (GMT)
committerJunio C Hamano <>2015-01-08 03:56:42 (GMT)
commitb6a4788586d8d1e88eee298c4a9a571416e50e3a (patch)
treec97e3d66eca5c2ab7b39deb42af377cadba84f15 /builtin/receive-pack.c
parenta6a843196869659ee55238e474be29018987c4bf (diff)
receive-pack.c: die instead of error in case of possible future bug
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 <> Signed-off-by: Stefan Beller <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/receive-pack.c')
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 2ebaf66..3bdb158 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -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,