While building the todo file, 'rebase -p' needs to find the
cherry-picked commits in the branch that is about to be rebased. For
this, it calculates the set difference between the full set of commits
and the non-cherry-picked ones (as reported by 'git rev-list
--left-right --cherry-pick'). Now that have the 'git rev-list
--cherry-mark' option (since adbbb31 (revision.c: introduce
--cherry-mark, 2011-03-07)), we can instead use that option to get the
set of cherry-picked commits.
 git-rebase--interactive.sh | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 9715830..47beb58 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -859,17 +859,12 @@ then
                        add_pick_line $sha1
-       # Watch for commits that been dropped by --cherry-pick
+       # Now drop cherry-picked commits
        mkdir "$dropped"
-       # Save all non-cherry-picked changes
-       git rev-list $revisions --left-right --cherry-pick | \
-               sed -n "s/^>//p" > "$state_dir"/not-cherry-picks
-       # Now all commits and note which ones are missing in
-       # not-cherry-picks and hence being dropped
-       git rev-list $revisions |
+       git rev-list $revisions --cherry-mark --right-only | sed -ne "s/^=//p" |
        while read rev
-               if test -f "$rewritten"/$rev -a "$(sane_grep "$rev" 
"$state_dir"/not-cherry-picks)" = ""
+               if test -f "$rewritten"/$rev
                        # Use -f2 because if rev-list is telling us this commit 
                        # not worthwhile, we don't want to track its multiple 

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to