lkml.org 
[lkml]   [2011]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: leave sched_setscheduler earlier if possible.
From
Date
On Fri, 2011-03-25 at 15:36 -0700, Junio C Hamano wrote:
> Peter Zijlstra <a.p.zijlstra@chello.nl> writes:
>
> > Junio, know of any way to make git-diff do the same? The purpose is to
> > skip labels as functions so that people stop doing stupid crap like
> > indenting labels, eg.:
> >
> > void foo(void)
> > {
> > again:
>
> Perhaps "git help attributes" and look for "funcname"?

Awesome so the diff.$foo.xfuncname is about what I want, except I seem
to need a .gitattributes file per repository.

Is there a way to over-ride the default in a global way so that I can
only change ~/.gitconfig and not bother with all various repos I have?

Another question, the built-in patterns consist of multiple regexes, can
custom patterns also have multiple?


So what worked for me was:

~/.gitconfig:

[diff "cpp"]
xfuncname = "^[[:alpha:]$_].*[^:]$"

and linux-2.6/.gitattributes:

*.h diff=cpp
*.c diff=cpp

What I tried was:

[diff]
xfuncname = "^[[:alpha:]$_].*[^:]$"

But that didn't seem to work.. I also tried ~/.gitattributes, but again,
no joy.





\
 
 \ /
  Last update: 2011-03-26 11:27    [W:0.052 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site