From 325588e700ec159e5139beb149127c947164fb98 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 18 Nov 2024 15:34:31 -0500 Subject: [PATCH] Fix marking `gix-packetline-blocking` copy auto-generated In c957ab8 (#1340), I intended to mark the contents of `gix-packetline-blocking/src` as auto-generated for github-linguist, but I did not do so correctly, because giving the directory as a path does not specify the `linguist-generated` attribute as being unset for the contents. This fixes that. The bug, and fix, is revealed by comparing the output of `github-linguist --breakdown` before and after this: --- a 2024-11-18 15:45:57.376285107 -0500 +++ b 2024-11-18 15:46:44.808328857 -0500 @@ -1,6 +1,6 @@ -94.14% Rust -4.58% Shell -1.19% HTML +94.08% Rust +4.63% Shell +1.20% HTML 0.09% Makefile Makefile: @@ -682,23 +682,6 @@ gix-pack/tests/pack/multi_index/mod.rs gix-pack/tests/pack/multi_index/verify.rs gix-pack/tests/pack/multi_index/write.rs -gix-packetline-blocking/src/decode.rs -gix-packetline-blocking/src/encode/async_io.rs -gix-packetline-blocking/src/encode/blocking_io.rs -gix-packetline-blocking/src/encode/mod.rs -gix-packetline-blocking/src/lib.rs -gix-packetline-blocking/src/line/async_io.rs -gix-packetline-blocking/src/line/blocking_io.rs -gix-packetline-blocking/src/line/mod.rs -gix-packetline-blocking/src/read/async_io.rs -gix-packetline-blocking/src/read/blocking_io.rs -gix-packetline-blocking/src/read/mod.rs -gix-packetline-blocking/src/read/sidebands/async_io.rs -gix-packetline-blocking/src/read/sidebands/blocking_io.rs -gix-packetline-blocking/src/read/sidebands/mod.rs -gix-packetline-blocking/src/write/async_io.rs -gix-packetline-blocking/src/write/blocking_io.rs -gix-packetline-blocking/src/write/mod.rs gix-packetline/src/decode.rs gix-packetline/src/encode/async_io.rs gix-packetline/src/encode/blocking_io.rs (The test was done on Ubuntu 18.04 LTS ESM with `github-linguist` provided by the `ruby-github-linguist` package, version 5.3.3-1.) In addition to fixing that, this also simplifies `.gitattributes` files throughout the repository. This simplification includes removing redundant `clrf=input` (discussed in #1676) and a spurious unrecognized `-eof` (see #1689), changing lone `**` to `*` where equivalent, and some other changes. This also makes the style of `.gitattributes` files more consistent, using `foo`/`-foo` rather than `foo=true`/`foo=false` everywhere even where both work, and using whitespace more consistently. --- .gitattributes | 8 ++++---- gix-config/tests/.gitattributes | 3 --- gix-config/tests/fixtures/fuzzed/.gitattributes | 2 +- gix-object/tests/fixtures/.gitattributes | 2 +- gix-protocol/tests/fixtures/.gitattributes | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.gitattributes b/.gitattributes index cd5c10a80a7..1e27c87b7f1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,11 +1,11 @@ **/generated-archives/*.tar* filter=lfs-disabled diff=lfs merge=lfs -text # assure line feeds don't interfere with our working copy hash -*.sh text crlf=input eol=lf -justfile text crlf=input eol=lf +*.sh text eol=lf +justfile text eol=lf # have GitHub include fixture-making scripts when it counts code -**/tests/fixtures/**/*.sh linguist-vendored=false +**/tests/fixtures/**/*.sh -linguist-vendored # have GitHub treat the gix-packetline-blocking src copy as auto-generated -gix-packetline-blocking/src/ linguist-generated=true +/gix-packetline-blocking/src/**/* linguist-generated diff --git a/gix-config/tests/.gitattributes b/gix-config/tests/.gitattributes index 272372614d0..87deb5b9860 100644 --- a/gix-config/tests/.gitattributes +++ b/gix-config/tests/.gitattributes @@ -1,4 +1 @@ -# assure line feeds don't interfere with our working copy hash -/fixtures/**/* text eol=lf /fixtures/repo-config.crlf text eol=crlf - diff --git a/gix-config/tests/fixtures/fuzzed/.gitattributes b/gix-config/tests/fixtures/fuzzed/.gitattributes index b375b71449f..4f0db19a454 100644 --- a/gix-config/tests/fixtures/fuzzed/.gitattributes +++ b/gix-config/tests/fixtures/fuzzed/.gitattributes @@ -1 +1 @@ -*.config -text -eof +*.config -text diff --git a/gix-object/tests/fixtures/.gitattributes b/gix-object/tests/fixtures/.gitattributes index 053ee009e4d..f0cc492d0a9 100644 --- a/gix-object/tests/fixtures/.gitattributes +++ b/gix-object/tests/fixtures/.gitattributes @@ -1,2 +1,2 @@ # assure newlines aren't butchered as they matter for testing -**/*.txt text crlf=input eol=lf +*.txt text eol=lf diff --git a/gix-protocol/tests/fixtures/.gitattributes b/gix-protocol/tests/fixtures/.gitattributes index b746772b6cd..fa1385d99a3 100644 --- a/gix-protocol/tests/fixtures/.gitattributes +++ b/gix-protocol/tests/fixtures/.gitattributes @@ -1 +1 @@ -** -text +* -text