Skip to content
Snippets Groups Projects
Commit b15d9941 authored by Thong Kuah's avatar Thong Kuah
Browse files

Use git grep to search for conflict headers

`grep -z` isn't supported in MacOS grep.

Also the script doesn't seem to catch some cases probably because of
`xargs -0`
parent 5c17bc70
No related branches found
No related tags found
2 merge requests!158514Fix CodeReviewMetrics worker failure with kwargs,!20937Use git grep to search for conflict headers
#!/bin/sh
output=`git ls-files -z | grep -zvE '\.(rb|js|haml)$' | xargs -0n1 grep -HEn '^<<<<<<< '`
output=`git grep -En '^<<<<<<< ' -- . ':(exclude)*.haml' ':(exclude)*.js' ':(exclude)*.rb'`
echo $output
test -z "$output"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment