summaryrefslogtreecommitdiff
path: root/findversion.sh
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2010-05-26 03:31:05 +0000
committermichi_cc <michi_cc@openttd.org>2010-05-26 03:31:05 +0000
commit3e7fc229ab83090dc48c8df244582ae4ad3e0d01 (patch)
treedafc7752f10bc796876164fa5141c9dd8528ad18 /findversion.sh
parent0599e8e97dc2b1754810b5f5cdac297856e056e7 (diff)
downloadopenttd-3e7fc229ab83090dc48c8df244582ae4ad3e0d01.tar.xz
(svn r19895) -Fix [FS#3836]: Git version detection would sometimes mistakenly identify a checkout as modified.
Diffstat (limited to 'findversion.sh')
-rwxr-xr-xfindversion.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/findversion.sh b/findversion.sh
index c792ec811..6d5f18e52 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -87,6 +87,8 @@ if [ -d "$ROOT_DIR/.svn" ]; then
fi
elif [ -d "$ROOT_DIR/.git" ]; then
# We are a git checkout
+ # Refresh the index to make sure file stat info is in sync, then look for modifications
+ git update-index --refresh >/dev/null
if [ -n "`git diff-index HEAD \"$SRC_DIR\"`" ]; then
MODIFIED="2"
fi