xref: /aosp_15_r20/external/flashrom/util/git-hooks/pre-commit (revision 0d6140be3aa665ecc836e8907834fcd3e3b018fc)
1*0d6140beSAndroid Build Coastguard Worker#!/bin/sh
2*0d6140beSAndroid Build Coastguard Worker#
3*0d6140beSAndroid Build Coastguard Worker# A hook script to verify what is about to be committed.
4*0d6140beSAndroid Build Coastguard Worker# Called by "git commit" with no arguments.  The hook should
5*0d6140beSAndroid Build Coastguard Worker# exit with non-zero status after issuing an appropriate message if
6*0d6140beSAndroid Build Coastguard Worker# it wants to stop the commit.
7*0d6140beSAndroid Build Coastguard Worker
8*0d6140beSAndroid Build Coastguard Worker# Check for whitespace errors
9*0d6140beSAndroid Build Coastguard Workergit diff-index --check --cached HEAD -- || exit 1
10