mutter/clutter/tests/performance/makejobs.rb
2016-04-12 20:04:26 +02:00

25 lines
592 B
Ruby
Executable File

#!/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
}