Skip to contentSkip to conversation

gitattributes: dont treat non-text files as text

PATCH New Veeraiyan Chidambaram 2 participants 2 messages Nov 8, 2019 – Nov 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 gitattributes: dont treat non-text files as text

From: Vignesh Rajendran <[email protected]>

With recent update in u-boot gitattributes all files are treated as regular text files. This creates problems with special files and repo always shows uncommitted files like below.

Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   tools/logos/compulab.bmp
	modified:   tools/logos/denx-comp.bmp
	modified:   tools/logos/toradex.bmp

To fix above problem special files bmp/ttf files are treated as binary files in the gitattributes.

---
 .gitattributes | 3 +++
 1 file changed, 3 insertions(+)
.gitattributes +3 -0
index 8560b794c0a7..899473ab0fbb 100644
@@ -1,2 +1,5 @@
 # Declare files that always have LF line endings on checkout
 * text eol=lf
+# Denote all files that are truly binary and should not be modified
+*.bmp binary
+*.ttf binary
Signature · 1 line
2.7.4
#1 lore raw

PATCH v4 1/1 gitattributes: dont treat non-text files as text

Quoted 15 lines · Veeraiyan Chidambaram

From: Vignesh Rajendran <[email protected]>

With recent update in u-boot gitattributes all files are treated as regular text files. This creates problems with special files and repo always shows uncommitted files like below.

Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   tools/logos/compulab.bmp
	modified:   tools/logos/denx-comp.bmp
	modified:   tools/logos/toradex.bmp
Quoted 5 lines

To fix above problem special files bmp/ttf files are treated as binary files in the gitattributes.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191111/bf195ae1/attachment.sig>