Re: [PATCH v4 00/26] Add new command 'switch'

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

 



Duy Nguyen <pclouds@xxxxxxxxx> writes:

> I did forget one thing:
>
> - 'git switch' refuses to switch in the middle of
> rebase/bisect/cherry-pick/... session. Add --ignore-in-progress to
> override this

I think that is a sensible thing to do.  Once I did not realize that
a "checkout" from a failed cherry-pick with the state files left in
the .git/ directory took me to a strange state, causing some later
operation to act on these state files as if a cherry-pick were in
progress (and somehow the shell prompt support did not report it,
perhaps because the copy I use was out of sync with the binary).

Making sure that during a stateful operation the working tree won't
get switched to a different branch is probably a good idea.

I often find "git reset --hard <some other starting point>" after a
failed "git checkout -b new <starting point> && git am -s3c", so I'd
be opposed to a change to refuse a "reset --hard" during the middle
of such a stateful operation, but I do not think of a reason why I
would want to "switch" in the middle.

> Now that I mention this, --ignore-in-progress should probably be part
> of --force too. Hmm...

Probably.  You may want to decline other parts of what --force
allows but when you say --force, --ignore-in-progress should be
implied.




[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