diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-08-01 16:03:21 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-08-01 17:11:53 +0800 |
commit | 8dd9df6a689d8b934bcddde212a1a2d8f7d62039 (patch) | |
tree | 73eb20845a490047bdcabf05291058fd16b0973b | |
parent | 0ffdc72137b9a04b870605248b32927c9b1d28a2 (diff) | |
download | gitlab-ce-35627-lint-for-conflict.tar.gz |
Simply use git + grep + xargs to avoid rg35627-lint-for-conflict
-rwxr-xr-x | scripts/lint-conflicts.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/lint-conflicts.sh b/scripts/lint-conflicts.sh index e8529367040..f3877600c8c 100755 --- a/scripts/lint-conflicts.sh +++ b/scripts/lint-conflicts.sh @@ -1,3 +1,5 @@ #!/bin/sh -! rg -C 2 --pretty -g'!*.{rb,js,haml}' '^<<<<<<< ' . +output=`git ls-files -z | grep -zvE '\.(rb|js|haml)$' | xargs -0n1 grep -HEn '^<<<<<<< '` +echo $output +test -z "$output" |