[PATCH] builtin-commit: run commit-msg hook with correct message file

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: <krh@...>, <Johannes.Schindelin@...>
Date: Sunday, November 18, 2007 - 4:30 pm

It should run with $GIT_DIR/COMMIT_EDITMSG, not just COMMIT_EDITMSG.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 * Other things I noticed that are still broken:

   - "git commit -v" does not give you the diff in the message
     template for your final review;

   - message_is_empty() is bogus.  It does run stripspace() but
     does not strip out the diff "git commit -v" would produce
     before doing its comparison;

 builtin-commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index 058cd32..439fcc2 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -753,7 +753,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 		rollback_index_files();
 		die("could not read commit message\n");
 	}
-	if (run_hook(index_file, "commit-msg", commit_editmsg)) {
+	if (run_hook(index_file, "commit-msg", git_path(commit_editmsg))) {
 		rollback_index_files();
 		exit(1);
 	}
-- 
1.5.3.5.1815.g9445b

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] builtin-commit: run commit-msg hook with correct mes..., Junio C Hamano, (Sun Nov 18, 4:30 pm)