blob: 23db168c37ee057fa12c86bdf6556bb304735493 [file] [log] [blame] [view]
Ron Eldorbf007d22016-12-15 14:42:37 +02001README for git hooks script
2===========================
3git has a way to run scripts, which are invoked by specific git commands.
Tom Cosgrove0b86ac12022-07-29 13:44:01 +01004The git hooks are located in `<Mbed TLS root>/.git/hooks`, and as such are not under version control
Ron Eldorbf007d22016-12-15 14:42:37 +02005for more information, see the [git documentation](https://git-scm.com/docs/githooks).
6
Tom Cosgrove0b86ac12022-07-29 13:44:01 +01007The Mbed TLS git hooks are located in `<Mbed TLS root>/tests/git-scripts` directory, and one must create a soft link from `<Mbed TLS root>/.git/hooks` to `<Mbed TLS root>/tests/git-scripts`, in order to make the hook scripts successfully work.
Ron Eldorbf007d22016-12-15 14:42:37 +02008
9Example:
10
Tom Cosgrove0b86ac12022-07-29 13:44:01 +010011Execute the following command to create a link on Linux from the Mbed TLS `.git/hooks` directory:
Ron Eldord922c782017-07-24 15:52:18 +030012`ln -s ../../tests/git-scripts/pre-push.sh pre-push`
Ron Eldorbf007d22016-12-15 14:42:37 +020013
Tom Cosgrove0b86ac12022-07-29 13:44:01 +010014**Note: Currently the Mbed TLS git hooks work only on a GNU platform. If using a non-GNU platform, don't enable these hooks!**
Ron Eldord731eb82017-07-23 15:25:32 +030015
16These scripts can also be used independently.