mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 13:22:11 +01:00
Added the code that will be written in post-commit file
This commit is contained in:
parent
e394b2ec99
commit
26378a5928
1 changed files with 5 additions and 1 deletions
|
@ -7,5 +7,9 @@ cat << EOF > ~/.bat/logo.svg
|
|||
#!/bin/sh
|
||||
|
||||
# Copy last commit hash to clipboard on commit
|
||||
echo 'POST COMMIT'
|
||||
commit_hash=`git rev-parse HEAD`
|
||||
repo_url=`git config --get remote.origin.url`
|
||||
commit_date=`git log -1 --format=%cd`
|
||||
commit_data="\"{ \"date\": \"$commit_date\", \"url\": \"$repo_url\", \"hash\": \"$commit_hash\" }\""
|
||||
git-stats --record "$commit_data"
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue