[libvirt] Re: [PATCH] Add .gitignore files

Jim Meyering jim at meyering.net
Fri Oct 17 10:04:13 UTC 2008


Jim Meyering <jim at meyering.net> wrote:

> James Morris <jmorris at namei.org> wrote:
>> I haven't seen these patches go in upstream.  Any chance of having them
>> committed so I don't have to carry them locally ?
>
> If they can be automatically generated from the .cvsignore ones, then how
> about adding a rule to do that as well?  Then, when the .cvsignore files
> change, one can type e.g., "make sync-vcs-ignore-files" to regenerate the
> derived .gitignore ones.  Of course, someone would still have to commit
> any changed files, but at least it's far less manual.  That would also
> avoid the "No newline at end of file" warnings in your patch.
>
> sync-vcs-ignore-files:
> 	find . -name .cvsignore \
> 	  | sed 's,\(.*\),cp \1 \1,;s,\.cvsignore$$,.gitignore,' \
> 	  | $(SHELL)
>
> If too many people object to adding git-specific .ignore files,
> I might take the unusual step of adding them to the git mirror.
> Of course, this would break the mirror in a sense, and might
> cause minor complications if the .gitignore files are added
> some time later, so I'd rather not have to...

No one objected and Dan ACK'd the initial proposed change,
so I've just pushed this:

>From b8a8864958cfec5dab96e85959d74d9223916313 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 17 Oct 2008 11:55:33 +0200
Subject: [PATCH] generate .gitignore files from .cvsignore ones

* Makefile.maint (sync-vcs-ignore-files): New target.
Prompted by a patch from James Morris.
http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
Add all (now-generated) .gitignore files.
* .gitignore: New file.
* build-aux/.gitignore: New file.
* docs/.gitignore: New file.
* docs/devhelp/.gitignore: New file.
* docs/examples/.gitignore: New file.
* docs/examples/python/.gitignore: New file.
* gnulib/lib/.gitignore: New file.
* gnulib/lib/arpa/.gitignore: New file.
* gnulib/lib/netinet/.gitignore: New file.
* gnulib/lib/sys/.gitignore: New file.
* gnulib/tests/.gitignore: New file.
* include/.gitignore: New file.
* include/libvirt/.gitignore: New file.
* po/.gitignore: New file.
* proxy/.gitignore: New file.
* python/.gitignore: New file.
* python/tests/.gitignore: New file.
* qemud/.gitignore: New file.
* src/.gitignore: New file.
* tests/.gitignore: New file.
* tests/confdata/.gitignore: New file.
* tests/sexpr2xmldata/.gitignore: New file.
* tests/virshdata/.gitignore: New file.
* tests/xencapsdata/.gitignore: New file.
* tests/xmconfigdata/.gitignore: New file.
* tests/xml2sexprdata/.gitignore: New file.
---
 .gitignore                      |   32 ++++++++++++++++++++++++++++++++
 ChangeLog                       |   34 ++++++++++++++++++++++++++++++++++
 Makefile.maint                  |    9 +++++++++
 build-aux/.gitignore            |   10 ++++++++++
 docs/.gitignore                 |    4 ++++
 docs/devhelp/.gitignore         |    3 +++
 docs/examples/.gitignore        |    7 +++++++
 docs/examples/python/.gitignore |    2 ++
 gnulib/lib/.gitignore           |   23 +++++++++++++++++++++++
 gnulib/lib/arpa/.gitignore      |    1 +
 gnulib/lib/netinet/.gitignore   |    1 +
 gnulib/lib/sys/.gitignore       |    4 ++++
 gnulib/tests/.gitignore         |   29 +++++++++++++++++++++++++++++
 include/.gitignore              |    2 ++
 include/libvirt/.gitignore      |    2 ++
 po/.gitignore                   |   15 +++++++++++++++
 proxy/.gitignore                |    5 +++++
 python/.gitignore               |   14 ++++++++++++++
 python/tests/.gitignore         |    2 ++
 qemud/.gitignore                |   11 +++++++++++
 src/.gitignore                  |   16 ++++++++++++++++
 tests/.gitignore                |   20 ++++++++++++++++++++
 tests/confdata/.gitignore       |    2 ++
 tests/sexpr2xmldata/.gitignore  |    2 ++
 tests/virshdata/.gitignore      |    2 ++
 tests/xencapsdata/.gitignore    |    2 ++
 tests/xmconfigdata/.gitignore   |    2 ++
 tests/xml2sexprdata/.gitignore  |    2 ++
 28 files changed, 258 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 build-aux/.gitignore
 create mode 100644 docs/.gitignore
 create mode 100644 docs/devhelp/.gitignore
 create mode 100644 docs/examples/.gitignore
 create mode 100644 docs/examples/python/.gitignore
 create mode 100644 gnulib/lib/.gitignore
 create mode 100644 gnulib/lib/arpa/.gitignore
 create mode 100644 gnulib/lib/netinet/.gitignore
 create mode 100644 gnulib/lib/sys/.gitignore
 create mode 100644 gnulib/tests/.gitignore
 create mode 100644 include/.gitignore
 create mode 100644 include/libvirt/.gitignore
 create mode 100644 po/.gitignore
 create mode 100644 proxy/.gitignore
 create mode 100644 python/.gitignore
 create mode 100644 python/tests/.gitignore
 create mode 100644 qemud/.gitignore
 create mode 100644 src/.gitignore
 create mode 100644 tests/.gitignore
 create mode 100644 tests/confdata/.gitignore
 create mode 100644 tests/sexpr2xmldata/.gitignore
 create mode 100644 tests/virshdata/.gitignore
 create mode 100644 tests/xencapsdata/.gitignore
 create mode 100644 tests/xmconfigdata/.gitignore
 create mode 100644 tests/xml2sexprdata/.gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eded526
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,32 @@
+.git
+Makefile
+aclocal.m4
+autom4te.cache
+stamp-h.in
+Makefile.in
+configure
+config.cache
+config.h
+config.h.in
+config.log
+config.status
+config.guess
+config.sub
+config.rpath
+stamp-h
+stamp-h1
+libtool
+ltconfig
+update.log
+libvirt.pc
+libvirt.spec
+mingw32-libvirt.spec
+COPYING
+m4
+ABOUT-NLS
+coverage
+results.log
+libvirt-*.tar.gz
+INSTALL
+ltmain.sh
+mkinstalldirs
diff --git a/ChangeLog b/ChangeLog
index f65fc67..919df5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2008-10-17  Jim Meyering  <meyering at redhat.com>
+
+	generate .gitignore files from .cvsignore ones
+	* Makefile.maint (sync-vcs-ignore-files): New target.
+	Prompted by a patch from James Morris.
+	http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
+	Add all (now-generated) .gitignore files.
+	* .gitignore: New file.
+	* build-aux/.gitignore: New file.
+	* docs/.gitignore: New file.
+	* docs/devhelp/.gitignore: New file.
+	* docs/examples/.gitignore: New file.
+	* docs/examples/python/.gitignore: New file.
+	* gnulib/lib/.gitignore: New file.
+	* gnulib/lib/arpa/.gitignore: New file.
+	* gnulib/lib/netinet/.gitignore: New file.
+	* gnulib/lib/sys/.gitignore: New file.
+	* gnulib/tests/.gitignore: New file.
+	* include/.gitignore: New file.
+	* include/libvirt/.gitignore: New file.
+	* po/.gitignore: New file.
+	* proxy/.gitignore: New file.
+	* python/.gitignore: New file.
+	* python/tests/.gitignore: New file.
+	* qemud/.gitignore: New file.
+	* src/.gitignore: New file.
+	* tests/.gitignore: New file.
+	* tests/confdata/.gitignore: New file.
+	* tests/sexpr2xmldata/.gitignore: New file.
+	* tests/virshdata/.gitignore: New file.
+	* tests/xencapsdata/.gitignore: New file.
+	* tests/xmconfigdata/.gitignore: New file.
+	* tests/xml2sexprdata/.gitignore: New file.
+
 Thu Oct 16 19:17:25 +0200 Jim Meyering <meyering at redhat.com>

 	build: when po-check fails, say why and suggest a fix
diff --git a/Makefile.maint b/Makefile.maint
index 4920112..441deac 100644
--- a/Makefile.maint
+++ b/Makefile.maint
@@ -607,3 +607,12 @@ my-distcheck: $(local-check) check
 	@echo "========================"; \
 	echo "$(distdir).tar.gz is ready for distribution"; \
 	echo "========================"
+
+gi=.gitignore
+sync-vcs-ignore-files:
+	find . -name .cvsignore				\
+	  | sed						\
+	    -e 's,\(.*\),cp -f \1 \1; chmod 444 \1,'	\
+	    -e 's,\.cvsignore; ,$(gi); ,'		\
+	    -e 's,\.cvsignore$$,$(gi),'			\
+	  | $(SHELL)
diff --git a/build-aux/.gitignore b/build-aux/.gitignore
new file mode 100644
index 0000000..096cccb
--- /dev/null
+++ b/build-aux/.gitignore
@@ -0,0 +1,10 @@
+compile
+config.guess
+config.rpath
+config.sub
+depcomp
+install-sh
+ltmain.sh
+missing
+mkinstalldirs
+mktempd
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 0000000..f284184
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+.memdump
+apibuild.pyc
diff --git a/docs/devhelp/.gitignore b/docs/devhelp/.gitignore
new file mode 100644
index 0000000..cc4abab
--- /dev/null
+++ b/docs/devhelp/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+libvirt.devhelp
diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore
new file mode 100644
index 0000000..5f0e251
--- /dev/null
+++ b/docs/examples/.gitignore
@@ -0,0 +1,7 @@
+.memdump
+Makefile.in
+Makefile
+.deps
+.libs
+info1
+suspend
diff --git a/docs/examples/python/.gitignore b/docs/examples/python/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/docs/examples/python/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/gnulib/lib/.gitignore b/gnulib/lib/.gitignore
new file mode 100644
index 0000000..2849ca9
--- /dev/null
+++ b/gnulib/lib/.gitignore
@@ -0,0 +1,23 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+alloca.h
+arpa_inet.h
+float.h
+netinet_in.h
+poll.h
+stdbool.h
+stdint.h
+stdio-impl.h
+stdio.h
+stdlib.h
+string.h
+sys_select.h
+sys_socket.h
+sys_stat.h
+sys_time.h
+unistd.h
+wchar.h
diff --git a/gnulib/lib/arpa/.gitignore b/gnulib/lib/arpa/.gitignore
new file mode 100644
index 0000000..b9013ae
--- /dev/null
+++ b/gnulib/lib/arpa/.gitignore
@@ -0,0 +1 @@
+inet.h
diff --git a/gnulib/lib/netinet/.gitignore b/gnulib/lib/netinet/.gitignore
new file mode 100644
index 0000000..95f1a2e
--- /dev/null
+++ b/gnulib/lib/netinet/.gitignore
@@ -0,0 +1 @@
+in.h
\ No newline at end of file
diff --git a/gnulib/lib/sys/.gitignore b/gnulib/lib/sys/.gitignore
new file mode 100644
index 0000000..f6e392f
--- /dev/null
+++ b/gnulib/lib/sys/.gitignore
@@ -0,0 +1,4 @@
+select.h
+socket.h
+stat.h
+time.h
\ No newline at end of file
diff --git a/gnulib/tests/.gitignore b/gnulib/tests/.gitignore
new file mode 100644
index 0000000..5b93dc2
--- /dev/null
+++ b/gnulib/tests/.gitignore
@@ -0,0 +1,29 @@
+.deps
+.libs
+Makefile
+Makefile.in
+test-alloca-opt
+test-arpa_inet
+test-fseeko
+test-getaddrinfo
+test-getdelim
+test-getline
+test-lseek
+test-netinet_in
+test-snprintf
+test-stdbool
+test-stdint
+test-stdio
+test-stdlib
+test-string
+test-sys_select
+test-sys_socket
+test-sys_stat
+test-sys_time
+test-unistd
+test-vasnprintf
+test-vasprintf
+test-wchar
+test-EOVERFLOW.c
+test-EOVERFLOW
+test-c-ctype
diff --git a/include/.gitignore b/include/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/include/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/include/libvirt/.gitignore b/include/libvirt/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/include/libvirt/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 0000000..a0b63f3
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1,15 @@
+stamp-po
+remove-potcdate.sin
+quot.sed
+insert-header.sin
+*.gmo
+en at quot.header
+en at boldquot.header
+boldquot.sed
+Rules-quot
+POTFILES
+Makevars.template
+Makefile.in.in
+Makefile.in
+Makefile
+remove-potcdate.sed
diff --git a/proxy/.gitignore b/proxy/.gitignore
new file mode 100644
index 0000000..f3d6ec7
--- /dev/null
+++ b/proxy/.gitignore
@@ -0,0 +1,5 @@
+Makefile
+Makefile.in
+.deps
+.libs
+libvirt_proxy
diff --git a/python/.gitignore b/python/.gitignore
new file mode 100644
index 0000000..079e574
--- /dev/null
+++ b/python/.gitignore
@@ -0,0 +1,14 @@
+Makefile
+Makefile.in
+.deps
+.libs
+*.lo
+*.la
+*.loT
+libvirt.py
+libvirt-export.c
+libvirtclass.txt
+libvirt-py.[ch]
+libvirtclass.py
+gen_prog
+*.pyc
diff --git a/python/tests/.gitignore b/python/tests/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/python/tests/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/qemud/.gitignore b/qemud/.gitignore
new file mode 100644
index 0000000..04fed54
--- /dev/null
+++ b/qemud/.gitignore
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+.deps
+.libs
+*.lo
+*.la
+libvirt_qemud
+libvirtd
+libvirtd.init
+*.gcno
+*.gcda
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..165a562
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,16 @@
+Makefile
+Makefile.in
+.deps
+.libs
+*.lo
+*.loT
+*.la
+virsh
+*.gcda
+*.gcno
+*.gcov
+*.cov
+libvirt_parthelper
+libvirt_lxc
+virsh-net-edit.c
+virsh-pool-edit.c
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..f09e6bb
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,20 @@
+Makefile
+Makefile.in
+.deps
+.libs
+xmlrpctest
+sexpr2xmltest
+xml2sexprtest
+virshtest
+conftest
+reconnect
+xmconfigtest
+xencapstest
+qemuxml2xmltest
+qemuxml2argvtest
+nodeinfotest
+statstest
+qparamtest
+*.gcda
+*.gcno
+
diff --git a/tests/confdata/.gitignore b/tests/confdata/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/tests/confdata/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/tests/sexpr2xmldata/.gitignore b/tests/sexpr2xmldata/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/tests/sexpr2xmldata/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/tests/virshdata/.gitignore b/tests/virshdata/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/tests/virshdata/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/tests/xencapsdata/.gitignore b/tests/xencapsdata/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/tests/xencapsdata/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/tests/xmconfigdata/.gitignore b/tests/xmconfigdata/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/tests/xmconfigdata/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/tests/xml2sexprdata/.gitignore b/tests/xml2sexprdata/.gitignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/tests/xml2sexprdata/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
--
1.6.0.2.532.g84ed4c




More information about the libvir-list mailing list