Created
April 12, 2018 13:39
-
-
Save takahirom/4c0cf37b4492146e131b99d631b861ae to your computer and use it in GitHub Desktop.
Generate git mv for Kotlinize
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
git status -s|awk '$1=="D"&&substr($2,length($2)-4)==".java"{ | |
file=substr($2,0,length($2)-5); | |
getline; | |
if(substr($2,0,length($2)-3)==file){ | |
print "mv " file".kt " file".kt_bak\ngit checkout HEAD "file".java\ngit mv " file".java "file".kt\ngit add "file".kt\nmv "file".kt_bak " file".kt" | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment