mirror of
https://github.com/git/git
synced 2024-10-29 17:08:46 +00:00
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>
This commit is contained in:
parent
a6a8431968
commit
b6a4788586
1 changed files with 1 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue