summaryrefslogtreecommitdiff
path: root/scripts/pre-commit.sh
AgeCommit message (Collapse)Author
2021-03-31scripts: pre-commit: fix recursive loopWolfram Sang
uuid calls uuid calls uuid calls uuid... Rename the shell function. Fixes: 4d03227 ("scripts: pre-commit: Support uuidgen as an alternative to uuid") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2021-03-21scripts: pre-commit: Support uuidgen as an alternative to uuidLaurent Pinchart
The uuidgen command, from the uuid-runtime package on Debian, can generate UUIDs. If the uuid command isn't available, fallback to uuidgen. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-11-25scripts/pre-commit: Auto-generate keys when neededGeert Uytterhoeven
Generate unique keys for YAML project files lacking them. There are two minor issues left: 1. Due to the "git add", not only the key is added to the file, but also any other changes that are not yet staged, 2. When doing "git add <file>; git commit <file>", the addition of the key is also left in the unstaged changes as a side effect, so "git diff" still shows that change as uncommitted. More investigation shows this only happens when passing the file name to the "git commit" command. Hence it does not happen when doing "git add <file>; git commit". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
2019-11-25scripts: Add a pre-commit hook to validate YAML project filesGeert Uytterhoeven
To enable: ln -s ../../scripts/pre-commit.sh .git/hooks/pre-commit Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>