git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-bisect.sh: don't accidentally override existing branch "bisect"

From
Christian Couder <chriscool@tuxfamily.org>
Date
May 1, 2008, 12:27 UTC
Message-ID
<200805011427.22901.chriscool@tuxfamily.org>
In-Reply-To
<cac9e4380805010515h783dcf74h39fcc522c78885d3@mail.gmail.com>
Le jeudi 1 mai 2008, Richard Quirk a écrit :
Show 16 quoted lines
> On Wed, Apr 30, 2008 at 11:30 PM, Christian Couder
>
> <chriscool@tuxfamily.org> wrote:
> >  Minor nitpick: you may use:
> >
> >  git show-ref -q {new-,}bisect
> >
> >  instead of:
> >
> >
> >  git show-ref bisect > /dev/null ||
> >         git show-ref new-bisect > /dev/null
>
> Careful with that - it's a bashism and would fail if /bin/sh is dash.
> ie it would say that a branch called literally "{new-,}bisect" does
> not exist, even if new-bisect and bisect do.

You are right. Thanks. So what about a plain:

git show-ref -q bisect new-bisect

Regards, Christian.

Previous: Richard QuirkNext: Gerrit Pape
Message 4 of 11 in “git-bisect.sh: don't accidentally override existing branch "bisect"”
  1. git-bisect.sh: don't accidentally override existing branch "bisect"Gerrit Pape, Apr 30, 2008
  2. Christian CouderApr 30, 2008
  3. Richard QuirkMay 1, 2008
  4. Christian CouderMay 1, 2008
  5. git-bisect.sh: don't accidentally override existing branch "bisect"Gerrit Pape, May 2, 2008
  6. Christian CouderMay 3, 2008
  7. git-bisect.sh: don't accidentally override existing branch "bisect"Gerrit Pape, May 5, 2008
  8. Christian CouderMay 6, 2008
  9. Karl HasselströmMay 2, 2008
  10. Junio C HamanoMay 2, 2008
  11. Johannes SchindelinMay 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.