[PATCH v5 29/36] rebase: cherry-pick: automatically commit stage
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Jun 9, 2013, 19:24 UTC
- Message-ID
- <1370805890-3453-30-git-send-email-felipe.contreras@gmail.com>
- In-Reply-To
- <1370805890-3453-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 <felipe.contreras@gmail.com> --- 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.3.698.g079b096