]> git.phdru.name Git - git-scripts.git/blobdiff - add-pubkey/post-checkout
Use new ls-dirty
[git-scripts.git] / add-pubkey / post-checkout
index ae91c71b72585c2504a7b47291b669d44912304e..7394a6219092524f0b5310fad055ccebd8102869 100755 (executable)
@@ -1,15 +1,14 @@
 #!/bin/sh
 
 # post-checkout hook that compiles python files to byte code
-# if branch was changed or remove byte code files for a specific branch
+# if branch was changed or removes byte code files for a specific branch
 
 prev_HEAD="$1"
 new_HEAD="$2"
 new_branch="$3"
 
 if [ \( "$new_branch" = 1 \) ]; then
-   phd_pubkey_HEAD="`git show-ref --hash refs/heads/phd-pubkey`"
-   if [ "$new_HEAD" = "$phd_pubkey_HEAD" ]; then
+   if [ "$new_HEAD" = "`git rev-parse phd-pubkey`" ]; then
       git clean -d -f -q
    else
       python2.7 -m compileall -q . &&