`gnulib-tool --update` without altering `.gitignore` files

91 views Asked by At

I am using some gnulib modules on my project. I have chosen to not carry them around in my repository. Every time I do a fresh clone I just run.

$ gnulib-tool --update

And I am all set up!

One problem though. I have my .gitignore files already set up and I am perfectly happy with them. I don't want gnulib-tool to mess them up.

Any idea how to get rid of this side effect?

EDIT: The --no-vc-files option doesn't work with --update.

$ gnulib-tool --update --no-vc-files
gnulib-tool: invalid options for 'update' mode
Try 'gnulib-tool --help' for more information.
If you really want to modify the gnulib configuration of your project,
you need to use 'gnulib --import' - at your own risk!
1

There are 1 answers

0
Bruno Haible On BEST ANSWER

You need to pass the option --no-vc-files to the initial gnulib-tool --import invocation. gnulib-tool will them remember (through a line in the gnulib-cache.m4 file) that this option was specified.

You can also hack the gnulib-cache.m4: Add the line

gl_VC_FILES([false])

This will make gnulib-tool think that the option --no-vc-files was given when gnulib-tool --import was invoked.