bug-libsigsegv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-libsigsegv] Re: [PATCH] * .gitignore: Ignore more files.


From: Bruno Haible
Subject: [Bug-libsigsegv] Re: [PATCH] * .gitignore: Ignore more files.
Date: Sun, 24 Oct 2010 18:00:09 +0200
User-agent: KMail/1.9.9

Hi Eric,

Eric Blake wrote:
> --- a/.gitignore
> +++ b/.gitignore
> @@ -14,3 +14,11 @@
>  # Other files generated by autogen.sh and distributed:
>  /config.h.msvc
> 
> +# Files generated during in-tree './configure -C && make'.
> +/autom4te.cache
> +/config.cache
> +/config.h
> +/config.log
> +/config.status
> +/src/.libs
> +/src/sigsegv.h

I think the .git/info/exclude is a better place to list these files.

For libunistring, libsigsegv, and (mostly) gettext, I've adopted the following
policy regarding commit / .gitignore / .git/info/exclude:


Files under version control and gitignored files in LIBUNISTRING, LIBSIGSEGV
============================================================================

Because releases are rolled through automake's "make distcheck", unused files
can lie around in the working checkout. A separate "-clean" checkout is used
which should not contain modifications nor unused files.

                                                   in              in
                                  Committed    .gitignore    .git/info/exclude

Source                                Y             N               N

gnulib-cache.m4                       Y             N               N

Brought in by autotools,              N             Y               N
gnulib-tool

Generated by autotools                N             Y               N

Generated by "make" and               N             Y               N
distributed (i.e. kept by
"make distclean")

Generated by "make" and               N             N               Y
not distributed (i.e. erased by
"make distclean")

Editor backup files                   N             Y               N


Have an autogen.sh ?   Y


Rationale:
  - Source is committed, of course.
  - gnulib-cache.m4 is committed, so that when a different user checks out
    the repository and reconfigures with a smaller module list, stale files
    from gnulib are removed.
  - No other files are committed, because they are autogenerated.
  - I want to be sure that when I do "make dist", the release contains all
    files from the repository, plus the files brought in by gnulib-tool and
    autotools, plus the files generated by autotools, plus the files generated
    by "make" and distributed. I also want to be sure that "make distclean"
    removes all that it should. This is done by doing a "make distclean" and
    "git status". For this to work, no other files should be in .gitignore.
    (It would also be possible to do a "make dist", then "make distclean, and
    then comparing the tarball and the git checkout with "diff -r -q". But
    since "make dist" often takes a while, I prefer to use "git status" for
    this purpose.)
  - But in some other git checkouts, I want to be able to use "git status" also
    without "make distclean". So I use a .git/info/exclude file in these
    checkouts.

Here is the .git/info/exclude that I use for libsigsegv.

# Files generated by "make" and not distributed
# (i.e. erased by "make distclean").
# Erased by Makefile.
/config.status
/config.log
/config.cache
/config.h
/Makefile
/stamp-h1
/libtool
/termbold
/termnorm
# Erased by src/Makefile.
src/Makefile
src/*.o
src/*.lo
src/libsigsegv.la
src/.libs
src/_libs
src/sigsegv.h
# Erased by tests/Makefile.
tests/Makefile
tests/*.o
tests/sigsegv1
tests/sigsegv2
tests/sigsegv3
tests/stackoverflow1
tests/stackoverflow2

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]