From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: krh@redhat.com, Johannes.Schindelin@gmx.de
Subject: [PATCH] builtin-commit: run commit-msg hook with correct message file
Date: Sun, 18 Nov 2007 12:30:13 -0800 [thread overview]
Message-ID: <7v1wanuwiy.fsf_-_@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vejenuy4i.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Sun, 18 Nov 2007 11:55:41 -0800")
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
next prev parent reply other threads:[~2007-11-18 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-18 17:10 [PATCH] builtin-commit: Fix git-commit honoring status.color Ping Yin
2007-11-18 19:55 ` Junio C Hamano
2007-11-18 20:30 ` Junio C Hamano [this message]
2007-11-19 18:26 ` Ping Yin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v1wanuwiy.fsf_-_@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=krh@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).