]> git.phdru.name Git - git-scripts.git/blobdiff - hooks/post-checkout/set-last-commit-date-all
Fix(set-last-commit-date): Use `git show -s`
[git-scripts.git] / hooks / post-checkout / set-last-commit-date-all
index e950e4cbad05c10027c7374f0beb139ff9b8a8a6..1c87fba880ac9542878fc21be9e876a4d451b87a 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`" &&
    find . \( -name .git -type d -prune \) -o \
       -exec touch --date="$commit_date" '{}' \+
 fi