X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=hooks%2Fpost-checkout%2Ftouch-all;fp=hooks%2Fpost-checkout%2Ftouch-all;h=0000000000000000000000000000000000000000;hb=b5a65bd2ca9eb6887fbb3f94ae5c6f262e7d38dc;hp=2f5e80cc0086e01330ef58ce61d721f47d67f6f1;hpb=839f71abf237d12e2521ed23c7dfdb0f66f50a3f;p=git-scripts.git diff --git a/hooks/post-checkout/touch-all b/hooks/post-checkout/touch-all deleted file mode 100755 index 2f5e80c..0000000 --- a/hooks/post-checkout/touch-all +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# post-checkout hook that changes timestamps on files to that one of the commit -# if branch was changed - -prev_HEAD="$1" -new_HEAD="$2" -new_branch="$3" - -if [ "$new_branch" = 1 ]; then - commit_date="`git show --format='%cD' | head -1`" && - find . \( -name .git -type d -prune \) -o -exec touch --date="$commit_date" '{}' \+ -fi - -exit 0