From 66618a50f9c9f008d7aef751418f12ba9bfc6b85 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Wed, 24 Jan 2018 12:34:22 +0000 Subject: sequencer: run 'prepare-commit-msg' hook Commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) forgot to run the 'prepare-commit-msg' hook when creating the commit. Fix this by writing the commit message to a different file and running the hook. Using a different file means that if the commit is cancelled the original message file is unchanged. Also move the checks for an empty commit so the order matches 'git commit'. Reported-by: Dmitry Torokhov Helped-by: Ramsay Jones Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- builtin/commit.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'builtin') diff --git a/builtin/commit.c b/builtin/commit.c index 22d260197e..9f97ff8b98 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -66,8 +66,6 @@ N_("If you wish to skip this commit, use:\n" "Then \"git cherry-pick --continue\" will resume cherry-picking\n" "the remaining commits.\n"); -static GIT_PATH_FUNC(git_path_commit_editmsg, "COMMIT_EDITMSG") - static const char *use_message_buffer; static struct lock_file index_lock; /* real index */ static struct lock_file false_lock; /* used only for partial commits */ -- cgit v1.2.1