Created
July 22, 2011 01:54
-
-
Save jchris/1098719 to your computer and use it in GitHub Desktop.
you want to know the commits that never made it into svn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a public domain statement for you:
Authors
To the extent possible under law, the authors have waived all copyright and related or neighboring rights to this work.