[Nagiosplug-devel] Git commit e-mails

Andreas Ericsson ae at op5.se
Fri May 22 15:18:27 CEST 2009


Ton Voon wrote:
> On 22 May 2009, at 13:10, Thomas Guyot-Sionnest wrote:
> 
>> I agree... Since the commit subjects currently do not show anything
>> useful we have to look inside emails already. A top summary would be
>> nice, or anything that can reduce the email size (i.e. removing the
>> diffs) so we'd be able to quickly see what have been committed.
> 
> I'm up for a decent subject line.
> 
> I would insist on keeping the diffs in the email. I can then search my  
> entire mail folder for phrases to see if anything has changed  
> recently. But if this functionality is in git, then I guess the diffs  
> can be removed.

git log -p --grep="some phrase in the commit message"
git show :/"Start of commit subject"
git log -p -S"a sequence of code you're interested in"

The missing space between -S and the string is, unfortunately, not a
typo; It's a truly ancient feature of git that nearly all UI apps now
rely on, so it can't be changed easily without breaking those apps.

Note that the pickaxe option (S) will show you patches where the diff
between a commit and its parent(s) introduces or removes at least one
instance of the piece of code you gave as parameter to 'S'. Code
movements are not shown with this option. For that I'd suggest using

   git log -p 

and just searching within less for the string you're interested in.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Register now for Nordic Meet on Nagios, June 3-4 in Stockholm
 http://nordicmeetonnagios.op5.org/

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.




More information about the Devel mailing list