git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Erick Mattos <erick.mattos@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v2] git checkout -b: unparent the new branch with -o
Date: Fri, 12 Mar 2010 08:40:07 +0100	[thread overview]
Message-ID: <36ca99e91003112340u6256ef4dwb40e308c9a5e3a46@mail.gmail.com> (raw)
In-Reply-To: <7vr5nqrpyg.fsf@alter.siamese.dyndns.org>

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

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
>

  reply	other threads:[~2010-03-12  7:40 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 [this message]
2010-04-27  6:35     ` David Kågedal
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=36ca99e91003112340u6256ef4dwb40e308c9a5e3a46@mail.gmail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=erick.mattos@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).