lkml.org 
[lkml]   [2008]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH] dontdiff: generate from gitignore
On Fri, Sep 12, 2008 at 19:41, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> Linus Torvalds wrote:
>>
>> On Fri, 12 Sep 2008, Randy Dunlap wrote:
>>> Generate the "dontdiff" file from the .gitignore files.
>>
>> t's not quite as simple as that, though.
>>
>> The .gitignore files are fundamentally location hierarchy-aware, so a
>> ignore entry in one subdirectory only affects that subdirectory
>> (recursively), so if you flatten then, you should take that into account.
>>
>> As far as I can tell, your script will generate lots of incorrect entries
>> due to this. Eg, it will generate
>>
>> parse.[ch]
>>
>> as a dontdiff pattern, because scripts/genksyms/.gitignore has that, but
>> that means that now it will ignore parse.c in all the _other_ places,
>> where it *isn't* a generated file (ie mm/parse.c).
>
> Yes, that's one of the reasons that it contains "RFC" in $subject.
> There's also no handling of !pattern .gitignore lines....
>
> AFAIK, diff with a dontdiff file does not allow/support full pathname
> hierarchies like .gitignore does, so this is probably a futile exercise. ??

I'm presuming you're talking about this diff option?

`-X FILE'
`--exclude-from=FILE'
When comparing directories, ignore files and subdirectories whose
basenames match any pattern contained in FILE. *Note Comparing
Directories::.

Indeed: it clearly says "basename" here.

If it weren't for that, you could just use git-ls-files --ignore to
find them ...


\
 
 \ /
  Last update: 2008-09-12 22:35    [W:0.033 / U:1.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site