Re: [PATCHv11 02/11] receive-pack.c: die instead of error in case of possible future bug
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jan 6, 2015, 19:46 UTC
- Message-ID
- <20150106194621.GS29365@google.com>
- In-Reply-To
- <1420573247-10250-1-git-send-email-sbeller@google.com>
Stefan Beller wrote:
Show 9 quoted lines
> +++ b/builtin/receive-pack.c
> @@ -1061,9 +1061,8 @@ 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: run 'git fsck' for safety.\n"This advice is still inaccurate.
If the idea is that the user should ensure the connectivity check is run, why don't we run the check ourselves here?
If the idea is instead that something unexpected has happened and we don't have enough information to go further, why do we ask the user to run 'git fsck'?
Hope that helps, Jonathan
> + "BUG: connectivity check skipped???");