diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-16 13:16:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-16 13:16:54 -0700 |
commit | 2df13639e77999efecbe682ae5e72cbfb14b3dcc (patch) | |
tree | 6c1066b80be0275c226525e1aed75cbd7804417a /git-rebase--interactive.sh | |
parent | 9e689802e393b614ab9343dba2cee3828950f3ec (diff) | |
parent | 214123c6457d9706716dbdd608d03262e348a121 (diff) | |
download | git-2df13639e77999efecbe682ae5e72cbfb14b3dcc.tar.gz |
Merge branch 'jc/sane-grep'
Recent versions of GNU grep is pickier than before to decide if a
file is "binary" and refuse to give line-oriented hits when we
expect it to, unless explicitly told with "-a" option. As our
scripted Porcelains use sane_grep wrapper for line-oriented data,
even when the line may contain non-ASCII payload we took from
end-user data, use "grep -a" to implement sane_grep wrapper when
using an implementation of "grep" that takes the "-a" option.
* jc/sane-grep:
rebase-i: clarify "is this commit relevant?" test
sane_grep: pass "-a" if grep accepts it
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r-- | git-rebase--interactive.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index c0cfe88a3d..4cde685b43 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -1233,7 +1233,8 @@ then git rev-list $revisions | while read rev do - if test -f "$rewritten"/$rev && test "$(sane_grep "$rev" "$state_dir"/not-cherry-picks)" = "" + if test -f "$rewritten"/$rev && + ! sane_grep "$rev" "$state_dir"/not-cherry-picks >/dev/null then # Use -f2 because if rev-list is telling us this commit is # not worthwhile, we don't want to track its multiple heads, |