Mercurial > hg-stable
view tests/test-check-clang-format.t @ 34835:14c87708f432
arbitraryfilecontext: skip the cmp fast path if any side is a symlink
`filecmp` follows symlinks by default, which a `filectx.cmp()` call should not
be doing as it should only compare the requested entry. After this patch, only
the contexts' data are compared, which is the correct contract.
This is a corrected version of D1122.
Differential Revision: https://phab.mercurial-scm.org/D1165
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Tue, 17 Oct 2017 12:41:24 -0700 |
parents | 2e8477059d4f |
children | 39499bc31fcd |
line wrap: on
line source
#require clang-format test-repo $ . "$TESTDIR/helpers-testrepo.sh" $ cd "$TESTDIR"/.. $ for f in `testrepohg files 'set:(**.c or **.h) and not "listfile:contrib/clang-format-blacklist"'` ; do > clang-format --style file $f > $f.formatted > cmp $f $f.formatted || diff -u $f $f.formatted > rm $f.formatted > done