From: Junio C Hamano <junkio@cox.net>
To: David Kowis <dkowis@shlrm.org>
Cc: git@vger.kernel.org
Subject: Re: Thoughts on adding another hook to git
Date: Tue, 13 Jun 2006 11:41:06 -0700 [thread overview]
Message-ID: <7virn4gapp.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <448DB201.5090208@shlrm.org> (David Kowis's message of "Mon, 12 Jun 2006 13:27:13 -0500")
David Kowis <dkowis@shlrm.org> writes:
> I'd like to be able to modify the commit message before it ends up in
> the $EDITOR. This is a fairly trivial thing to implement:
> Call ${GIT_DIR}/hooks/pre-editor on COMMIT_MESSAGE before opening it in
> $EDITOR.
Three random thoughts.
- pre-editor is too generic a name because before making a
commit is not the only place we give you $EDITOR (both am and
tag do EDITOR thing IIRC). So the hook name must be more
specific to the commit codepath (otherwise your pre-editor
hook needs to be able to tell which codepath called it).
- git-commit gives you EDITOR when you are making a merge, and
you would probably want to keep the default merge commit
message without the prefixed directory thing. You probably
do not want to do this while doing --amend either.
- it might make sense to have a "commit template" that is used
when making a non-merge commit afresh (i.e. without -F, -m,
-c or -C to specify messages), instead of a hook script.
prev parent reply other threads:[~2006-06-13 18:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-12 18:27 Thoughts on adding another hook to git David Kowis
2006-06-12 19:06 ` Yakov Lerner
2006-06-12 19:10 ` David Kowis
2006-06-12 19:18 ` Yakov Lerner
2006-06-12 19:22 ` David Kowis
2006-06-13 6:29 ` Nikolai Weibull
2006-06-13 13:03 ` David Kowis
2006-06-13 15:26 ` Nikolai Weibull
2006-06-13 18:41 ` Junio C Hamano [this message]
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=7virn4gapp.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=dkowis@shlrm.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).