dce (owner)

Forks

Revisions

gist: 44754 Download_button fork
public
Public Clone URL: git://gist.github.com/44754.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/ruby
 
require 'rubygems'
require 'git'
 
log = "~/gitlog.txt"
tmp = "/tmp/gitlog"
commit = Git.open('.').log.first
message = [
  commit.date.strftime('%D'),
  `pwd`.split(/\//).last.strip,
  commit.message
] * "\t"
 
`touch #{log} && echo "#{message}" | cat - #{log} > #{tmp} && mv #{tmp} #{log}`