Re: [PATCH] filter-branch: when dwim'ing a ref, only allow heads andtags

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

 



Hi,

On Tue, 24 Jul 2007, Johannes Sixt wrote:

> Johannes Schindelin wrote:
> > -                       grep /"$ref")"
> > +                       grep "refs/\(tags\|heads\)/$ref$")"
> 
> Thanks, but I don't think that this is a portable grep pattern:
> 
> $ echo "abc" | grep '\(a\|x\)'
> $ echo "abc" | egrep '(a|x)'
> abc
> 
> But then, this is on some AIX 4.3. How about:
> 
>    fgrep -e "refs/heads/$ref" -e "refs/tags/$ref"
> or
>    grep -e "^refs/heads/$ref" -e "^refs/tags/$ref"

Ah yes, I remember that Junio said some time ago that "\|" is not 
portable.

But to be portable, let's stay with grep, and not use some fancy stuff 
like egrep or fgrep.

Ciao,
Dscho

-
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