diff options
author | Martin Thomson <martin.thomson@gmail.com> | 2017-02-18 08:48:43 +1100 |
---|---|---|
committer | Martin Thomson <martin.thomson@gmail.com> | 2017-02-18 08:48:43 +1100 |
commit | 25f693337dd542364c90a7531f4f8d3a6ef347c0 (patch) | |
tree | 1521a99df8612af4947866c61850bca1a6a61893 /coreconf/precommit.clang-format.sh | |
parent | eae228e48f98fe5780c642f3e5f534a448bd56f1 (diff) | |
download | nss-hg-25f693337dd542364c90a7531f4f8d3a6ef347c0.tar.gz |
Bug 1339776 - Handle git renamed files in pre-commit hook, r=ttaubert
Diffstat (limited to 'coreconf/precommit.clang-format.sh')
-rwxr-xr-x | coreconf/precommit.clang-format.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreconf/precommit.clang-format.sh b/coreconf/precommit.clang-format.sh index fec140ea6..11382c39b 100755 --- a/coreconf/precommit.clang-format.sh +++ b/coreconf/precommit.clang-format.sh @@ -43,7 +43,7 @@ if [ "$hg" -eq 1 ]; then files=($(hg status -m -a --rev tip^:tip | cut -f 2 -d ' ' -)) fi if [ "$git" -eq 1 ]; then - files=($(git status --porcelain | sed '/^[MARCU]/{s/..//;p;};d')) + files=($(git status --porcelain | sed '/^[MACU]/{s/..//;p;};/^R/{s/^.* -> //;p;};d')) fi tmp=$(mktemp) trap 'rm -f "$tmp"' ERR EXIT |