mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
25 lines
592 B
Ruby
25 lines
592 B
Ruby
|
#!/usr/bin/env ruby
|
||
|
|
||
|
# this ruby script generates a chronologically sorted
|
||
|
|
||
|
res = ""
|
||
|
input = File.read(ARGV[0])
|
||
|
input = input.gsub(/#.*/, "")
|
||
|
input.split("\n").each {|a|
|
||
|
if a =~ /([^ ]*)\.\.([^ ]*) %(.*)/
|
||
|
res += `git log #{$1}..#{$2} | grep '^commit' | sed 's/commit //' | sed -n '0~#{$3}p'`
|
||
|
elsif a =~ /([^ ]*)\.\.([^ ]*)/
|
||
|
res += `git log #{$1}..#{$2} | grep '^commit' | sed 's/commit //'`
|
||
|
else
|
||
|
res += `echo #{a}`
|
||
|
end
|
||
|
}
|
||
|
|
||
|
all = `git log | grep '^commit' | sed 's/commit//' `
|
||
|
all.split("\n").reverse.each {|a|
|
||
|
if res.match(a.strip) != nil
|
||
|
puts "#{a.strip}"
|
||
|
end
|
||
|
}
|
||
|
|