From: Rudolf Polzer Date: Wed, 22 Dec 2010 21:52:16 +0000 (+0100) Subject: fix hashing of modified files X-Git-Tag: xonotic-v0.1.0preview~2 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=30c801667460d62b21ffbb2aa1f98cf6640d8dfb fix hashing of modified files --- diff --git a/misc/tools/cached-converter.sh b/misc/tools/cached-converter.sh index 517ad982..8fadb960 100755 --- a/misc/tools/cached-converter.sh +++ b/misc/tools/cached-converter.sh @@ -50,9 +50,9 @@ cached() sum=$lastinfileshash else if [ -n "$git_src_repo" ]; then - sum=`( cd "$git_src_repo"; git rev-parse --revs-only HEAD:"${infile1#./}" | grep . ) || git hash-object "$infile1"` + sum=`( cd "$git_src_repo"; { { git ls-files -m "${infile#./}" | grep . >/dev/null; } || git rev-parse --revs-only HEAD:"${infile1#./}"; } | grep .; ) || git hash-object "$infile1"` if [ -n "$infile2" ]; then - sum=$sum`( cd "$git_src_repo"; git rev-parse --revs-only HEAD:"${infile2#./}" | grep . ) || git hash-object "$infile2"` + sum=$sum`( cd "$git_src_repo"; { { git ls-files -m "${infile2#./}" | grep . >/dev/null; } || git rev-parse --revs-only HEAD:"${infile2#./}"; } | grep .; ) || git hash-object "$infile2"` fi else sum=`git hash-object "$infile1"`