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

From: David Kågedal <[email-masked]>
Date: Tue, 27 Apr 2010 08:35:51 +0200

Bert Wesarg <[email-masked]> writes:

> On Fri, Mar 12, 2010 at 07:53, Junio C Hamano <[email-masked]> wrote:
>> Erick Mattos <[email-masked]> 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

Aha! That's a command I've been looking for a number of times. Thanks a
lot for the tip.

-- 
David Kågedal