Skip to contentSkip to conversation

.gitignore: add section header comments

PATCH Superseded Bruce Richardson 4 participants 15 messages Mar 6, 2019 – Mar 13, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 .gitignore: add section header comments

Split the ignored file list into section based on logical groups of files, putting a comment at the top of each section clarifying what it is.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -0
index 9105e26c5..b23e1dbb7 100644
@@ -1,9 +1,12 @@
+# ignore generated documentation tables
 doc/guides/nics/overview_table.txt
 doc/guides/cryptodevs/overview_feature_table.txt
 doc/guides/cryptodevs/overview_cipher_table.txt
 doc/guides/cryptodevs/overview_auth_table.txt
 doc/guides/cryptodevs/overview_aead_table.txt
 doc/guides/compressdevs/overview_feature_table.txt
+
+# ignore generated ctags/cscope files
 cscope.out.po
 cscope.out.in
 cscope.out
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/4 .gitignore: ignore python bytecode files

After you run a python script, a .pyc file is often left behind, which we don't want to track in git.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -0
index b23e1dbb7..eb3c23705 100644
@@ -16,3 +16,6 @@ GPATH
 GRTAGS
 tags
 TAGS
+
+# ignore python bytecode files
+*.pyc
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/4 .gitignore: ignore hidden files

In reply to Bruce Richardson

Generally hidden files are hidden for good reason and we don't want to track them in git. They can always be manually added to git tracking individually if needed.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -0
index eb3c23705..79509c35d 100644
@@ -19,3 +19,6 @@ TAGS
 
 # ignore python bytecode files
 *.pyc
+
+# ignore hidden files
+.*
Signature · 1 line
2.20.1
#3 lore raw

PATCH 4/4 .gitignore: ignore build directories from test-meson-build

In reply to Bruce Richardson

test-meson-build.sh generates multiple build directories for various targets. As these follow a few known patterns of reasonable lengths, and since they don't need to be tracked in git, we can add them to the gitignore file.

---
 .gitignore | 6 ++++++
 1 file changed, 6 insertions(+)
.gitignore +6 -0
index 79509c35d..e10605c4b 100644
@@ -22,3 +22,9 @@ TAGS
 
 # ignore hidden files
 .*
+
+# ignore build directories from test-meson-builds
+build-arm64-*
+build-clang-*
+build-gcc-*
+build-x86-default
Signature · 1 line
2.20.1
#4 lore raw

Re: [PATCH 4/4] .gitignore: ignore build directories from test-meson-build

06/03/2019 18:05, Bruce Richardson:

.gitignore TAGS · line 30

Quoted 13 lines

test-meson-build.sh generates multiple build directories for various targets. As these follow a few known patterns of reasonable lengths, and since they don't need to be tracked in git, we can add them to the gitignore file.

---

.gitignore +4 -0
+build-arm64-*
+build-clang-*
+build-gcc-*
+build-x86-default

We could even ignore build-* ?

#5 lore raw

Re: [PATCH 4/4] .gitignore: ignore build directories from test-meson-build

Quoted 6 lines · On Sat, 09 Mar 2019 01:47:32 +0100 Thomas Monjalon <[email protected]> wrote:

06/03/2019 18:05, Bruce Richardson:

Quoted 5 lines

test-meson-build.sh generates multiple build directories for various targets. As these follow a few known patterns of reasonable lengths, and since they don't need to be tracked in git, we can add them to the gitignore file.

Quoted 12 lines

.gitignore TAGS · line 30

Quoted 8 lines

---

.gitignore +4 -0
+build-arm64-*
+build-clang-*
+build-gcc-*
+build-x86-default  

We could even ignore build-* ?

Why not?
build*

Since the default build directory in build/

#6 lore raw

Re: [PATCH 4/4] .gitignore: ignore build directories from test-meson-build

09/03/2019 04:03, Stephen Hemminger:

Quoted 20 lines
Quoted 6 lines · On Sat, 09 Mar 2019 01:47:32 +0100 Thomas Monjalon <[email protected]> wrote:

06/03/2019 18:05, Bruce Richardson:

Quoted 5 lines

test-meson-build.sh generates multiple build directories for various targets. As these follow a few known patterns of reasonable lengths, and since they don't need to be tracked in git, we can add them to the gitignore file.

Quoted 10 lines

.gitignore TAGS · line 30

Quoted 8 lines

---

.gitignore +4 -0
+build-arm64-*
+build-clang-*
+build-gcc-*
+build-x86-default  

We could even ignore build-* ?

Quoted 4 lines

Why not?
build*

Since the default build directory in build/

Yes, but "git ls build*" is not empty because of buildtools/ Could be "build" and "build-*".

#7 lore raw

Re: [PATCH 4/4] .gitignore: ignore build directories from test-meson-build

Quoted 4 lines

Thomas Monjalon <[email protected]> wrote:

Yes, but "git ls build*" is not empty because of buildtools/ Could be "build" and "build-*".

+1

Quoted 5 lines
#8 lore raw

Re: [PATCH 4/4] .gitignore: ignore build directories from test-meson-build

Quoted 5 lines · Rami Rosen
Quoted 3 lines

Thomas Monjalon <[1][email protected]> wrote:
Yes, but "git ls build*" is not empty because of buildtools/ Could be "build" and "build-*".

+1

Ok. I didn't want to be too liberal in my wildcarding hence the set I provided, but I'll do a V2 with this sorter version, since it makes sense and is unlikely to cause us issues.

/Bruce

#9 lore raw

PATCH v2 1/4 .gitignore: add section header comments

In reply to Bruce Richardson

Split the ignored file list into section based on logical groups of files, putting a comment at the top of each section clarifying what it is.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -0
index 9105e26c5..b23e1dbb7 100644
@@ -1,9 +1,12 @@
+# ignore generated documentation tables
 doc/guides/nics/overview_table.txt
 doc/guides/cryptodevs/overview_feature_table.txt
 doc/guides/cryptodevs/overview_cipher_table.txt
 doc/guides/cryptodevs/overview_auth_table.txt
 doc/guides/cryptodevs/overview_aead_table.txt
 doc/guides/compressdevs/overview_feature_table.txt
+
+# ignore generated ctags/cscope files
 cscope.out.po
 cscope.out.in
 cscope.out
Signature · 1 line
2.20.1
#10 lore raw

PATCH v2 2/4 .gitignore: ignore python bytecode files

After you run a python script, a .pyc file is often left behind, which we don't want to track in git.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -0
index b23e1dbb7..eb3c23705 100644
@@ -16,3 +16,6 @@ GPATH
 GRTAGS
 tags
 TAGS
+
+# ignore python bytecode files
+*.pyc
Signature · 1 line
2.20.1
#11 lore raw

PATCH v2 3/4 .gitignore: ignore hidden files

In reply to Bruce Richardson

Generally hidden files are hidden for good reason and we don't want to track them in git. They can always be manually added to git tracking individually if needed.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -0
index eb3c23705..79509c35d 100644
@@ -19,3 +19,6 @@ TAGS
 
 # ignore python bytecode files
 *.pyc
+
+# ignore hidden files
+.*
Signature · 1 line
2.20.1
#12 lore raw

PATCH v2 4/4 .gitignore: ignore build directories

In reply to Bruce Richardson

test-meson-build.sh generates multiple build directories for various targets. As these follow a known pattern, and since they don't need to be tracked in git, we can add them to the gitignore file, along with the default build directory "build".

---
 .gitignore | 4 ++++
 1 file changed, 4 insertions(+)
.gitignore +4 -0
index 79509c35d..73822ae5e 100644
@@ -22,3 +22,7 @@ TAGS
 
 # ignore hidden files
 .*
+
+# ignore default build directory, and directories from test-meson-builds.sh
+build
+build-*
Signature · 1 line
2.20.1