summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorChris Webb <chris@arachsys.com>2012-08-02 10:38:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-08-06 16:59:53 (GMT)
commit4bee958479bed1d3a8f20a75f33422ee49939dbf (patch)
treee24a4ea9b183c3eb9c5bea21caf0c6d5ff0bf4ee /sequencer.c
parent3fe4498197ced84886b4adaddf18f1109b477f8e (diff)
downloadgit-4bee958479bed1d3a8f20a75f33422ee49939dbf.zip
git-4bee958479bed1d3a8f20a75f33422ee49939dbf.tar.gz
git-4bee958479bed1d3a8f20a75f33422ee49939dbf.tar.bz2
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 'sequencer.c')
-rw-r--r--sequencer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index bf078f2..1ea5293 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -311,6 +311,9 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
if (allow_empty)
argv_array_push(&array, "--allow-empty");
+ if (opts->allow_empty_message)
+ argv_array_push(&array, "--allow-empty-message");
+
rc = run_command_v_opt(array.argv, RUN_GIT_CMD);
argv_array_clear(&array);
return rc;