From 4428ea67f1241e00b12b45b416a646f0fc28fb1d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 7 Aug 2014 01:46:41 +0400 Subject: [PATCH] Set timestamp only on the files known to git --- hooks/post-checkout-touch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post-checkout-touch b/hooks/post-checkout-touch index b91425a..713395f 100755 --- a/hooks/post-checkout-touch +++ b/hooks/post-checkout-touch @@ -9,7 +9,7 @@ new_branch="$3" if [ "$new_branch" = 1 ]; then commit_date="`git show --format='%cD' \"$new_HEAD\" | awk '{if (NR==1) print}'`" && - find . \( -name .git -type d -prune \) -o -exec touch --date="$commit_date" '{}' \+ + touch --date="$commit_date" `git ls-files --cached` fi exit 0 -- 2.39.5