Skip to content

Instantly share code, notes, and snippets.

@jchris
Created July 22, 2011 01:54
Show Gist options
  • Save jchris/1098719 to your computer and use it in GitHub Desktop.
Save jchris/1098719 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
def print_if_no_match buffer, regex
text = buffer.join("\n")
unless text.match(regex)
puts text
puts
end
end
buffer = []
while line=gets.chomp
if line.match(/^commit/)
print_if_no_match buffer, /git-svn/
buffer = [line]
else
buffer.push line
end
end
@benatkin
Copy link

Here's a public domain statement for you:

Authors

  • J Chris Anderson
CC0

To the extent possible under law, the authors have waived all copyright and related or neighboring rights to this work.

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