shadow-maint / shadow

Upstream shadow tree
Other
290 stars 228 forks source link

gitignore: add a few more generated files to be ignored #972

Closed eli-schwartz closed 4 months ago

eli-schwartz commented 4 months ago

before this, the following untracked files showed up in git status:

lib/atoi/.dirstamp
lib/string/.dirstamp
lib/time/.dirstamp
man/da/login.defs.d
man/da/messages.mo
man/de/login.defs.d
man/de/messages.mo
man/fr/login.defs.d
man/fr/messages.mo
man/it/login.defs.d
man/it/messages.mo
man/pl/login.defs.d
man/pl/messages.mo
man/ru/login.defs.d
man/ru/messages.mo
man/sv/login.defs.d
man/sv/messages.mo
man/uk/login.defs.d
man/uk/messages.mo
man/zh_CN/login.defs.d
man/zh_CN/messages.mo
test-driver
alejandro-colomar commented 4 months ago

Hmmm, actually, there are '*.d' files that we want. Well, they're actually directories.

alx@debian:~/src/shadow/shadow/master$ git clean -dffx
alx@debian:~/src/shadow/shadow/master$ find -type f | grep '\.d$' | wc -l
0
alx@debian:~/src/shadow/shadow/master$ find -type d | grep '\.d$' | wc -l
124

I'm not sure adding *.d is a good idea.

alejandro-colomar commented 4 months ago

We're fine with *.mo:

alx@debian:~/src/shadow/shadow/master$ find -type d | grep '\.mo$' | wc -l
0
alx@debian:~/src/shadow/shadow/master$ find -type f | grep '\.mo$' | wc -l
0
eli-schwartz commented 4 months ago

For some reason I thought those were depfiles, and I'm not sure why.

login.defs.d:
        ln -sf $(srcdir)/../login.defs.d login.defs.d

This appears to be using it as a way of relativizing itstool includes. Interesting.

eli-schwartz commented 4 months ago

range-diff:

1:  5150ac18 ! 1:  7cd7e5d5 gitignore: add a few more generated files to be ignored
    @@ .gitignore: lib*.a
     +*.mo
      *.gmo
      .deps
    -+*.d
      .libs
     +.dirstamp

    @@ .gitignore: Makefile.in
      /ylwrap

      /po/*.header
    +
    + ## man/.gitignore ##
    +@@ man/.gitignore: generate_mans.deps
    + 
    + *.[0-9]
    + 
    ++# translation symlinks
    ++/*/login.defs.d
    ++
    + /po/POTFILES
    + /po/stamp-po

This ignores only subdirectories of man/*/ and not man/login.defs.d itself.