]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-syntax: disable syntax coloration in `git_diff_to_head()` 1176/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 24 Oct 2018 14:30:44 +0000 (16:30 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 24 Oct 2018 14:30:44 +0000 (16:30 +0200)
when running this code locally for debugging purposes, the sed in
`match_file()` won't match the pattern because of the ANSI codes inserted by
the git diff (colored) output.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
ceph-ansible-pr-syntax-check/build/build

index 6afebe0b48e70e10db799cd87107dc5340d07dd7..785f6fafe4059133ef4a8ded1d554e5d712d36cc 100644 (file)
@@ -54,7 +54,7 @@ function group_vars_check {
 function git_diff_to_head {
   # shellcheck disable=SC2154
   # ghprbTargetBranch variable comes from jenkins's injectedEnvVars
-  git diff origin/"${ghprbTargetBranch}"..HEAD
+  git diff --no-color origin/"${ghprbTargetBranch}"..HEAD
 }
 
 function match_file {