devtools: disable coloring of git-log output

Message ID 20181023085217.18548-1-alialnu@mellanox.com (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: disable coloring of git-log output |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/ci/checkpatch success coding style OK

Commit Message

Ali Alnubani Oct. 23, 2018, 8:52 a.m. UTC
  Colored git-log outputs will have escape characters
appended to hashes, causing check-git-log.sh to fail
with `error: malformed object name ?[33m<hash>?[m` when doing
`git tag -l --contains <colored_hash>`.

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
---
 devtools/git-log-fixes.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon Nov. 18, 2018, 11:01 p.m. UTC | #1
23/10/2018 10:52, Ali Alnubani:
> Colored git-log outputs will have escape characters
> appended to hashes, causing check-git-log.sh to fail
> with `error: malformed object name ?[33m<hash>?[m` when doing
> `git tag -l --contains <colored_hash>`.

I guess it is due to a config specifying to color "always".

> Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
> ---
> --- a/devtools/git-log-fixes.sh
> +++ b/devtools/git-log-fixes.sh
> -git log --oneline --reverse $range |
> +git log --no-color --oneline --reverse $range |

There are a lot more "git log" calls in this script.
I wonder whether we should add this option everywhere.
  

Patch

diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh
index e37ee2260..464b0a41a 100755
--- a/devtools/git-log-fixes.sh
+++ b/devtools/git-log-fixes.sh
@@ -94,7 +94,7 @@  stable_tag () # <hash>
 	fi
 }
 
-git log --oneline --reverse $range |
+git log --no-color --oneline --reverse $range |
 while read id headline ; do
 	origins=$(origin_filter $id)
 	stable=$(stable_tag $id)