1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00
Files
quay/.github/hooks/pre-commit.sh
Sunandadadi e8e5d5d904 Util: Adding git pre-commit checks (PROJQUAY-4658) (#1585)
* Util: Adding git pre-commit checks (PROJQUAY-0000)

* updating getting started markdown
2022-10-25 10:11:22 -04:00

15 lines
413 B
Bash
Executable File

#!/bin/bash
# File names should be seprated by pipe(|). Eg: 'file1|file2|file3'
MUST_NOT_CHANGE='local-dev/stack/config.yaml'
if git diff --name-only --cached --diff-filter=ACMR |
grep -E "$MUST_NOT_CHANGE"
then
echo Commit would modify one or more files that must not change. Please remove them before commiting. \
If you\'d still like to commit, please use '--no-verify'
exit 1
else
exit 0
fi