Last active
August 29, 2015 14:14
-
-
Save uehaj/d07e5062f602d69c431b to your computer and use it in GitHub Desktop.
直近の10個のログから、修正量の多い順にファイル名を表示する
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
class ShowTestTarget { | |
static void main(args) { | |
"git log -10 --numstat --pretty=<@>%s".execute().text.split(/<@>/).drop(1).collect{it.split(/\n/).drop(2)}.flatten().collectMany { def m= (it=~ /(\d+)\W+(\d+)\W+(.*)/); m.matches()?[(m.collect{it}[0][1..-1])]:[] }.sort{-(Integer.parseInt(it[0])+Integer.parseInt(it[1]))}.each { | |
println it[2] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment