Skip to content

Instantly share code, notes, and snippets.

@cararemixed
Forked from jchris/not_in_svn.rb
Created July 22, 2011 02:05
Show Gist options
  • Save cararemixed/1098739 to your computer and use it in GitHub Desktop.
Save cararemixed/1098739 to your computer and use it in GitHub Desktop.
you want to know the commits that never made it into svn
# usage:
# git log | ruby not_in_svn.rb | less
# license: Apache 2.0
# copyright: J Chris Anderson 2011
# this might be too trivial to copyright
buffer = []
while(line = gets)
if line.match(/^commit/)
puts buffer, "\n" unless buffer.any? {|x| x =~ /git-svn/}
buffer.clear
end
buffer << line
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment