Re: [GSoC][PATCH v5 4/5] cherry-pick/revert: add --skip option
- From
Rohit Ashiwal <rohit.ashiwal265@gmail.com>
- Date
- Jun 21, 2019, 07:47 UTC
- Message-ID
- <20190621074704.6870-1-rohit.ashiwal265@gmail.com>
- In-Reply-To
- <b6cf26b0-51b7-0c63-fb1c-4da1eb3666cb@gmail.com>
Hi Phillip
On 2019-06-20 11:42 UTC Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 28 quoted lines
> > Hi Rohit > > On 20/06/2019 11:34, Rohit Ashiwal wrote: >> Hi Phillip >> >> On 2019-06-20 10:02 UTC Phillip Wood <phillip.wood123@gmail.com> wrote: >>> >>>> +test_expect_success 'allow skipping stopped cherry-pick because of untracked file modifications' ' >>>> + pristine_detach initial && >>>> + git rm --cached unrelated && >>>> + git commit -m "untrack unrelated" && >>>> + test_must_fail git cherry-pick initial base && >>>> + test_path_is_missing .git/CHERRY_PICK_HEAD && >>>> + git cherry-pick --skip >>> >>> If you change this to --continue rather than --skip the test also >>> passes! I think we could fix this by checking if HEAD has changed if >>> CHERRY_PICK_HEAD/REVERT_HEAD is missing and not dropping the last >>> command in the todo list in that case when we continue. >> >> I don't think I fully understood this. At this point --skip is essentially >> --continue. How is checking unmoved HEAD and unchanged todo uniquely related >> to --skip flag (or for that matter any _flag_)? > > My point is that --continue should reschedule the failed pick and try to > pick it again - it should not silently skip a failed pick and --skip > should skip it.
So, this is a flaw in the --continue, I guess? Fixing that is beyond the scope of this patch. May be we can launch another series in which we fix this and decouple skip and continue?
Thanks Rohit