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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le jeudi 1 mai 2008, Richard Quirk a écrit :
> On Wed, Apr 30, 2008 at 11:30 PM, Christian Couder
>
> <chriscool@xxxxxxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux