Created
October 2, 2014 14:46
-
-
Save zigarn/4270d18151ac99f38f99 to your computer and use it in GitHub Desktop.
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 ls-tree -r HEAD^{tree} \ # list files | |
| grep -v '^120000 ' \ # ignore symlinks | |
| cut -d " " -f 3- \ # remove columns 1 and 2 (mode and type) | |
| sort -k1 -k2 \ # sort | |
| awk 'BEGIN { FS = " " } { count[$1]++; if (count[$1] == 1) {first[$1] = $0;}; if (count[$1] == 2) {print "-"; print first[$1];}; if (count[$1] > 1) {print} }' # list duplicates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment