From: Felipe Contreras Date: Fri, 30 Aug 2013 05:56:13 GMT Subject: [PATCH v6 19/28] rebase: cherry-pick: automatically commit stage Message-ID: <1377842182-18724-20-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1377842182-18724-1-git-send-email-felipe.contreras@gmail.com> When there's changes in the staging area. Just like the other rebase modes. Signed-off-by: Felipe Contreras --- git-rebase--cherrypick.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git-rebase--cherrypick.sh b/git-rebase--cherrypick.sh index be17ec4..241cda7 100644 --- a/git-rebase--cherrypick.sh +++ b/git-rebase--cherrypick.sh @@ -8,6 +8,12 @@ export GIT_CHERRY_PICK_HELP case "$action" in continue) + # do we have anything to commit? + if ! git diff-index --cached --quiet HEAD -- + then + git commit --no-verify -e || + die "Could not commit staged changes." + fi git cherry-pick --continue && move_to_original_branch return -- 1.8.4-fc