Re: [PATCH 14/18] revert: Introduce --reset to remove sequencer state
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 27, 2011, 14:28 UTC
- Message-ID
- <20110727142815.GC24785@elie>
- In-Reply-To
- <CALkWK0k7SvjJ8duNscnwjn4JOjSDqfHN1qH9rnoz5w8TjHgKgA@mail.gmail.com>
Ramkumar Ramachandra wrote:
> Jonathan Nieder writes: >> Ramkumar Ramachandra wrote:
Show 11 quoted lines
>>> + if (opts->subcommand == REPLAY_RESET) {
>>> + remove_sequencer_state(1);
>>> + return 0;
>>> + } else {
>>> + /* Start a new cherry-pick/ revert sequence */
>>
>> Can un-indent by dropping the "else":
>
> Actually this was intentional; if we un-indent this now, there'll be a
> diff indenting it when '--reset' and '--continue' are introduced which
> turns out to be especially ugly :)Why couldn't it look like this at the end, for example? (As always, this is just an example; I am not saying "please make it look like this".)
if (opts->subcommand == REPLAY_RESET) {
remove_sequencer_state(1);
return 0;
} if (opts->subcommand == REPLAY_CONTINUE) {
... prepare todo list for continue ...
} else {
... prepare todo list for a new cherry-pick ...
}
pick the chosen commitsShow 5 quoted lines
>> This is not about this patch, but ideally the cleanup would come at >> the beginning of the next test, so if one test fails it does not take >> down all the tests that come after it. > > Good point. Fixed all, thanks.
Thanks for looking into it.