diff options
author | Chris Webb <chris@arachsys.com> | 2012-08-02 11:38:51 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-06 09:59:53 -0700 |
commit | 4bee958479bed1d3a8f20a75f33422ee49939dbf (patch) | |
tree | e24a4ea9b183c3eb9c5bea21caf0c6d5ff0bf4ee /t | |
parent | Git 1.7.11-rc1 (diff) | |
download | tgif-4bee958479bed1d3a8f20a75f33422ee49939dbf.tar.xz |
cherry-pick: add --allow-empty-message option
Scripts such as "git rebase -i" cannot currently cherry-pick commits
which have an empty commit message, as git cherry-pick calls git
commit without the --allow-empty-message option.
Add an --allow-empty-message option to git cherry-pick which is passed
through to git commit, so this behaviour can be overridden.
Signed-off-by: Chris Webb <chris@arachsys.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3505-cherry-pick-empty.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh index 5a1340cee6..a0c6e30d80 100755 --- a/t/t3505-cherry-pick-empty.sh +++ b/t/t3505-cherry-pick-empty.sh @@ -53,6 +53,11 @@ test_expect_success 'index lockfile was removed' ' ' +test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' ' + git checkout -f master && + git cherry-pick --allow-empty-message empty-branch +' + test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' ' git checkout master && echo fourth >>file2 && |