* git am and mangled subject lines
@ 2014-02-24 19:28 Phillip Susi
2014-02-24 20:05 ` Jonathan Nieder
2014-02-24 20:19 ` Junio C Hamano
0 siblings, 2 replies; 5+ messages in thread
From: Phillip Susi @ 2014-02-24 19:28 UTC (permalink / raw)
To: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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:"?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJTC51PAAoJEI5FoCIzSKrw5YYH/R6t5fS71UAfFomsD/8HWHoI
ve1tIyyruHeriOV8qttlNQGynuEXkI2IBMWJaB7jV5oK8d4OsVQZ/7Nfcxoj52SO
JXDSs0MVDB2Ro2lHXRnQsaCy/TUm+ALWsNiTy0kYMTeC7Iqtri1T1l8gaG2rwRJh
AGT1sgGssl9CvGFgDHJxRZ4WHSl/XrcjErZeJHz59hGIeJSeq2tJXjfNzNTHrNpw
B4rcW8AxXhx+3vWPx8PSJsiVeWR1ndILXwxBsUHPuUW5SdsNBrty1L+4xrGIbxm7
qV7HVJ6BvJ4MXuTEOec3a9ACmvUTDNNMGRf2xonjXMcguojRZHjltRazsI34n8o=
=sWTQ
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git am and mangled subject lines
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
1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Nieder @ 2014-02-24 20:05 UTC (permalink / raw)
To: Phillip Susi; +Cc: git
Hi Phillip,
Phillip Susi wrote:
> 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:"?
builtin/mailinfo.c is the place to start (see git-mailinfo(1)).
This is a little tricky because some people *like* the "bug #nnnn:"
in the subject line for a commit.
Hope that helps,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git am and mangled subject lines
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
1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2014-02-24 20:19 UTC (permalink / raw)
To: Phillip Susi; +Cc: git
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git am and mangled subject lines
2014-02-24 20:19 ` Junio C Hamano
@ 2014-02-24 20:24 ` Phillip Susi
2014-02-24 20:38 ` Jonathan Nieder
0 siblings, 1 reply; 5+ messages in thread
From: Phillip Susi @ 2014-02-24 20:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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 ).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJTC6pvAAoJEI5FoCIzSKrwQpYH/iJ8RPqEoIoO+GBU2HxmCfEZ
Tlo1qwbvw26ALY71/WQFtVKW+3Bh1XYpAs0rsL5tpCJw/EMgAEm1cPFASf+BHcRI
NO57NBdk9we+hvUju+o6/It5e6OrYj/im+nI/AFfenRsbwPj8/S0MoMiP4jOEVkW
tTSCEeC5ldR4IbxBfphbV7me79Sk8nZssXTFmWJEv80H41LdMd8ZThR4ZFCcyzUR
ifAflWHN7dj3uwY0Lr+OdCRrPw3qU1LXRjKK2SHBTG1Qk4uJW3sFJKHTupAipOEQ
KKQ0QP/4WQWCSjq+8El4jnnlf++KAwbbOnAVYkbeKzy/4KOxJX7pimDypJHYGp8=
=LZvc
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git am and mangled subject lines
2014-02-24 20:24 ` Phillip Susi
@ 2014-02-24 20:38 ` Jonathan Nieder
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Nieder @ 2014-02-24 20:38 UTC (permalink / raw)
To: Phillip Susi; +Cc: Junio C Hamano, git
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-24 20:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).