Re: [PATCH 14/18] revert: Introduce --reset to remove sequencer state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Jonathan Nieder writes:
> Ramkumar Ramachandra wrote:
>> --- /dev/null
>> +++ b/Documentation/sequencer.txt
>> @@ -0,0 +1,4 @@
>> +--reset::
>> +     Forget about the current operation in progress.  Can be used
>> +     to clear the sequencer state after a failed cherry-pick or
>> +     revert.
>
> Probably worth mentioning that the index, HEAD, and worktree are left
> alone.

Fixed, thanks.

>> +++ b/builtin/revert.c
> [...]
>> @@ -886,17 +906,22 @@ static int pick_revisions(struct replay_opts *opts)
> [...]
>> +     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 :)

>> --- a/t/t3510-cherry-pick-sequence.sh
>> +++ b/t/t3510-cherry-pick-sequence.sh
>> @@ -37,7 +37,7 @@ test_expect_success 'cherry-pick persists data on failure' '
>>       test_path_is_file .git/sequencer/head &&
>>       test_path_is_file .git/sequencer/todo &&
>>       test_path_is_file .git/sequencer/opts &&
>> -     rm -rf .git/sequencer
>> +     git cherry-pick --reset
>>  '
>
> 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.

-- Ram
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]