]> git.phdru.name Git - git-scripts.git/blobdiff - hooks/post-checkout/set-last-commit-date-committed
Fix(set-last-commit-date): Use `git show -s`
[git-scripts.git] / hooks / post-checkout / set-last-commit-date-committed
index a39bca468b5fc4e250cd2c20e541971d6447b3bf..1e889749eaa036a2e58b9c7bd02c0648c1991c7e 100755 (executable)
@@ -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