git am and mangled subject lines

2014-02-24 Thread Phillip Susi
-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 #:?

-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-
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git am and mangled subject lines

2014-02-24 Thread Jonathan Nieder
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 #:?

builtin/mailinfo.c is the place to start (see git-mailinfo(1)).
This is a little tricky because some people *like* the bug #:
in the subject line for a commit.

Hope that helps,
Jonathan
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git am and mangled subject lines

2014-02-24 Thread Junio C Hamano
Phillip Susi ps...@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 #:?

I think applypatch-msg hook is your friend in a case like this.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git am and mangled subject lines

2014-02-24 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2/24/2014 3:19 PM, Junio C Hamano wrote:
 Phillip Susi ps...@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 #:?
 
 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-
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git am and mangled subject lines

2014-02-24 Thread Jonathan Nieder
Hi,

Phillip Susi wrote:
 On 2/24/2014 3:19 PM, Junio C Hamano wrote:
 Phillip Susi ps...@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 #:?

 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 #: prefix introduced by a bug
tracker).

Reported-by: Phillip Susi ps...@ubuntu.com
Signed-off-by: Jonathan Nieder jrnie...@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

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html