Thread (18 messages) flat view 18 messages, 2 authors, 2016-06-15

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

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:43:23

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"

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help