Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
rebase-i: clarify "is this commit relevant?" test
While I was checking all the call sites of sane_grep and sane_egrep,
I noticed this one is somewhat strangely written.  The lines in the
file sane_grep works on all begin with 40-hex object name, so there
is no real risk of confusing "test $(...) = ''" by finding something
that begins with a dash, but using the status from sane_grep makes
it a lot clearer what is going on.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Mar 10, 2016
1 parent 71b4010 commit 214123c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-rebase--interactive.sh
Expand Up @@ -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,
Expand Down

0 comments on commit 214123c

Please sign in to comment.