Added the code that will be written in post-commit file

This commit is contained in:
Ionică Bizău 2015-02-10 10:39:40 +02:00
parent e394b2ec99
commit 26378a5928
1 changed files with 5 additions and 1 deletions

View File

@ -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