mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 19:44:57 +00:00
Merge pull request #5542 from leoetlino/lint-fix
Tools/Lint: Allow diffing against arbitrary revisions
This commit is contained in:
commit
b4e5dc6c0f
1 changed files with 4 additions and 1 deletions
|
@ -4,8 +4,11 @@
|
|||
|
||||
fail=0
|
||||
|
||||
# Default to staged files, unless a commit was passed.
|
||||
COMMIT=${1:---cached}
|
||||
|
||||
# Loop through each modified file.
|
||||
for f in $(git diff --name-only --diff-filter=ACMRTUXB --cached); do
|
||||
for f in $(git diff --name-only --diff-filter=ACMRTUXB $COMMIT); do
|
||||
# Filter them.
|
||||
if ! echo "${f}" | egrep -q "[.](cpp|h|mm)$"; then
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue