[Top][All Lists]

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

Re: gnulib doesn't add lib/spawn.h to .gitignore?

From: Bruno Haible
Subject: Re: gnulib doesn't add lib/spawn.h to .gitignore?
Date: Mon, 01 Oct 2012 00:00:26 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

[Dropping bug-coreutils from CC]

Hi Stefano,

> OK, this is a minor annoyance rather than a real bug, but I guess
> reporting it won't hurt.
> In GNU coreutils, the gnulib-provided 'bootstrap' script fails to add
> the generated file 'lib/spawn.h' to the .gitignore in 'lib/':
>   $ ./bootstrap && ./configure && make
>   ... [all is OK]
>   $ git status
>   ...
>   # Untracked files:
>   #   (use "git add <file>..." to include in what will be committed)
>   #
>   #       lib/spawn.h
>   nothing added to commit but untracked files present (use "git add" to track)
>   $ grep spawn lib/.gitignore
>   /spawn-pipe.c
>   /spawn-pipe.h
>   /spawn.in.h
>   /spawn_faction_addclose.c
>   /spawn_faction_adddup2.c
>   /spawn_faction_addopen.c
>   /spawn_faction_destroy.c
>   /spawn_faction_init.c
>   /spawn_int.h
>   /spawnattr_destroy.c
>   /spawnattr_init.c
>   /spawnattr_setflags.c
>   /spawnattr_setsigmask.c
>   /spawni.c
>   /spawnp.c
>   /w32spawn.h

I believe that the right choice of which files to put under version
control and which files to declare gitignored, in a project that uses
the GNU Autotools, is the following:

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

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

Currently gnulib-tool augments .gitignore for the files categorized as
"Brought in by autotools, gnulib-tool".

An option that would tell gnulib-tool to add also the files "Generated by
"make" and distributed" could be useful, for modules that have a
MAINTAINERCLEANFILES augmentation (such as 'parse-datetime' or 'iconv_open').

But what you are talking about is the category "Generated by "make" and
not distributed". I believe it depends on project policy whether such files
go into .gitignore. To get at this list of files, gnulib-tool should collect
the intersection of BUILT_SOURCES and MOSTLYCLEANFILES of all modules, right?


reply via email to

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