Re: Bug: git checkout @{u} breaks git branch if the upstream isn't a local branch

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

 



Leszek Swirski <leszeks@xxxxxxxxxx> writes:

> I assume that either the reflog entry should be amended to print
> something more informative (moving from master to origin/master, or at
> least master@{u}, or the SHA...), or the reflog search in
> wt_status_get_detached_from should do something cleverer with relative
> refs.

Nicely analyzed. A record "moving to @{u}" in the reflog may not
leave sufficient information for a later operation to tell what
branch was refered to with the @{u} reference back when "checkout"
was run.  I suspect that checking out @{4}, @{1.day.ago}, etc. may
share the same issue.

"git checkout @{-1}" aka "git checkout -" may not have any problem
after such a checkout, as it only uses "moving from" side of the
reflog entry.




[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