]> git.phdru.name Git - git-scripts.git/blobdiff - hooks/post-checkout/set-last-commit-date-changed
Fix(set-last-commit-date): Use `git show -s`
[git-scripts.git] / hooks / post-checkout / set-last-commit-date-changed
index 4074707e4d5bc84e5dd7f00921a71c959e1b4b95..1a6b0ac550a8e77ae1e76e3bed20575d16af6a61 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 diff --name-only HEAD~`
 fi