From: Alex Riesen <raa.lkml@gmail.com>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] git-commit: add a prepare-commit-msg hook
Date: Fri, 18 Jan 2008 22:08:25 +0100 [thread overview]
Message-ID: <20080118210825.GB3411@steel.home> (raw)
In-Reply-To: <47910229.90700@gnu.org>
Paolo Bonzini, Fri, Jan 18, 2008 20:46:49 +0100:
> Alex Riesen wrote:
>> Paolo Bonzini, Fri, Jan 18, 2008 15:51:25 +0100:
>>> + if (!edit_message) {
>>> + run_hook(index_file, "prepare-commit-msg", git_path(commit_editmsg));
>>> + }
>>> launch_editor(git_path(commit_editmsg), NULL, env);
>> "preedit-new-commit-msg", perhaps. A "prepare-" suggests it is called
>> every time, even if no editor is specified, which it is not.
>> And it really does look like a template...
>
> It is, but quite a powerful one. :-)
Except that "template" is already taken. Someone uses it and some may
even got used to "template" having that meaning.
> template-commit-msg?
Not really. It will be run even if the template (the one Git have
already) is not used.
It really looks a bit complicated. If at all, how about running that
"pre-editor" hook with information about where the message comes from?
I.e. if the message comes from a template:
preedit-commit-msg .git/COMMIT_MSG template
or, for a message coming from commit:
preedit-commit-msg .git/COMMIT_MSG commit 0123456789abdef
or, for a message coming from a file
preedit-commit-msg .git/COMMIT_MSG file user/path/to/file
and finally, for a new message:
preedit-commit-msg .git/COMMIT_MSG
?
next prev parent reply other threads:[~2008-01-18 21:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 14:51 [PATCH] git-commit: add a prepare-commit-msg hook Paolo Bonzini
2008-01-18 15:47 ` Johannes Schindelin
2008-01-18 15:51 ` Paolo Bonzini
2008-01-18 16:06 ` Johannes Schindelin
2008-01-18 16:37 ` Paolo Bonzini
2008-01-18 18:06 ` Johannes Schindelin
2008-01-18 18:51 ` Paolo Bonzini
2008-01-18 19:01 ` Benoit Sigoure
2008-01-18 19:05 ` Alex Riesen
2008-01-18 19:46 ` Paolo Bonzini
2008-01-18 21:08 ` Alex Riesen [this message]
2008-01-18 22:05 ` Junio C Hamano
2008-01-19 9:32 ` Paolo Bonzini
2008-01-19 11:20 ` Johannes Schindelin
2008-01-19 15:41 ` Benoit Sigoure
2008-01-19 16:04 ` Paolo Bonzini
2008-01-20 22:28 ` Junio C Hamano
2008-01-21 6:16 ` Paolo Bonzini
2008-01-21 11:04 ` Johannes Schindelin
2008-01-21 12:14 ` Paolo Bonzini
2008-01-21 12:46 ` Johannes Schindelin
2008-01-21 12:59 ` Paolo Bonzini
2008-01-21 22:44 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2008-01-21 14:27 Paolo Bonzini
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=20080118210825.GB3411@steel.home \
--to=raa.lkml@gmail.com \
--cc=bonzini@gnu.org \
--cc=git@vger.kernel.org \
/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).