Last active
March 7, 2017 06:53
-
-
Save gecko655/a76f9185e635b80410dd9b4c2c55a1a0 to your computer and use it in GitHub Desktop.
GitでLFS管理下ファイルのdiffを見るやつ
This file contains hidden or 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
#!/bin/bash | |
DIFFCOMMAND=diff | |
if [ $# -lt 1 ] ; then | |
echo "usage: $0 [rev1] [rev2] filename" | |
exit 1 | |
elif [ $# -eq 1 ] ; then | |
$DIFFCOMMAND <(git show HEAD:"${@:1}" | git lfs smudge) "${@:1}" | |
elif [ $# -eq 2 ] ; then | |
$DIFFCOMMAND <(git show $1:"${@:2}" | git lfs smudge) "${@:2}" | |
else | |
$DIFFCOMMAND <(git show $1:"${@:3}" | git lfs smudge) <(git show $2:"${@:3}" | git lfs smudge) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ファイル名にSpaceがあっても大丈夫なはず。