xref: /aosp_15_r20/external/mbedtls/tests/git-scripts/README.md (revision 62c56f9862f102b96d72393aff6076c951fb8148)
1*62c56f98SSadaf EbrahimiREADME for git hooks script
2*62c56f98SSadaf Ebrahimi===========================
3*62c56f98SSadaf Ebrahimigit has a way to run scripts, which are invoked by specific git commands.
4*62c56f98SSadaf EbrahimiThe git hooks are located in `<Mbed TLS root>/.git/hooks`, and as such are not under version control
5*62c56f98SSadaf Ebrahimifor more information, see the [git documentation](https://git-scm.com/docs/githooks).
6*62c56f98SSadaf Ebrahimi
7*62c56f98SSadaf EbrahimiThe 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.
8*62c56f98SSadaf Ebrahimi
9*62c56f98SSadaf EbrahimiExample:
10*62c56f98SSadaf Ebrahimi
11*62c56f98SSadaf EbrahimiExecute the following command to create a link on Linux from the Mbed TLS `.git/hooks` directory:
12*62c56f98SSadaf Ebrahimi`ln -s ../../tests/git-scripts/pre-push.sh pre-push`
13*62c56f98SSadaf Ebrahimi
14*62c56f98SSadaf Ebrahimi**Note: Currently the Mbed TLS git hooks work only on a GNU platform. If using a non-GNU platform, don't enable these hooks!**
15*62c56f98SSadaf Ebrahimi
16*62c56f98SSadaf EbrahimiThese scripts can also be used independently.
17