Skip to content

Commit

Permalink
* git
Browse files Browse the repository at this point in the history
  * time_since_last_commit
  • Loading branch information
webhoernchen committed Sep 4, 2014
1 parent 0c2ca4e commit 5ae1497
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ git_reset() {
git reset --merge ORIG_HEAD
}

time_since_last_commit() {
if ([ -d .svn ] || [ -d ../.svn ])
then
echo 'not configured'
else
git log -n 1 | grep Date | rails runner "p ((Time.now - STDIN.read.gsub('Date:', '').strip.to_time) / 1.hour).round(2)"
fi
}

rtf() {
rm $(find ./ -type f -name "*.swp")
rm $(find ./ -type f -name "*.swo")
Expand Down

0 comments on commit 5ae1497

Please sign in to comment.