[PATCH libevdev] Review/update .gitignore files

Peter Hutterer peter.hutterer at who-t.net
Mon Nov 18 15:47:00 PST 2013


On Mon, Nov 18, 2013 at 03:12:35PM -0500, Gaetan Nadon wrote:
> On 13-11-18 05:51 AM, Peter Hutterer wrote:
> > I wonder, how hard would it be to write a makefile hook that pulls
> > down a generic .gitignore file, adds a custom per-project section and
> > saves that as .gitignore. add it to cleanfiles/maintainercleanfiles
> > and then you dont' have to duplicate the various .gitignores. and I
> > could just re-use the hook in every project :)
> >
> > something along the lines of:
> >
> > gitignore: .gitignore.local
> >     curl http://freedesktop.org/default.gitignore > .gitignore
> >     cat $^ >> .gitignore
> >
> > bit more polish, but that may be worthy pursuing.
> >
> It would require accessing internet while building which many consider a
> major sin.

it'd be interesting to add this as a possible m4 macro then. that way you
only pull it in during the autoreconf stage, but not during the build.
 
> A git submodule would perhaps be a more elegant solution.

that does seem like the best option indeed. it'd also go for other scripts,
e.g. autogen.sh which seems to always be the same anyway, but still requires
fixes every so often.

fwiw, I've merged and pushed this patch for now.

> The main .gitignore has not changed in 3 years in any of the 250 xorg
> modules. Over time I gathered some feedback and I have added a few
> patterns. What I propose in the patch in in fact version 2 of the main
> xorg .gitignore I intend to deploy.
> 
> Your suggestion would be useful if the main common gitignore would
> change frequently. I was a bit surprised to see it didn't, developers
> use the same tools as they did several years ago.

it's less the gitignore file changing and more that there isn't really a
reference gitignore that people use. so loads of projects start with a new
one, adding and modifying it over time. if there was a reference one (and I
just use the one from a random xorg tree) this would likely help a lot.

> There was nothing wrong in the current toplevel .gitignore file, I just
> future-proofed it. I can collapse the subdirs gitignore files into the
> toplevel one if you prefer.

Nah, that's fine as-is, thanks.

Cheers,
   Peter


More information about the Input-tools mailing list