Skip to content

Commit 6230972

Browse files
Hide git diff for t/*.data files
While technically ASCII text files, git makes the questionable decision to show text diffs on t/*.data files. But these diffs are very big and noisy, which can slow down some tooling to a crawl, and they make little sense to a human reader anyway because it’s mostly just binary encoded in Base64. This commit instructs Git to treat these data files as if they were binary. From the gitattributes(5) man page: > Git usually guesses correctly whether a blob contains text or binary > data by examining the beginning of the contents. However, sometimes > you may want to override its decision, either because a blob contains > binary data later in the file, or because the content, while > technically composed of text characters, is opaque to a human reader. > For example, many postscript files contain only ASCII characters, but > produce noisy and meaningless diffs.
1 parent 960df9e commit 6230972

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# While technically text, diffs are meaningless on test data files.
2+
t/*.data -diff

0 commit comments

Comments
 (0)