Re: [HACKERS] Easy way to verify gitignore files?

2010-09-24 Thread Tom Lane
Dimitri Fontaine dfonta...@hi-media.com writes: Tom Lane t...@sss.pgh.pa.us writes: However, it seems that git isn't so willing to tell you about gitignore patterns that cover too much, i.e. match files that are already in the repository. It seems to me that git-ls-files is what you want

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-23 Thread Andres Freund
Hi, On Thursday 23 September 2010 02:54:19 Tom Lane wrote: Is there any automated sanity check that we can run to find this sort of problem? I suspect that we probably have got some errors in the .gitignore files, particularly in the back branches, and it would be nice to find them now

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-23 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: However, it seems that git isn't so willing to tell you about gitignore patterns that cover too much, i.e. match files that are already in the repository. It seems to me that git-ls-files is what you want here :

[HACKERS] Easy way to verify gitignore files?

2010-09-22 Thread Tom Lane
It's not hard to tell if we're missing a file that ought to be listed in .gitignore --- git status will find that problem soon enough. However, it seems that git isn't so willing to tell you about gitignore patterns that cover too much, i.e. match files that are already in the repository. I found

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-22 Thread Robert Haas
On Wed, Sep 22, 2010 at 8:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: It's not hard to tell if we're missing a file that ought to be listed in .gitignore --- git status will find that problem soon enough. However, it seems that git isn't so willing to tell you about gitignore patterns that cover

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Sep 22, 2010 at 8:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Is there any automated sanity check that we can run to find this sort of problem?  I suspect that we probably have got some errors in the .gitignore files, particularly in the back

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-22 Thread Abhijit Menon-Sen
At 2010-09-22 20:54:19 -0400, t...@sss.pgh.pa.us wrote: However, it seems that git isn't so willing to tell you about gitignore patterns that cover too much, i.e. match files that are already in the repository. If .gitignore specifies a pattern that matches something that's already in the

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-22 Thread Brendan Jurd
On 23 September 2010 11:28, Abhijit Menon-Sen a...@toroid.org wrote: This seems pretty dangerous, especially for people who are willing to rely on git commit -a :-( There is no danger. git commit -a will commit changes to files that match .gitignore but are already in the repository. (I

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-22 Thread Tom Lane
Abhijit Menon-Sen a...@toroid.org writes: At 2010-09-22 20:54:19 -0400, t...@sss.pgh.pa.us wrote: However, it seems that git isn't so willing to tell you about gitignore patterns that cover too much, i.e. match files that are already in the repository. If .gitignore specifies a pattern that

Re: [HACKERS] Easy way to verify gitignore files?

2010-09-22 Thread Abhijit Menon-Sen
At 2010-09-22 22:19:45 -0400, t...@sss.pgh.pa.us wrote: I can demonstrate that this is not so. Try a git add on such a file. Works fine for me with v1.7.3 (no warnings, no need for add -f). What version do you use? If I try to add an untracked file which is already ignored, then I get the