fdroiddata/hooks/pre-commit
Daniel Martí 61fa7a2ed7 hooks/pre-commit: only check changed files
Speeds up commiting a single file from ~2.6s to ~1.2s on my machine.
2016-06-17 11:36:18 +01:00

12 lines
203 B
Bash
Executable file

#!/bin/sh
set -o errexit
set -o nounset
set -o pipefail
# Redirect output to stderr.
exec 1>&2
fdroid lint -f $(git diff --cached --name-only --diff-filter=ACM | sed -n 's@metadata/\(.*\).txt@\1@p')