Skip to content

Commit ddc04b5

Browse files
committed
fix(Invalid Date): change date format to ISO 8601 in post-commit hook to avoid 'Invalid Date' recording in ~/.git-stats
Signed-off-by: marslo <[email protected]>
1 parent 075d7a9 commit ddc04b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/init-git-post-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ hook=$(cat <<EOF
2929
# Copy last commit hash to clipboard on commit
3030
commit_hash=\$(git rev-parse HEAD)
3131
repo_url=\$(git config --get remote.origin.url)
32-
commit_date=\$(git log -1 --format=%cd)
32+
commit_date=\$(git log -1 --format=%cI)
3333
commit_data="\"{ \"date\": \"\$commit_date\", \"url\": \"\$repo_url\", \"hash\": \"\$commit_hash\" }\""
3434
git-stats --record "\${commit_data}"
3535
### git-stats hook (end) ###

0 commit comments

Comments
 (0)