aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2018-05-29 16:50:23 -0700
committerJohn Stultz <john.stultz@linaro.org>2018-05-30 10:19:04 -0700
commitc660b3d685745c370434003e4f29d9d7eeb17eed (patch)
tree28b172621d48a6ba0019bff49b7e18ff12ee2514
parent1d224e83270be782040e00a8eb51d4b20dc740d0 (diff)
downloaddrm_hwcomposer-c660b3d685745c370434003e4f29d9d7eeb17eed.tar.gz
drm_hwcomposer: Try to fix clang-format pipeline
The clang-format pipeline generates false negatives sometimes, with: $ git diff -U0 --no-color master...HEAD | clang-format-diff-3.5 -p 1 -style=file > format-fixup.patch fatal: ambiguous argument 'master...HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: as seen here: https://gitlab.freedesktop.org/john.stultz/drm-hwcomposer/-/jobs/932 This tries to address the issue by explictly fetching freedesktop/master and referencing FETHC_HEAD instead of master which doesn't always exist. Change-Id: I7a07d412eae164841427da90dfc7298697c5e783 Reviewed-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--.gitlab-ci.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b974875..43bce5f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,8 @@ stages:
clang-format:
stage: style
script:
- - git diff -U0 --no-color master...HEAD | clang-format-diff-3.5 -p 1 -style=file > format-fixup.patch
+ - git fetch https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer.git
+ - git diff -U0 --no-color FETCH_HEAD...HEAD -- | clang-format-diff-3.5 -p 1 -style=file > format-fixup.patch
- if [ -s format-fixup.patch ]; then cat format-fixup.patch && exit 1; fi
artifacts:
when: on_failure