[U-Boot] [PATCH] gitattributes: dont treat non-text files as text

From: Vignesh Rajendran vignesh.rajendran@in.bosch.com
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/img2brec.sh 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.
Signed-off-by: Vignesh Rajendran vignesh.rajendran@in.bosch.com Signed-off-by: Veeraiyan Chidambaram veeraiyan.chidambaram@in.bosch.com --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/.gitattributes b/.gitattributes index 8560b794c0a7..300cbbcb142a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ # Declare files that always have LF line endings on checkout * text eol=lf +*.bmp binary +*.ttf binary

Hi Veeraiyan,
On Fri, Nov 8, 2019 at 5:20 PM Veeraiyan Chidambaram external.veeraiyan.c@de.adit-jv.com wrote:
From: Vignesh Rajendran vignesh.rajendran@in.bosch.com
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/img2brec.sh
This should not be here.
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.
Signed-off-by: Vignesh Rajendran vignesh.rajendran@in.bosch.com Signed-off-by: Veeraiyan Chidambaram veeraiyan.chidambaram@in.bosch.com
.gitattributes | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/.gitattributes b/.gitattributes index 8560b794c0a7..300cbbcb142a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ # Declare files that always have LF line endings on checkout
- text eol=lf
Better add a comment here, something like:
# Denote all files that are truly binary and should not be modified
+*.bmp binary
+*.ttf binary
Regards, Bin

On Fri, Nov 08, 2019 at 06:03:21PM +0800, Bin Meng wrote:
Hi Veeraiyan,
On Fri, Nov 8, 2019 at 5:20 PM Veeraiyan Chidambaram external.veeraiyan.c@de.adit-jv.com wrote:
From: Vignesh Rajendran vignesh.rajendran@in.bosch.com
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/img2brec.sh
This should not be here.
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.
Signed-off-by: Vignesh Rajendran vignesh.rajendran@in.bosch.com Signed-off-by: Veeraiyan Chidambaram veeraiyan.chidambaram@in.bosch.com
.gitattributes | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/.gitattributes b/.gitattributes index 8560b794c0a7..300cbbcb142a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ # Declare files that always have LF line endings on checkout
- text eol=lf
Better add a comment here, something like:
# Denote all files that are truly binary and should not be modified
+*.bmp binary
+*.ttf binary
Yes, please do a v2 that adds a comment like the above and drops img2brec.sh as I've just sent a patch to delete the otherwise unused script. Thanks!
participants (3)
-
Bin Meng
-
Tom Rini
-
Veeraiyan Chidambaram