From: Oleg Broytman Date: Mon, 28 Jul 2014 14:33:48 +0000 (+0400) Subject: Use git rev-parse instead of git show-ref X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=commitdiff_plain;h=4df283c93cbe5b8b99d683f0a56885d29b544a20 Use git rev-parse instead of git show-ref --- diff --git a/add-pubkey/post-checkout b/add-pubkey/post-checkout index ae91c71..bf63ef0 100755 --- a/add-pubkey/post-checkout +++ b/add-pubkey/post-checkout @@ -8,8 +8,7 @@ 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 . &&