diff --git a/Visual Studio Projects/git-hooks/0ReadMe_git-hooks.txt b/Visual Studio Projects/git-hooks/0ReadMe_git-hooks.txt new file mode 100644 index 00000000..d9126d78 --- /dev/null +++ b/Visual Studio Projects/git-hooks/0ReadMe_git-hooks.txt @@ -0,0 +1,28 @@ +This dirctory contains a set of git hook scripts which are useful when +working with this repository to make the git commit id available when +building simulators to uniquely identify the inputs to that build. + +It is ONLY useful for folks who clone this as a repository and build +in the working directory of that repository. + +Folks who download zip archives of the repository do not currently +have the ability to get the commit id which the archive is a snapshot +of. Work is being done to solve this issue for uses of the archive +snapshots as well. + +To use these scripts automatically, copy these files to the .git/hooks +directory of the current repository. This can be done with the +following commands: + + $ cd Visual\ Studio\ Projects/git-hooks + $ chmod +x post* + $ cp post* ../../.git/hooks/ + + + +Note: You ONLY need to copy these hook scripts once for a particular + clone of the repository. Once these are installed they will + survive as you pull subsequent revisions from the github repo. + + If you clone the repository to another platform, then you'll + need to copy the hooks to the .git/hooks directory again. diff --git a/Visual Studio Projects/git-hooks/post-checkout b/Visual Studio Projects/git-hooks/post-checkout new file mode 100755 index 00000000..05588ba1 --- /dev/null +++ b/Visual Studio Projects/git-hooks/post-checkout @@ -0,0 +1,5 @@ +#!/bin/sh +# +# A hook script that is called after a successful +# checkout to record the commit-id in the working directory. +git log -1 --pretty="%H" >.git-commit-id diff --git a/Visual Studio Projects/git-hooks/post-commit b/Visual Studio Projects/git-hooks/post-commit new file mode 100755 index 00000000..32d3e495 --- /dev/null +++ b/Visual Studio Projects/git-hooks/post-commit @@ -0,0 +1,5 @@ +#!/bin/sh +# +# A hook script that is called after a successful +# commit is made to record the commit-id in the working directory. +git log -1 --pretty="%H" >.git-commit-id diff --git a/Visual Studio Projects/git-hooks/post-merge b/Visual Studio Projects/git-hooks/post-merge new file mode 100755 index 00000000..9de878e1 --- /dev/null +++ b/Visual Studio Projects/git-hooks/post-merge @@ -0,0 +1,5 @@ +#!/bin/sh +# +# A hook script that is called after a successful merge +# to record the commit-id in the working directory. +git log -1 --pretty="%H" >.git-commit-id