From: Jonathan Nieder <jrnieder@gmail.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: git am and mangled subject lines
Date: Mon, 24 Feb 2014 12:38:29 -0800 [thread overview]
Message-ID: <20140224203829.GJ7855@google.com> (raw)
In-Reply-To: <530BAA6F.4030401@ubuntu.com>
Hi,
Phillip Susi wrote:
> On 2/24/2014 3:19 PM, Junio C Hamano wrote:
>> Phillip Susi <psusi@ubuntu.com> writes:
>>> git am already ignores the "[PATCH X/Y]" prefix that
>>> format-patch adds. Is it possible to get it to ignore any
>>> additional prefix that a bug tracker mangles into the subject
>>> line? i.e. "bug #nnnn:"?
>>
>> I think applypatch-msg hook is your friend in a case like this.
>
> Can you point me in the direction of some documentation on this? I
> don't see it mentioned in the man pages for git am or mailinfo ( I
> would think that would be the place to have it ).
Gladly.
Thanks for noticing.
-- >8 --
Subject: am doc: add a pointer to relevant hooks
It is not obvious when looking at a new command what hooks will affect
it. Add a HOOKS section to the git-am(1) page, imitating
git-commit(1), to make it easier for people to discover e.g. the
applypatch-msg hook that can implement a custom subject-mangling
strategy (e.g., removing a "bug #nnnn:" prefix introduced by a bug
tracker).
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Documentation/git-am.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 54d8461..abcffb6 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -189,6 +189,11 @@ commits, like running 'git am' on the wrong branch or an error in the
commits that is more easily fixed by changing the mailbox (e.g.
errors in the "From:" lines).
+HOOKS
+-----
+This command can run `applypatch-msg`, `pre-applypatch`,
+and `post-applypatch` hooks. See linkgit:githooks[5] for more
+information.
SEE ALSO
--------
--
1.9.0.rc1.175.g0b1dcb5
prev parent reply other threads:[~2014-02-24 20:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 19:28 git am and mangled subject lines Phillip Susi
2014-02-24 20:05 ` Jonathan Nieder
2014-02-24 20:19 ` Junio C Hamano
2014-02-24 20:24 ` Phillip Susi
2014-02-24 20:38 ` Jonathan Nieder [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=20140224203829.GJ7855@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=psusi@ubuntu.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).