Subject: Re: [PATCH 17/18] revert: Don't implictly stomp pending sequencer operation

From: Jonathan Nieder <[email-masked]>
Date: Wed, 27 Jul 2011 07:19:47 +0200

Ramkumar Ramachandra wrote:

[...]
> +		if (create_seq_dir() < 0) {
> +			advise(_("A cherry-pick or revert is in progress."));
> +			advise(_("Use --reset to forget about it"));
> +			return -1;
> +		}

The usual formula is:

	error(... description of error ...)
	if (advice_foo_bar [i.e., if the user is not tired of the advice already]) {
		advise(... how to recover from error ...);
		advise(... more lines ...);
	}