Skip to content

Instantly share code, notes, and snippets.

@shayarnett
Created July 19, 2010 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shayarnett/480957 to your computer and use it in GitHub Desktop.
Save shayarnett/480957 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# shove this somewhere in your path
# gem install grit
# cd into project in questions directory
# run it
require 'rubygems'
require 'activesupport'
require 'grit'
include Grit
repo = Repo.new(".")
puts repo.commits_since('master', Time.now.beginning_of_week).group_by {|x| x.authored_date.to_date}.map{|k,v| "#{k}:\n #{v.map(&:message).map(&:squish).join("; ")}"}.join("\n\n")
@leshill
Copy link

leshill commented Jul 19, 2010

Here is the bash function I am currently using (modified from something Ro had).
harvest() {
if [ -n "$2" ]; then
since="--since=$2"
else
since="--since=yesterday"
fi
if [ -n "$3" ]; then
date="$since --until=$3"
else
date=$since
fi
git log --pretty=format:%s; --author=$1 $date | tail -r
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment