Skip to content

Commit

Permalink
Fix marking gix-packetline-blocking copy auto-generated
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Nov 18, 2024
1 parent b06f729 commit 325588e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions gix-config/tests/.gitattributes
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion gix-config/tests/fixtures/fuzzed/.gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.config -text -eof
*.config -text
2 changes: 1 addition & 1 deletion gix-object/tests/fixtures/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# assure newlines aren't butchered as they matter for testing
**/*.txt text crlf=input eol=lf
*.txt text eol=lf
2 changes: 1 addition & 1 deletion gix-protocol/tests/fixtures/.gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
** -text
* -text

0 comments on commit 325588e

Please sign in to comment.