X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=blobdiff_plain;f=hooks%2Fpost-checkout%2Fset-last-commit-date-committed;h=1e889749eaa036a2e58b9c7bd02c0648c1991c7e;hp=a39bca468b5fc4e250cd2c20e541971d6447b3bf;hb=11d28be70b2911af2c1f197be5ba83c0ca5cdfa2;hpb=682002cec47ddc2bacdb64c636d5df581a1029b4 diff --git a/hooks/post-checkout/set-last-commit-date-committed b/hooks/post-checkout/set-last-commit-date-committed index a39bca4..1e88974 100755 --- a/hooks/post-checkout/set-last-commit-date-committed +++ b/hooks/post-checkout/set-last-commit-date-committed @@ -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`" && touch --date="$commit_date" `git ls-files --cached` fi