Subject: Re: [PATCHv11 02/11] receive-pack.c: die instead of error in case of possible future bug

From: Jonathan Nieder <[email-masked]>
Date: Tue, 6 Jan 2015 11:46:22 -0800

Stefan Beller wrote:

> +++ 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???");