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

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 24, 2007, 11:20 UTC
Message-ID
<Pine.LNX.4.64.0707241218270.14781@racer.site>
In-Reply-To
<46A5DCBC.E585A69D@eudaptics.com>
Hi,
On Tue, 24 Jul 2007, Johannes Sixt wrote:
Show 15 quoted lines
> 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

Previous: Johannes SixtNext: Johannes Schindelin
Message 7 of 20 in “filter-branch: Big syntax change; support rewriting multiple refs”
  1. filter-branch: Big syntax change; support rewriting multiple refsJohannes Schindelin, Jul 23, 2007
  2. Junio C HamanoJul 24, 2007
  3. Johannes SchindelinJul 24, 2007
  4. Johannes SixtJul 24, 2007
  5. filter-branch: when dwim'ing a ref, only allow heads and tagsJohannes Schindelin, Jul 24, 2007
  6. Johannes SixtJul 24, 2007
  7. Johannes SchindelinJul 24, 2007
  8. filter-branch: when dwim'ing a ref, only allow heads and tagsJohannes Schindelin, Jul 24, 2007
  9. filter-branch: rewrite only refs which were not excluded by the optionsJohannes Schindelin, Jul 24, 2007
  10. Johannes SixtJul 24, 2007
  11. Johannes SchindelinJul 24, 2007
  12. Johannes SixtJul 24, 2007
  13. Johannes SchindelinJul 24, 2007
  14. Johannes SixtJul 24, 2007
  15. Johannes SchindelinJul 24, 2007
  16. Johannes SixtJul 24, 2007
  17. Johannes SchindelinJul 24, 2007
  18. filter-branch: rewrite only unexcluded refsJohannes Schindelin, Jul 24, 2007
  19. Johannes SixtJul 24, 2007
  20. Johannes SchindelinJul 24, 2007

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.