Re: [PATCH 2/2] checkout (detached): truncate list of orphaned commits at the new HEAD

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

 



On Fri, May 04, 2012 at 08:14:48PM +0200, Johannes Sixt wrote:

> When git checkout switches from a detached HEAD to any other commit, then
> all orphaned commits were listed in a warning:
> 
>   Warning: you are leaving 2 commits behind...:
> 
>     a5e5396 another fixup
>     6aa1af6 fixup foo
> 
> But if the new commit is actually one from this list (6aa1af6 in this
> example), then the list in the warning can be truncated at the new HEAD,
> because history beginning at HEAD is not "left behind". This makes it so.

Thanks, this has bugged me a few times in the past, but I've never
gotten around to investigating and fixing it.

>  builtin/checkout.c         | 13 +++++++------
>  t/t2020-checkout-detach.sh |  2 +-
>  2 files changed, 8 insertions(+), 7 deletions(-)

The patch looks right to me.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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