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 <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Jan 7, 2015 at 19:23 UTC
b6a4788586d8d1e88eee298c4a9a571416e50e3a
1 file changed
+1
-3
builtin/receive-pack.c
+1
-3
@@ -1061,9 +1061,7 @@ static void warn_if_skipped_connectivity_check(struct command *commands,
1061
}
1062
}
1063
if (!checked_connectivity)
1064
- error("BUG: run 'git fsck' for safety.\n"
1065
- "If there are errors, try to remove "
1066
- "the reported refs above");
1064
+ die("BUG: connectivity check skipped???");
1065
}
1066
1067
static void execute_commands(struct command *commands,