mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #5542 from leoetlino/lint-fix
Tools/Lint: Allow diffing against arbitrary revisions
This commit is contained in:
@ -4,8 +4,11 @@
|
|||||||
|
|
||||||
fail=0
|
fail=0
|
||||||
|
|
||||||
|
# Default to staged files, unless a commit was passed.
|
||||||
|
COMMIT=${1:---cached}
|
||||||
|
|
||||||
# Loop through each modified file.
|
# 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.
|
# Filter them.
|
||||||
if ! echo "${f}" | egrep -q "[.](cpp|h|mm)$"; then
|
if ! echo "${f}" | egrep -q "[.](cpp|h|mm)$"; then
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user