From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4110 invoked by alias); 20 Mar 2011 15:34:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28933 Received: (qmail 25174 invoked from network); 20 Mar 2011 15:34:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Sun, 20 Mar 2011 11:34:22 -0400 (EDT) From: "Benjamin R. Haskell" To: Frank Terbeck cc: =?UTF-8?Q?Johan_Sundstr=C3=B6m?= , Nikolai Weibull , Zsh Workers Subject: Re: Submitting patches [was: Re: Updated _git completion (not attached)] In-Reply-To: <8762rekyj1.fsf@ft.bewatermyfriend.org> Message-ID: References: <87ei6tex5r.fsf@ft.bewatermyfriend.org> <8739n3avrm.fsf@ft.bewatermyfriend.org> <877hbwi2gt.fsf@ft.bewatermyfriend.org> <8739mki0uj.fsf@ft.bewatermyfriend.org> <8762rekyj1.fsf@ft.bewatermyfriend.org> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463810530-411618332-1300635286=:22141" ---1463810530-411618332-1300635286=:22141 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Sun, 20 Mar 2011, Frank Terbeck wrote: > Johan Sundström wrote: >> On Fri, Mar 18, 2011 at 14:18, Frank Terbeck wrote: >>> [Etc/zsh-development-guide] >> >>> That being said, the output of "git format-patch" is usable, too. >>> Exchanging git's default "[PATCH]" by "PATCH: " would be extra >>> sugar. >> >> Running perl -pi -e 's/^(Subject: ).(PATCH[^]]*)./$1$2:/' *.patch on >> format-patch files fixes that (it seems command line options to git >> can't). Maybe a useful note for the dev guide? > > The archive reacts to anything that starts with "PATCH". You can see the > results on . So, your Perl snippet > would work. Even for numbered patches. Based on that list, it appears that no Perl script is necessary. Nikolai's patches labeled with the standard `git` way were picked up well enough: Subject: [PATCH 3/4] Fix git-branch -[dD] -r completion Subject: [PATCH 1/4] Fix typo Subject: [PATCH 4/4] Fix typo in git-send-email completion Subject: [PATCH 2/4] Only show modified files for git-checkout without tree were grabbed as: 3/4] Fix git-branch -[dD] -r completion 1/4] Fix typo 4/4] Fix typo in git-send-email completion 2/4] Only show modified files for git-checkout without tree Personally, I think it's better that the "series" info stays there. The only ugliness is the '] ' instead of ': '. And, with `git send-email --annotate` (which IMO is easier than `git format-patch` and then firing up an email client), there's no clear point at which to run the Perl script. (Though, with --annotate, you can simply modify the Subject: line in your editor.) I have the following in my .gitconfig: [alias] # ... 45 lines later ... email-zsh = "!email () { email=\"$(git config --get user.email)\" ; user=\"$(git config --get user.name)\" ; git send-email --annotate --envelope-sender='<'$email'>' --from=\"$user <$email>\" --cc=\"$user <$email>\" --to='Zsh Workers ' \"$@\" ; } ; email" --annotate - allows editing the messages --envelope-sender - helps with some mailing lists --cc - so I get a copy of the message --from - (not usually necessary, I don't think -- remnant from doing other email cartwheels in other aliases) The "!fn-name () { function-body ; } ; fn-name" idiom might not be necessary for this case, but it comes in handy when you want to munge the arguments list inside function-body. The other options should be obvious, and any other options you pass on the commandline (--dry-run, list of revisions, etc.) get passed up to send-email, which passes any options it doesn't use up to format-patch. -- Best, Ben ---1463810530-411618332-1300635286=:22141--