Skip to contentSkip to conversation

gitignore: sort file

PATCH In review Lucas De Marchi 3 participants 9 messages Oct 15, 2018 – Dec 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gitignore: sort file

LANG=C sort -u .gitignore | sponge .gitignore

This way it's easier to keep track of the entries.

---
 .gitignore | 56 +++++++++++++++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)
.gitignore +28 -28
index d51e619b..49cced50 100644
@@ -1,6 +1,3 @@
-bsd-core/*/@
-bsd-core/*/machine
-*~
 *.1
 *.3
 *.5
@@ -17,17 +14,20 @@ bsd-core/*/machine
 *.o.cmd
 *.sw?
 *.trs
+*~
+.*check*
+.*install*
 .depend
 .deps
 .libs
 .tmp_versions
-.*check*
-.*install*
 Makefile
 Makefile.in
 TAGS
 aclocal.m4
 autom4te.cache
+bsd-core/*/@
+bsd-core/*/machine
 build-aux
 bus_if.h
 compile
@@ -47,21 +47,22 @@ drm_pciids.h
 export_syms
 i915.kld
 install-sh
-libdrm/config.h.in
 libdrm.pc
+libdrm/config.h.in
+libdrm_amdgpu.pc
+libdrm_etnaviv.pc
+libdrm_exynos.pc
+libdrm_freedreno.pc
 libdrm_intel.pc
 libdrm_nouveau.pc
-libdrm_radeon.pc
 libdrm_omap.pc
-libdrm_exynos.pc
-libdrm_freedreno.pc
-libdrm_amdgpu.pc
+libdrm_radeon.pc
 libdrm_vc4.pc
-libdrm_etnaviv.pc
 libkms.pc
 libtool
 ltmain.sh
 mach64.kld
+man/*.3
 man/.man_fixup
 mga.kld
 missing
@@ -74,35 +75,34 @@ savage.kld
 sis.kld
 stamp-h1
 tdfx.kld
-via.kld
-tests/auth
 tests/amdgpu/amdgpu_test
+tests/auth
 tests/dristat
 tests/drmdevice
 tests/drmsl
 tests/drmstat
+tests/etnaviv/etnaviv_2d_test
+tests/etnaviv/etnaviv_bo_cache_test
+tests/etnaviv/etnaviv_cmd_stream_test
+tests/exynos/exynos_fimg2d_event
+tests/exynos/exynos_fimg2d_perf
+tests/exynos/exynos_fimg2d_test
 tests/getclient
 tests/getstats
 tests/getversion
 tests/hash
+tests/kms/kms-steal-crtc
+tests/kms/kms-universal-planes
+tests/kmstest/kmstest
 tests/lock
-tests/openclose
-tests/random
-tests/setversion
-tests/updatedraw
 tests/modeprint/modeprint
 tests/modetest/modetest
 tests/name_from_fd
+tests/openclose
 tests/proptest/proptest
-tests/kms/kms-steal-crtc
-tests/kms/kms-universal-planes
-tests/kmstest/kmstest
-tests/vbltest/vbltest
 tests/radeon/radeon_ttm
-tests/exynos/exynos_fimg2d_event
-tests/exynos/exynos_fimg2d_perf
-tests/exynos/exynos_fimg2d_test
-tests/etnaviv/etnaviv_2d_test
-tests/etnaviv/etnaviv_cmd_stream_test
-tests/etnaviv/etnaviv_bo_cache_test
-man/*.3
+tests/random
+tests/setversion
+tests/updatedraw
+tests/vbltest/vbltest
+via.kld
Signature · 6 lines
2.19.1.1.g8c3cf03f71

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 gitignore: add _build

This is the directory used by meson/autotools (at least in the .gitlab-ci configuration) so ignore the whole dir.

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 49cced50..54365c7c 100644
@@ -24,6 +24,7 @@
 Makefile
 Makefile.in
 TAGS
+_build
 aclocal.m4
 autom4te.cache
 bsd-core/*/@
Signature · 6 lines
2.19.1.1.g8c3cf03f71

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Re: [PATCH libdrm 2/2] gitignore: add _build

Quoted 2 lines · Lucas De Marchi

This is the directory used by meson/autotools (at least in the .gitlab-ci configuration) so ignore the whole dir.

This is extremely specific to this one case; what does this change for the gitlab ci?

Quoted 25 lines
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 49cced50..54365c7c 100644
@@ -24,6 +24,7 @@
 Makefile
 Makefile.in
 TAGS
+_build
 aclocal.m4
 autom4te.cache
 bsd-core/*/@
Signature · 6 lines
2.19.1.1.g8c3cf03f71

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Re: [PATCH libdrm 2/2] gitignore: add _build

Quoted 6 lines · Eric Engestrom
Quoted 2 lines · Lucas De Marchi

This is the directory used by meson/autotools (at least in the .gitlab-ci configuration) so ignore the whole dir.

This is extremely specific to this one case; what does this change for the gitlab ci?

In order to test locally my changes I always copy and paste the line from the CI configuration. And there we are using _build. Maybe we
should be using build there and add it to gitignore? We ignore .o, .lo, .libs, .deps and build-aux dir. IMO we should ignore the whole build dir now that we build out of tree - and _build (or build) dir is the most common to use.

And it looks like I forgot one patch adding patches/ to the gitignore as well (it was what made me look into the gitignore in the first place) :-/. Same reason as why it was applied to igt for example: it's common to have a patches/ directory to maintain wip patches.

Lucas De Marchi

Quoted 22 lines
Quoted 22 lines
---
  .gitignore | 1 +
  1 file changed, 1 insertion(+)
.gitignore +1 -0
index 49cced50..54365c7c 100644
@@ -24,6 +24,7 @@
  Makefile
  Makefile.in
  TAGS
+_build
  aclocal.m4
  autom4te.cache
  bsd-core/*/@
Signature · 1 line
2.19.1.1.g8c3cf03f71
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Re: [PATCH libdrm 2/2] gitignore: add _build

Quoted 10 lines · Lucas De Marchi
Quoted 6 lines · Eric Engestrom
Quoted 2 lines · Lucas De Marchi

This is the directory used by meson/autotools (at least in the .gitlab-ci configuration) so ignore the whole dir.

This is extremely specific to this one case; what does this change for the gitlab ci?

In order to test locally my changes I always copy and paste the line from the CI configuration. And there we are using _build.

I understand better now, thanks :)

Quoted 5 lines

Maybe we
should be using build there and add it to gitignore? We ignore .o, .lo, .libs, .deps and build-aux dir. IMO we should ignore the whole build dir now that we build out of tree - and _build (or build) dir is the most common to use.

Those were autotools-generated files with partially-predictable names that were scattered across the source directory; this is considered bad practice nowadays and modern build systems don't do that anymore, instead letting the user choose a directory and putting everything in there. We could add all of these scattered generated files to the .gitignore, because we knew what the filenames looked like.

With the new method, each user puts their build in their chosen folder, and while most of us usually chose something with "build" in the name, there is no structure to this anymore. It's best to simply add your preferred build-dir-naming-scheme to your clone's ignore list (.git/info/exclude), which I think is what most of us do (mine has a /build-*/ line for instance). You can also look at core.excludesfile if you want to add a global .gitignore for your machine.

That said, adding one more line to this file doesn't hurt, so you can do that if you want, I'm not nack'ing it, but we just can't open the door to everyone adding their own personal naming scheme to the upstream .gitignore :)

Quoted 30 lines

And it looks like I forgot one patch adding patches/ to the gitignore as well (it was what made me look into the gitignore in the first place) :-/. Same reason as why it was applied to igt for example: it's common to have a patches/ directory to maintain wip patches.

Lucas De Marchi

Quoted 22 lines
Quoted 22 lines
---
  .gitignore | 1 +
  1 file changed, 1 insertion(+)
.gitignore +1 -0
index 49cced50..54365c7c 100644
@@ -24,6 +24,7 @@
  Makefile
  Makefile.in
  TAGS
+_build
  aclocal.m4
  autom4te.cache
  bsd-core/*/@
Signature · 1 line
2.19.1.1.g8c3cf03f71
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

Re: [PATCH libdrm 2/2] gitignore: add _build

Quoted 20 lines · Eric Engestrom
Quoted 10 lines · Lucas De Marchi
Quoted 6 lines · Eric Engestrom
Quoted 2 lines · Lucas De Marchi

This is the directory used by meson/autotools (at least in the .gitlab-ci configuration) so ignore the whole dir.

This is extremely specific to this one case; what does this change for the gitlab ci?

In order to test locally my changes I always copy and paste the line from the CI configuration. And there we are using _build.

I understand better now, thanks :)

Quoted 5 lines

Maybe we
should be using build there and add it to gitignore? We ignore .o, .lo, .libs, .deps and build-aux dir. IMO we should ignore the whole build dir now that we build out of tree - and _build (or build) dir is the most common to use.

Quoted 6 lines

Those were autotools-generated files with partially-predictable names that were scattered across the source directory; this is considered bad practice nowadays and modern build systems don't do that anymore, instead letting the user choose a directory and putting everything in there. We could add all of these scattered generated files to the .gitignore, because we knew what the filenames looked like.

yeah, my point is entirely like we should support the new build system just like or better than we support the old one.

Quoted 8 lines

With the new method, each user puts their build in their chosen folder, and while most of us usually chose something with "build" in the name, there is no structure to this anymore. It's best to simply add your preferred build-dir-naming-scheme to your clone's ignore list (.git/info/exclude), which I think is what most of us do (mine has a /build-*/ line for instance). You can also look at core.excludesfile if you want to add a global .gitignore for your machine.

I think that for specific cases that are different from what the majority use (or at least what we have documented) could go indeed in that file. No reason to make it always go there IMO.

Quoted 5 lines

That said, adding one more line to this file doesn't hurt, so you can do that if you want, I'm not nack'ing it, but we just can't open the door to everyone adding their own personal naming scheme to the upstream .gitignore :)

Agree. So what could we add to the .gitignore?

_build (what we have in CI)
build (what a lot of people use)
builddir (what we have in the README)

or
/_build*
/build*

to cover all the common uses (and guarantee it's ignored only in the git root dir)

Lucas De Marchi

Quoted 31 lines
Quoted 31 lines

And it looks like I forgot one patch adding patches/ to the gitignore as well (it was what made me look into the gitignore in the first place) :-/. Same reason as why it was applied to igt for example: it's common to have a patches/ directory to maintain wip patches.

Lucas De Marchi

Quoted 22 lines
Quoted 22 lines
---
  .gitignore | 1 +
  1 file changed, 1 insertion(+)
.gitignore +1 -0
index 49cced50..54365c7c 100644
@@ -24,6 +24,7 @@
  Makefile
  Makefile.in
  TAGS
+_build
  aclocal.m4
  autom4te.cache
  bsd-core/*/@
Signature · 1 line
2.19.1.1.g8c3cf03f71
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

Re: [PATCH libdrm 2/2] gitignore: add _build

Quoted 11 lines · Emil Velikov
Quoted 5 lines · Lucas De Marchi

/_build*
/build*

These two sound perfectly reasonable IMHO. They will catch vast majority of use-cases.

With that the series is:

Pushed, thanks

Lucas De Marchi

Quoted 2 lines

-Emil

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Acked-by on v1 1/2
#8 lore raw
In reply to Lucas De Marchi
Quoted 5 lines · Lucas De Marchi

LANG=C sort -u .gitignore | sponge .gitignore

This way it's easier to keep track of the entries.

Sure, why not:

Quoted 126 lines
---
 .gitignore | 56 +++++++++++++++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)
.gitignore +28 -28
index d51e619b..49cced50 100644
@@ -1,6 +1,3 @@
-bsd-core/*/@
-bsd-core/*/machine
-*~
 *.1
 *.3
 *.5
@@ -17,17 +14,20 @@ bsd-core/*/machine
 *.o.cmd
 *.sw?
 *.trs
+*~
+.*check*
+.*install*
 .depend
 .deps
 .libs
 .tmp_versions
-.*check*
-.*install*
 Makefile
 Makefile.in
 TAGS
 aclocal.m4
 autom4te.cache
+bsd-core/*/@
+bsd-core/*/machine
 build-aux
 bus_if.h
 compile
@@ -47,21 +47,22 @@ drm_pciids.h
 export_syms
 i915.kld
 install-sh
-libdrm/config.h.in
 libdrm.pc
+libdrm/config.h.in
+libdrm_amdgpu.pc
+libdrm_etnaviv.pc
+libdrm_exynos.pc
+libdrm_freedreno.pc
 libdrm_intel.pc
 libdrm_nouveau.pc
-libdrm_radeon.pc
 libdrm_omap.pc
-libdrm_exynos.pc
-libdrm_freedreno.pc
-libdrm_amdgpu.pc
+libdrm_radeon.pc
 libdrm_vc4.pc
-libdrm_etnaviv.pc
 libkms.pc
 libtool
 ltmain.sh
 mach64.kld
+man/*.3
 man/.man_fixup
 mga.kld
 missing
@@ -74,35 +75,34 @@ savage.kld
 sis.kld
 stamp-h1
 tdfx.kld
-via.kld
-tests/auth
 tests/amdgpu/amdgpu_test
+tests/auth
 tests/dristat
 tests/drmdevice
 tests/drmsl
 tests/drmstat
+tests/etnaviv/etnaviv_2d_test
+tests/etnaviv/etnaviv_bo_cache_test
+tests/etnaviv/etnaviv_cmd_stream_test
+tests/exynos/exynos_fimg2d_event
+tests/exynos/exynos_fimg2d_perf
+tests/exynos/exynos_fimg2d_test
 tests/getclient
 tests/getstats
 tests/getversion
 tests/hash
+tests/kms/kms-steal-crtc
+tests/kms/kms-universal-planes
+tests/kmstest/kmstest
 tests/lock
-tests/openclose
-tests/random
-tests/setversion
-tests/updatedraw
 tests/modeprint/modeprint
 tests/modetest/modetest
 tests/name_from_fd
+tests/openclose
 tests/proptest/proptest
-tests/kms/kms-steal-crtc
-tests/kms/kms-universal-planes
-tests/kmstest/kmstest
-tests/vbltest/vbltest
 tests/radeon/radeon_ttm
-tests/exynos/exynos_fimg2d_event
-tests/exynos/exynos_fimg2d_perf
-tests/exynos/exynos_fimg2d_test
-tests/etnaviv/etnaviv_2d_test
-tests/etnaviv/etnaviv_cmd_stream_test
-tests/etnaviv/etnaviv_bo_cache_test
-man/*.3
+tests/random
+tests/setversion
+tests/updatedraw
+tests/vbltest/vbltest
+via.kld
Signature · 6 lines
2.19.1.1.g8c3cf03f71

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel