Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry
- From
Max Kirillov <max@max630.net>
- Date
- Jun 16, 2018, 08:22 UTC
- Message-ID
- <CAF7_NFR8dKZtbRr+p_HGECdZhyqSWAsMuZ2JthXefGyFL+57zA@mail.gmail.com>
- In-Reply-To
- <xmqqh8m3zurz.fsf@gitster-ct.c.googlers.com>
> I do not know offhand if "reset --merge" should force succeeding in
such a case, but I agree that it is criminal to stop "reset --hard" with "not uptodate", as the whole point of "hard reset" is to get rid of the 'not up-to-date' modification.
I originally had a fix just for "reset --hard". It was in verify_uptodate_1(), to move check for "->reset" earlier. But then I found that "merge --abort" does not use "reset --hard", but rather --merge, so I fixed that. Because --merge should work also, shouldn't it?
Actually, I think that fix in verify_uptodate_1() was right, I just did not find what it affects, after the other fix