X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=hooks%2Fpost-checkout%2Fset-last-commit-date-committed;h=1e889749eaa036a2e58b9c7bd02c0648c1991c7e;hb=50a94c682ccd5d2ab4cf2cfe954a10132077e608;hp=a39bca468b5fc4e250cd2c20e541971d6447b3bf;hpb=2472c56c2f8b2e58b669546889664fbfa0555a80;p=git-scripts.git 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