public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator•liu.se>
To: git@vger•kernel.org
Subject: Re: [PATCH v2] git checkout -b: unparent the new branch with -o
Date: Tue, 27 Apr 2010 08:35:51 +0200	[thread overview]
Message-ID: <874oixe720.fsf@krank.kagedal.org> (raw)
In-Reply-To: 36ca99e91003112340u6256ef4dwb40e308c9a5e3a46@mail.gmail.com

Bert Wesarg <bert.wesarg@googlemail•com> writes:

> On Fri, Mar 12, 2010 at 07:53, Junio C Hamano <gitster@pobox•com> wrote:
>> Erick Mattos <erick.mattos@gmail•com> 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

  reply	other threads:[~2010-04-27  6:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 22:28 [PATCH v2] git checkout -b: unparent the new branch with -o Erick Mattos
2010-03-12  6:53 ` Junio C Hamano
2010-03-12  7:40   ` Bert Wesarg
2010-04-27  6:35     ` David Kågedal [this message]
2010-03-12 16:45   ` Erick Mattos
2010-03-13  7:53     ` Junio C Hamano
2010-03-13  9:10       ` Junio C Hamano
2010-03-14 21:57         ` Erick Mattos
2010-03-15  2:56           ` Junio C Hamano
2010-03-16 18:18             ` Erick Mattos
2010-03-13  9:33       ` Jakub Narebski
2010-03-13  9:42         ` Junio C Hamano
2010-03-14 21:57         ` Erick Mattos
2010-03-15  2:06           ` Junio C Hamano
2010-03-16 18:17             ` Erick Mattos
2010-03-14 20:46       ` Erick Mattos
2010-03-14 21:58         ` Erick Mattos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874oixe720.fsf@krank.kagedal.org \
    --to=davidk@lysator$(echo .)liu.se \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox