Method: Achoo::VCS::Git#log_for

Defined in:
lib/achoo/vcs/git.rb

#log_for(date) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/achoo/vcs/git.rb', line 15

def log_for(date)
  format = '%Y-%m-%dT00:00:00'
  from = date.strftime(format)
  to   = (date+1).strftime(format)
  
  cmd = "cd  #@dir; git log --author=#{ENV['USER']} --oneline --after=#{from} --before=#{to} | cut -d ' ' -f 2-"
  `#{cmd}`
end