mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-19 13:41:11 +00:00
(svn r19895) -Fix [FS#3836]: Git version detection would sometimes mistakenly identify a checkout as modified.
This commit is contained in:
parent
0599e8e97d
commit
3e7fc229ab
@ -87,6 +87,8 @@ if [ -d "$ROOT_DIR/.svn" ]; then
|
|||||||
fi
|
fi
|
||||||
elif [ -d "$ROOT_DIR/.git" ]; then
|
elif [ -d "$ROOT_DIR/.git" ]; then
|
||||||
# We are a git checkout
|
# 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
|
if [ -n "`git diff-index HEAD \"$SRC_DIR\"`" ]; then
|
||||||
MODIFIED="2"
|
MODIFIED="2"
|
||||||
fi
|
fi
|
||||||
|
@ -171,6 +171,14 @@ Function DetermineSVNVersion()
|
|||||||
If oExec.ExitCode = 0 Then
|
If oExec.ExitCode = 0 Then
|
||||||
hash = oExec.StdOut.ReadLine()
|
hash = oExec.StdOut.ReadLine()
|
||||||
version = "g" & Mid(hash, 1, 8)
|
version = "g" & Mid(hash, 1, 8)
|
||||||
|
' Make sure index is in sync with disk
|
||||||
|
Set oExec = WshShell.Exec("git update-index --refresh")
|
||||||
|
If Err.Number = 0 Then
|
||||||
|
' Wait till the application is finished ...
|
||||||
|
Do While oExec.Status = 0
|
||||||
|
WScript.Sleep 10
|
||||||
|
Loop
|
||||||
|
End If
|
||||||
Set oExec = WshShell.Exec("git diff-index --exit-code --quiet HEAD ../src")
|
Set oExec = WshShell.Exec("git diff-index --exit-code --quiet HEAD ../src")
|
||||||
If Err.Number = 0 Then
|
If Err.Number = 0 Then
|
||||||
' Wait till the application is finished ...
|
' Wait till the application is finished ...
|
||||||
|
Loading…
Reference in New Issue
Block a user