gitのお話。 ディレクトリ整理とかで多数のrenameが発生した修正のレビューをすることになった。 pathの変更を見ればいいだけなんだけど、長すぎてGitHubのPull-Requestでは省略されてしまう。といったシーン。
結論
fetchしてdiffやshowで確認する。
--summary
オプションをつければよい。
git show --summary {commit-ref} # あるいは git diff --summary {base-commit-ref} {commit-ref}
diff部分がまとめられて、renameの状況が確認しやすくなる。
たとえば foo/baz/
を foo/bar/baz/
に移動した場合、次のように表示される。
rename foo/{ => bar}/baz/aaa.txt rename foo/{ => bar}/baz/bbb.txt rename foo/{ => bar}/baz/ccc.txt rename foo/{ => bar}/baz/ddd.txt rename foo/{ => bar}/baz/eee.txt