rebase-i: clarify "is this commit relevant?" test
[gitweb.git] / git-rebase--interactive.sh
index b938a6d4aa86b5f1e75312188c71cc4b0cdaab23..773ccd4746e2fcbcfd79d20921916231eba65122 100644 (file)
@@ -1237,7 +1237,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,