All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11 v2] gitignore: Move ignores from global to subdirectories
@ 2020-08-27 19:09 Elliott Mitchell
  2020-09-10  9:13 ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Elliott Mitchell @ 2020-08-27 19:09 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, George Dunlap, Ian Jackson, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu, Doug Goldstein,
	Daniel De Graaf

Subdirectories which have .gitignore files should not be referenced in
the global .gitignore files.  Move several lines to appropriate subdirs.

When moved to the subdirectories the slash after the directory name is
left on as otherwise the names potentially become unanchored (without a
leading slash, "foo" also matches "bar/foo").

As a final step these were either sorted or formatted to match existing
file format.

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

---
Changes in v2:
- More information in commit message
- Rebased onto correct branch before submission
---
 .gitignore                   | 31 -------------------------------
 tools/misc/.gitignore        | 23 ++++++++++++++++++++++-
 xen/tools/kconfig/.gitignore |  6 ++++++
 xen/xsm/flask/.gitignore     |  9 ++++++++-
 4 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/.gitignore b/.gitignore
index 36ce2ea104..429a484ecc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -204,21 +204,6 @@ tools/libxl/ssdt*
 tools/libxl/testenum
 tools/libxl/testenum.c
 tools/libxl/tmp.*
-tools/misc/cpuperf/cpuperf-perfcntr
-tools/misc/cpuperf/cpuperf-xen
-tools/misc/xc_shadow
-tools/misc/xen_cpuperf
-tools/misc/xen-cpuid
-tools/misc/xen-detect
-tools/misc/xen-diag
-tools/misc/xen-tmem-list-parse
-tools/misc/xen-livepatch
-tools/misc/xenperf
-tools/misc/xenpm
-tools/misc/xen-hvmctx
-tools/misc/xenlockprof
-tools/misc/lowmemd
-tools/misc/xencov
 tools/pkg-config/*
 tools/qemu-xen-build
 tools/xentrace/xenalyze
@@ -315,17 +300,7 @@ 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/kconfig/.tmp_gtkcheck
-xen/tools/kconfig/.tmp_qtcheck
 xen/tools/symbols
-xen/xsm/flask/flask-policy.S
-xen/xsm/flask/include/av_perm_to_string.h
-xen/xsm/flask/include/av_permissions.h
-xen/xsm/flask/include/class_to_string.h
-xen/xsm/flask/include/flask.h
-xen/xsm/flask/include/initial_sid_to_string.h
-xen/xsm/flask/policy.*
-xen/xsm/flask/xenpolicy-*
 tools/flask/policy/policy.conf
 tools/flask/policy/xenpolicy-*
 xen/xen
@@ -357,8 +332,6 @@ tools/include/xen-foreign/arm32.h
 tools/include/xen-foreign/arm64.h
 
 .git
-tools/misc/xen-hptool
-tools/misc/xen-mfndump
 tools/libs/toolcore/include/_*.h
 tools/libxc/_*.[ch]
 tools/libxl/_*.[ch]
@@ -370,10 +343,6 @@ tools/libxl/test_timedereg
 tools/libxl/test_fdderegrace
 tools/firmware/etherboot/eb-roms.h
 tools/firmware/etherboot/gpxe-git-snapshot.tar.gz
-tools/misc/xenhypfs
-tools/misc/xenwatchdogd
-tools/misc/xen-hvmcrash
-tools/misc/xen-lowmemd
 tools/libvchan/vchan-node[12]
 tools/libvchan/vchan-socket-proxy
 tools/ocaml/*/.ocamldep.make
diff --git a/tools/misc/.gitignore b/tools/misc/.gitignore
index c5fe2cfccd..f909ceccb1 100644
--- a/tools/misc/.gitignore
+++ b/tools/misc/.gitignore
@@ -1 +1,22 @@
-xen-ucode
+/cpuperf/cpuperf-perfcntr
+/cpuperf/cpuperf-xen
+/lowmemd
+/xc_shadow
+/xen-cpuid
+/xen-detect
+/xen-diag
+/xen-hptool
+/xen-hvmcrash
+/xen-hvmctx
+/xen-livepatch
+/xen-lowmemd
+/xen-mfndump
+/xen-tmem-list-parse
+/xen-ucode
+/xen_cpuperf
+/xencov
+/xenhypfs
+/xenlockprof
+/xenperf
+/xenpm
+/xenwatchdogd
diff --git a/xen/tools/kconfig/.gitignore b/xen/tools/kconfig/.gitignore
index 9638790613..e289215d27 100644
--- a/xen/tools/kconfig/.gitignore
+++ b/xen/tools/kconfig/.gitignore
@@ -15,3 +15,9 @@ mconf
 nconf
 qconf
 gconf
+
+#
+# temporary build tool checking files
+#
+/.tmp_gtkcheck
+/.tmp_qtcheck
diff --git a/xen/xsm/flask/.gitignore b/xen/xsm/flask/.gitignore
index 024edbe0ba..f186747c51 100644
--- a/xen/xsm/flask/.gitignore
+++ b/xen/xsm/flask/.gitignore
@@ -1 +1,8 @@
-/policy.c
+/flask-policy.S
+/include/av_perm_to_string.h
+/include/av_permissions.h
+/include/class_to_string.h
+/include/flask.h
+/include/initial_sid_to_string.h
+/policy.*
+/xenpolicy-*
-- 


-- 
(\___(\___(\______          --=> 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 01/11 v2] gitignore: Move ignores from global to subdirectories
  2020-08-27 19:09 [PATCH 01/11 v2] gitignore: Move ignores from global to subdirectories Elliott Mitchell
@ 2020-09-10  9:13 ` Jan Beulich
  2020-09-10 18:22   ` Elliott Mitchell
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2020-09-10  9:13 UTC (permalink / raw)
  To: Elliott Mitchell
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, Doug Goldstein,
	Daniel De Graaf

On 27.08.2020 21:09, Elliott Mitchell wrote:
> --- a/tools/misc/.gitignore
> +++ b/tools/misc/.gitignore
> @@ -1 +1,22 @@
> -xen-ucode
> +/cpuperf/cpuperf-perfcntr
> +/cpuperf/cpuperf-xen
> +/lowmemd
> +/xc_shadow
> +/xen-cpuid
> +/xen-detect
> +/xen-diag
> +/xen-hptool
> +/xen-hvmcrash
> +/xen-hvmctx
> +/xen-livepatch
> +/xen-lowmemd
> +/xen-mfndump
> +/xen-tmem-list-parse
> +/xen-ucode
> +/xen_cpuperf
> +/xencov
> +/xenhypfs
> +/xenlockprof
> +/xenperf
> +/xenpm
> +/xenwatchdogd

The earlier discussion had left me with the impression that the ./
form would be slightly better to use to avoid puzzling the
occasional reader. Did I overlook or mis-interpret anything? Did you
come to the conclusion that / is better, but forgot to mention the
"why" in at least the cover letter?

Jan


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

* Re: [PATCH 01/11 v2] gitignore: Move ignores from global to subdirectories
  2020-09-10  9:13 ` Jan Beulich
@ 2020-09-10 18:22   ` Elliott Mitchell
  2020-09-11  6:29     ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Elliott Mitchell @ 2020-09-10 18:22 UTC (permalink / raw)
  To: Jan Beulich
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, Doug Goldstein,
	Daniel De Graaf

On Thu, Sep 10, 2020 at 11:13:26AM +0200, Jan Beulich wrote:
> On 27.08.2020 21:09, Elliott Mitchell wrote:
> > --- a/tools/misc/.gitignore
> > +++ b/tools/misc/.gitignore
> > @@ -1 +1,22 @@
> > -xen-ucode
> > +/cpuperf/cpuperf-perfcntr
> > +/cpuperf/cpuperf-xen
> > +/lowmemd
> > +/xc_shadow
> > +/xen-cpuid
> > +/xen-detect
> > +/xen-diag
> > +/xen-hptool
> > +/xen-hvmcrash
> > +/xen-hvmctx
> > +/xen-livepatch
> > +/xen-lowmemd
> > +/xen-mfndump
> > +/xen-tmem-list-parse
> > +/xen-ucode
> > +/xen_cpuperf
> > +/xencov
> > +/xenhypfs
> > +/xenlockprof
> > +/xenperf
> > +/xenpm
> > +/xenwatchdogd
> 
> The earlier discussion had left me with the impression that the ./
> form would be slightly better to use to avoid puzzling the
> occasional reader. Did I overlook or mis-interpret anything? Did you
> come to the conclusion that / is better, but forgot to mention the
> "why" in at least the cover letter?

Some of Xen's documentation isn't that great, even though most of `git`'s
documentation is quite good a few pieces aren't so great.  The
information on how .gitignore files are treated is less than wonderful.

I had *thought* "./" would restrict to capturing files in the current
directory, but after some testing and then some reading of the
documentation (oh, `git check-ignore` is a thing).  Then reading the
documentation again.  Then reading the documentation *again*.  I found an
initial "/" restricts a pattern to the current directory, but `git`
doesn't handle "./".

Apparently a pattern with a slash *anywhere* besides the *end* (which
includes the very start) will be treated as a full path relative to the
current directory.  As such "foo/bar" and "/foo/bar" are equivalent.  Yet
"foo" and "/foo" are *not* equivalent.

Meanwhile a slash at the end tells `git` to *only* match a directory.

Then you have "**" which will match zero or more directories.


-- 
(\___(\___(\______          --=> 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 01/11 v2] gitignore: Move ignores from global to subdirectories
  2020-09-10 18:22   ` Elliott Mitchell
@ 2020-09-11  6:29     ` Jan Beulich
  2020-09-11 17:41       ` Elliott Mitchell
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2020-09-11  6:29 UTC (permalink / raw)
  To: Elliott Mitchell
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, Doug Goldstein,
	Daniel De Graaf

On 10.09.2020 20:22, Elliott Mitchell wrote:
> On Thu, Sep 10, 2020 at 11:13:26AM +0200, Jan Beulich wrote:
>> On 27.08.2020 21:09, Elliott Mitchell wrote:
>>> --- a/tools/misc/.gitignore
>>> +++ b/tools/misc/.gitignore
>>> @@ -1 +1,22 @@
>>> -xen-ucode
>>> +/cpuperf/cpuperf-perfcntr
>>> +/cpuperf/cpuperf-xen
>>> +/lowmemd
>>> +/xc_shadow
>>> +/xen-cpuid
>>> +/xen-detect
>>> +/xen-diag
>>> +/xen-hptool
>>> +/xen-hvmcrash
>>> +/xen-hvmctx
>>> +/xen-livepatch
>>> +/xen-lowmemd
>>> +/xen-mfndump
>>> +/xen-tmem-list-parse
>>> +/xen-ucode
>>> +/xen_cpuperf
>>> +/xencov
>>> +/xenhypfs
>>> +/xenlockprof
>>> +/xenperf
>>> +/xenpm
>>> +/xenwatchdogd
>>
>> The earlier discussion had left me with the impression that the ./
>> form would be slightly better to use to avoid puzzling the
>> occasional reader. Did I overlook or mis-interpret anything? Did you
>> come to the conclusion that / is better, but forgot to mention the
>> "why" in at least the cover letter?
> 
> Some of Xen's documentation isn't that great, even though most of `git`'s
> documentation is quite good a few pieces aren't so great.  The
> information on how .gitignore files are treated is less than wonderful.
> 
> I had *thought* "./" would restrict to capturing files in the current
> directory, but after some testing and then some reading of the
> documentation (oh, `git check-ignore` is a thing).  Then reading the
> documentation again.  Then reading the documentation *again*.  I found an
> initial "/" restricts a pattern to the current directory, but `git`
> doesn't handle "./".
> 
> Apparently a pattern with a slash *anywhere* besides the *end* (which
> includes the very start) will be treated as a full path relative to the
> current directory.  As such "foo/bar" and "/foo/bar" are equivalent.  Yet
> "foo" and "/foo" are *not* equivalent.

But then ./foo and /foo ought to be equivalent, too. Unless of
course the . gets in the way of matching names in the first
place ...

Jan


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

* Re: [PATCH 01/11 v2] gitignore: Move ignores from global to subdirectories
  2020-09-11  6:29     ` Jan Beulich
@ 2020-09-11 17:41       ` Elliott Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Elliott Mitchell @ 2020-09-11 17:41 UTC (permalink / raw)
  To: Jan Beulich
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, Doug Goldstein,
	Daniel De Graaf

On Fri, Sep 11, 2020 at 08:29:51AM +0200, Jan Beulich wrote:
> On 10.09.2020 20:22, Elliott Mitchell wrote:
> > I had *thought* "./" would restrict to capturing files in the current
> > directory, but after some testing and then some reading of the
> > documentation (oh, `git check-ignore` is a thing).  Then reading the
> > documentation again.  Then reading the documentation *again*.  I found an
> > initial "/" restricts a pattern to the current directory, but `git`
> > doesn't handle "./".
> > 
> > Apparently a pattern with a slash *anywhere* besides the *end* (which
> > includes the very start) will be treated as a full path relative to the
> > current directory.  As such "foo/bar" and "/foo/bar" are equivalent.  Yet
> > "foo" and "/foo" are *not* equivalent.
> 
> But then ./foo and /foo ought to be equivalent, too. Unless of
> course the . gets in the way of matching names in the first
> place ...

Could be something along those lines.  Note gitignore is a function of
*git* *simulating* the actions involved in accessing files, not something
pretending to be all that close to an actual kernel implementation.

The result is testing with `git check-ignore` indicated "./" did not
work, so I had to use "/" which looks odd in a suspicions way.  I rather
liked "./", but with reality intruding.


-- 
(\___(\___(\______          --=> 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-11 17:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 19:09 [PATCH 01/11 v2] gitignore: Move ignores from global to subdirectories Elliott Mitchell
2020-09-10  9:13 ` Jan Beulich
2020-09-10 18:22   ` Elliott Mitchell
2020-09-11  6:29     ` Jan Beulich
2020-09-11 17:41       ` Elliott Mitchell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.