On 06/30/2015 03:48 AM, Mark Wielaard wrote:
On Tue, 2015-06-30 at 08:46 +0200, Pino Toscano wrote:
> while working on the previous patches, I noticed a number of generated
> files are not part of .gitignore, so git shows them in the status
> output.
>
> Attached there is a patch for it to ignore most of them.
These are all files generated in the builddir aren't they?
Since they don't show up when doing a srcdir != builddir build I prefer
not to add them since they aren't really generated (source) files.
But this has come up before, so maybe I am wrong?
IMO, if srcdir==builddir is a supported way to build, then .gitignore
ought to include those things. Besides, it already does include some
build artifacts like "*.o".
However, I would suggest that specific ignores should be anchored to
their path. e.g. "version.h" ignores that name in any path, whereas
"/version.h" would only ignore that in the directory with .gitignore.
Git does that anchoring for any pattern containing "/", so things like
"tests/hash" are matched relative to .gitignore too. You could instead
create a "tests/.gitignore" containing "/hash" to keep it localized.