Re: [PATCH v2] git checkout -b: unparent the new branch with -o

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

 



On Fri, Mar 12, 2010 at 07:53, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Erick Mattos <erick.mattos@xxxxxxxxx> writes:
>> +     test "alpha" = "$(git branch | sed -n "/*/s/\* //p")" &&
>
> Don't read from "git branch" in scripts; use symbolic-ref on HEAD.

I think what he wants is:

        git rev-parse --abbrev-ref HEAD

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