X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=blobdiff_plain;f=hooks%2Fpost-checkout%2Fset-last-commit-date-all;fp=hooks%2Fpost-checkout%2Fset-last-commit-date-all;h=1c87fba880ac9542878fc21be9e876a4d451b87a;hp=e950e4cbad05c10027c7374f0beb139ff9b8a8a6;hb=11d28be70b2911af2c1f197be5ba83c0ca5cdfa2;hpb=682002cec47ddc2bacdb64c636d5df581a1029b4 diff --git a/hooks/post-checkout/set-last-commit-date-all b/hooks/post-checkout/set-last-commit-date-all index e950e4c..1c87fba 100755 --- a/hooks/post-checkout/set-last-commit-date-all +++ b/hooks/post-checkout/set-last-commit-date-all @@ -8,7 +8,7 @@ new_HEAD="$2" new_branch="$3" if [ "$new_branch" = 1 ]; then - commit_date="`git show --format='%cD' | head -1`" && + commit_date="`git show --format='%cD' -s`" && find . \( -name .git -type d -prune \) -o \ -exec touch --date="$commit_date" '{}' \+ fi