From: Bert Wesarg Date: Fri, 12 Mar 2010 07:40:07 GMT Subject: Re: [PATCH v2] git checkout -b: unparent the new branch with -o Message-ID: <36ca99e91003112340u6256ef4dwb40e308c9a5e3a46@mail.gmail.com> In-Reply-To: <7vr5nqrpyg.fsf@alter.siamese.dyndns.org> On Fri, Mar 12, 2010 at 07:53, Junio C Hamano wrote: > Erick Mattos 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@vger.kernel.org > More majordomo info at  http://vger.kernel.org/majordomo-info.html >