Signed-off-by: Felipe Contreras <felipe.contre...@gmail.com>
---
 contrib/completion/git-prompt.sh |  2 ++
 git-rebase--cherrypick.sh        | 11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 3a14665..3d10f21 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -354,6 +354,8 @@ __git_ps1 ()
                                r="|REBASE-i"
                        elif [ -f "$g/rebase-merge/cherrypick" ]; then
                                r="|REBASE"
+                               step=$(cat "$g/sequencer/rewritten" | wc -l)
+                               let step+=1
                        else
                                r="|REBASE-m"
                        fi
diff --git a/git-rebase--cherrypick.sh b/git-rebase--cherrypick.sh
index d36b0dc..6f63618 100644
--- a/git-rebase--cherrypick.sh
+++ b/git-rebase--cherrypick.sh
@@ -37,19 +37,26 @@ else
        revisions="$upstream...$orig_head"
 fi
 
+rev_args="--no-merges --right-only --topo-order --do-walk "$revisions""
+
 if test -n "$keep_empty"
 then
        extra="--allow-empty"
 else
-       extra="--skip-empty --cherry-pick"
+       extra="--skip-empty"
+       rev_args="--cherry-pick $rev_args"
 fi
 test -n "$GIT_QUIET" && extra="$extra -q"
 test -z "$force_rebase" && extra="$extra --ff"
-git cherry-pick --no-merges --right-only --topo-order --do-walk --action-name 
rebase $extra "$revisions"
+
+git rev-list $rev_args > "$state_dir"/list
+git cherry-pick --action-name rebase $extra $rev_args
 ret=$?
 
 if test 0 != $ret
 then
+       # for shell prompt
+       cat "$state_dir"/list | wc -l > "$state_dir"/end
        write_basic_state
        return $ret
 fi
-- 
1.8.3.698.g079b096

--
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