Closed maxitg closed 3 years ago
@maxitg here's some interesting info:
According to sort
documentation:
*** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values.
We can see that git ls-files
uses the default locale for sorting (lexicographic order):
diff -q <(git ls-files "${lsfilesOptions[@]}") <(git ls-files "${lsfilesOptions[@]}" | LC_ALL=C sort)
produces no output.
If we specify default locale for comm
, there is no need to sort:
LC_ALL=C comm -13 <(git ls-files --deleted) <(git ls-files "${lsfilesOptions[@]}")
works as expected
The CI was failing because grep
with no matches was triggering pipefail. Prevented it now with a || :
.
Changes
./lint.sh
so that it is run by CI and git hooks.Comments
Examples
This change is