Re: [PATCH v2 1/1] sequencer: fix empty commit check when amending

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

 



Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

>>> +test_expect_success 'fixup on orphan branch errors out' '
>>> +
>>> +       test_when_finished "git switch master" &&
>>> +       write_script switch-branch.sh <<-\EOF &&
>>> +       git symbolic-ref HEAD refs/heads/does-not-exist &&
>>> +       git rm -rf .
>>
>> That "git rm -rf ." scares me, though.
>
> I know I'm not too keen on it my self but we need to empty the
> worktree and index if we're going to switch to an unborn branch

"checkout --orphan" takes you to an unborn branch.  If you need to
also be with no contents in the index and nothing in the working
tree, then "git rm -r ." may be needed, but applying a fixup without
the target content does sound like asking for a conflict already.




[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]

  Powered by Linux