xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/11 RFC] gitignore: Add/Generalize entries
@ 2020-09-02  1:08 Elliott Mitchell
  2020-09-24 15:44 ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Elliott Mitchell @ 2020-09-02  1:08 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, George Dunlap, Ian Jackson, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu

"stubdom/*.tar.gz" already existed as an entry.  Given the presence of
tarball ignore rules for tools, generalize the entry to match most
tarballs.  Tarballs should generally be left out of git repositories and
"-f" is appropriate for the very rare exception.

Multiple "config.h" entries had been present.  This is common enough to
add a common entry to cover the pattern everywhere.

Substantial numbers of pkg-config file ignore lines were present.  While
use of pkg-config is being reduced, ignoring such files in general seems
like an appropriate measure.

Python is growing in use, since patterns for underscore files seem likely
to be added, add a safety pattern to ensure Python double-underscore
files are preserved.

I'm pretty sure anything .old is unlikely to need to remain in history.

Signed-off-by: Elliott Mitchell <ehem+xen@m5p.com>

---
Question I have is:  Should "_*.[chS]" or "_*" be added as ignore
patterns?

Underscore is frequently used to mark intermediate files used during
build, but not worthy of preservation.  There are a bunch of directories
where "_paths.h" is ignored, and some "_*.[ch]" entries.  Yet should this
be generalized to *all* underscore files?

Preparing for this I've added "!__*__.py" which will override such and
ensure "__init__.py" files are *not* ignored.  I forsee a future where
Python adds another similar filename.
---
 .gitignore | 27 ++++++---------------------
 1 file changed, 6 insertions(+), 21 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0f0e79b6d1..507f1eb0cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+!__*__.py
 .hg
 .*.cmd
 *.orig
@@ -12,11 +13,15 @@
 *.so.[0-9]*
 *.bin
 *.bak
+*.tar
+*.tar.*z*
 *.tmp
 *.spot
 *.spit
 *.gcno
 *.gcda
+*.old
+*.pc
 *.py[ocd]
 TAGS
 GTAGS
@@ -33,12 +38,12 @@ cscope.po.out
 .vscode
 
 dist
-stubdom/*.tar.gz
 
 autom4te.cache/
 config.log
 config.status
 config.cache
+config.h
 config/Toplevel.mk
 config/Paths.mk
 
@@ -89,33 +94,23 @@ stubdom/vtpm/vtpm_manager.h
 stubdom/xenstore
 stubdom/zlib-*
 tools/*/build/lib*/*.py
-tools/config.h
 config/Tools.mk
 config/Stubdom.mk
 config/Docs.mk
 tools/libs/toolcore/headers.chk
-tools/libs/toolcore/xentoolcore.pc
 tools/libs/toollog/headers.chk
-tools/libs/toollog/xentoollog.pc
 tools/libs/evtchn/headers.chk
-tools/libs/evtchn/xenevtchn.pc
 tools/libs/gnttab/headers.chk
-tools/libs/gnttab/xengnttab.pc
 tools/libs/hypfs/headers.chk
-tools/libs/hypfs/xenhypfs.pc
 tools/libs/call/headers.chk
-tools/libs/call/xencall.pc
 tools/libs/foreignmemory/headers.chk
-tools/libs/foreignmemory/xenforeignmemory.pc
 tools/libs/devicemodel/headers.chk
-tools/libs/devicemodel/xendevicemodel.pc
 tools/console/xenconsole
 tools/console/xenconsoled
 tools/console/client/_paths.h
 tools/console/daemon/_paths.h
 tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/*
 tools/debugger/gdb/gdb-6.2.1/*
-tools/debugger/gdb/gdb-6.2.1.tar.bz2
 tools/debugger/gdbsx/gdbsx
 tools/debugger/xenitp/xenitp
 tools/firmware/*/biossums
@@ -136,7 +131,6 @@ tools/firmware/rombios/rombios[^/]*.s
 tools/firmware/rombios/32bit/32bitbios_flat.h
 tools/firmware/vgabios/vbetables-gen
 tools/firmware/vgabios/vbetables.h
-tools/firmware/xen-dir/*.old
 tools/firmware/xen-dir/linkfarm.stamp*
 tools/firmware/xen-dir/xen-root
 tools/firmware/xen-dir/xen-shim
@@ -182,11 +176,8 @@ tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
-tools/libvchan/xenvchan.pc
-tools/libxc/*.pc
 tools/libxl/_libxl.api-for-check
 tools/libxl/*.api-ok
-tools/libxl/*.pc
 tools/libxl/dsdt*
 tools/libxl/libxlu_cfg_y.output
 tools/libxl/mk_dsdt
@@ -232,7 +223,6 @@ tools/xenmon/xenbaked
 tools/xenpaging/xenpaging
 tools/xenpmd/xenpmd
 tools/xenstat/libxenstat/src/_paths.h
-tools/xenstat/libxenstat/xenstat.pc
 tools/xenstat/xentop/xentop
 tools/xenstore/xenstore
 tools/xenstore/xenstore-chmod
@@ -245,7 +235,6 @@ tools/xenstore/xenstore-control
 tools/xenstore/xenstore-ls
 tools/xenstore/xenstored
 tools/xenstore/xenstored_test
-tools/xenstore/xenstore.pc
 tools/xenstore/xs_tdb_dump
 tools/xentrace/xentrace_setsize
 tools/xentrace/tbctl
@@ -253,7 +242,6 @@ tools/xentrace/xenctx
 tools/xentrace/xentrace
 xen/.banner
 xen/.config
-xen/.config.old
 xen/.xen.elf32
 xen/System.map
 xen/arch/x86/asm-macros.i
@@ -284,7 +272,6 @@ xen/include/xen/*.new
 xen/include/xen/acm_policy.h
 xen/include/xen/compile.h
 xen/include/xen/lib/x86/cpuid-autogen.h
-xen/test/livepatch/config.h
 xen/test/livepatch/expect_config.h
 xen/test/livepatch/*.livepatch
 xen/tools/symbols
@@ -327,7 +314,6 @@ tools/libxl/libxl-save-helper
 tools/libxl/test_timedereg
 tools/libxl/test_fdderegrace
 tools/firmware/etherboot/eb-roms.h
-tools/firmware/etherboot/gpxe-git-snapshot.tar.gz
 tools/libvchan/vchan-node[12]
 tools/libvchan/vchan-socket-proxy
 tools/ocaml/*/.ocamldep.make
@@ -359,7 +345,6 @@ tools/ocaml/test/list_domains
 tools/ocaml/test/dmesg
 tools/ocaml/test/raise_exception
 tools/debugger/kdd/kdd
-tools/firmware/etherboot/ipxe.tar.gz
 tools/firmware/etherboot/ipxe/
 tools/python/xen/lowlevel/xl/_pyxl_types.c
 tools/python/xen/lowlevel/xl/_pyxl_types.h
-- 


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 03/11 RFC] gitignore: Add/Generalize entries
  2020-09-02  1:08 [PATCH 03/11 RFC] gitignore: Add/Generalize entries Elliott Mitchell
@ 2020-09-24 15:44 ` Jan Beulich
  2020-09-24 21:48   ` Elliott Mitchell
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2020-09-24 15:44 UTC (permalink / raw)
  To: Elliott Mitchell
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu

On 02.09.2020 03:08, Elliott Mitchell wrote:
> @@ -33,12 +38,12 @@ cscope.po.out
>  .vscode
>  
>  dist
> -stubdom/*.tar.gz
>  
>  autom4te.cache/
>  config.log
>  config.status
>  config.cache
> +config.h
>  config/Toplevel.mk
>  config/Paths.mk

While in userland config.h may indeed be a typically generated file,
there are three source files by this name under xen/. Patch 6 also
doesn't look to override this in any way for xen/. I think this wants
to move a level down, into tools/ and wherever else it may be
applicable.

Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 03/11 RFC] gitignore: Add/Generalize entries
  2020-09-24 15:44 ` Jan Beulich
@ 2020-09-24 21:48   ` Elliott Mitchell
  2020-09-25  6:49     ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Elliott Mitchell @ 2020-09-24 21:48 UTC (permalink / raw)
  To: Jan Beulich
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu

On Thu, Sep 24, 2020 at 05:44:09PM +0200, Jan Beulich wrote:
> On 02.09.2020 03:08, Elliott Mitchell wrote:
> > @@ -33,12 +38,12 @@ cscope.po.out
> >  .vscode
> >  
> >  dist
> > -stubdom/*.tar.gz
> >  
> >  autom4te.cache/
> >  config.log
> >  config.status
> >  config.cache
> > +config.h
> >  config/Toplevel.mk
> >  config/Paths.mk
> 
> While in userland config.h may indeed be a typically generated file,
> there are three source files by this name under xen/. Patch 6 also
> doesn't look to override this in any way for xen/. I think this wants
> to move a level down, into tools/ and wherever else it may be
> applicable.

Another possibility is Git isn't as aggressive with enforcing ignores as
some other version control software is.  A file which matches a
.gitignore pattern will not show up under "Untracked files" in
`git status`; however, /modifying/ a file which is already under control,
but matches an ignore pattern *will* cause it to show up under
"Changes not staged for commit".  Git will also allow you to use
`git add -f` on a file which matches an ignore pattern.

There are already a few files in Git which have targetted matches pointed
at them, yet are still present.  Perhaps these were added by mistaken use
of `add -f`, perhaps they were deliberately added and the author missed
removing the .gitignore entry.

As such perhaps the generalized "config.h" pattern is appropriate and
move towards removing the few examples which currently exist?


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 03/11 RFC] gitignore: Add/Generalize entries
  2020-09-24 21:48   ` Elliott Mitchell
@ 2020-09-25  6:49     ` Jan Beulich
  2020-09-25 15:47       ` Elliott Mitchell
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2020-09-25  6:49 UTC (permalink / raw)
  To: Elliott Mitchell
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu

On 24.09.2020 23:48, Elliott Mitchell wrote:
> On Thu, Sep 24, 2020 at 05:44:09PM +0200, Jan Beulich wrote:
>> On 02.09.2020 03:08, Elliott Mitchell wrote:
>>> @@ -33,12 +38,12 @@ cscope.po.out
>>>  .vscode
>>>  
>>>  dist
>>> -stubdom/*.tar.gz
>>>  
>>>  autom4te.cache/
>>>  config.log
>>>  config.status
>>>  config.cache
>>> +config.h
>>>  config/Toplevel.mk
>>>  config/Paths.mk
>>
>> While in userland config.h may indeed be a typically generated file,
>> there are three source files by this name under xen/. Patch 6 also
>> doesn't look to override this in any way for xen/. I think this wants
>> to move a level down, into tools/ and wherever else it may be
>> applicable.
> 
> Another possibility is Git isn't as aggressive with enforcing ignores as
> some other version control software is.  A file which matches a
> .gitignore pattern will not show up under "Untracked files" in
> `git status`; however, /modifying/ a file which is already under control,
> but matches an ignore pattern *will* cause it to show up under
> "Changes not staged for commit".  Git will also allow you to use
> `git add -f` on a file which matches an ignore pattern.
> 
> There are already a few files in Git which have targetted matches pointed
> at them, yet are still present.  Perhaps these were added by mistaken use
> of `add -f`, perhaps they were deliberately added and the author missed
> removing the .gitignore entry.
> 
> As such perhaps the generalized "config.h" pattern is appropriate and
> move towards removing the few examples which currently exist?

I don't think so, no - new ports will similarly have asm-<arch>/config.h,
and there shouldn't be a requirement to "git add -f" them at that point.
The role of such named files really is too different to have such a top
level entry imo.

Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 03/11 RFC] gitignore: Add/Generalize entries
  2020-09-25  6:49     ` Jan Beulich
@ 2020-09-25 15:47       ` Elliott Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Elliott Mitchell @ 2020-09-25 15:47 UTC (permalink / raw)
  To: Jan Beulich
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu

On Fri, Sep 25, 2020 at 08:49:01AM +0200, Jan Beulich wrote:
> I don't think so, no - new ports will similarly have asm-<arch>/config.h,
> and there shouldn't be a requirement to "git add -f" them at that point.
> The role of such named files really is too different to have such a top
> level entry imo.

Okay.  I had thought autoconf/configure was by far the most common source
of config.h files, and thus best to have in there, but my local copies
have been adjusted.  There aren't many config.h entries so dumping an
attempt at a common pattern is quite appropriate.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-25 15:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02  1:08 [PATCH 03/11 RFC] gitignore: Add/Generalize entries Elliott Mitchell
2020-09-24 15:44 ` Jan Beulich
2020-09-24 21:48   ` Elliott Mitchell
2020-09-25  6:49     ` Jan Beulich
2020-09-25 15:47       ` Elliott Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).