X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=hooks%2Fpost-checkout-touch-all;h=2f5e80cc0086e01330ef58ce61d721f47d67f6f1;hb=cbbebd570fc6d3f3d125893003946b6749d5fb38;hp=b91425a4260505325ca8970317ae6b657e3cf5d5;hpb=46dd450c24e931946082236088842f48e24993bb;p=git-scripts.git diff --git a/hooks/post-checkout-touch-all b/hooks/post-checkout-touch-all index b91425a..2f5e80c 100755 --- a/hooks/post-checkout-touch-all +++ b/hooks/post-checkout-touch-all @@ -8,7 +8,7 @@ new_HEAD="$2" new_branch="$3" if [ "$new_branch" = 1 ]; then - commit_date="`git show --format='%cD' \"$new_HEAD\" | awk '{if (NR==1) print}'`" && + commit_date="`git show --format='%cD' | head -1`" && find . \( -name .git -type d -prune \) -o -exec touch --date="$commit_date" '{}' \+ fi