diff --git a/comptime.bat b/comptime.bat
index 119b3bb5c3e3f8d42c2b16fbe7fdd5ca957542b1..9e127f001a984ebf3e6febffb8307adb21d08aaf 100644
--- a/comptime.bat
+++ b/comptime.bat
@@ -6,6 +6,7 @@ copy nul: /b +%1\comptime.c tmp.$$$ > nul
 move tmp.$$$ %1\comptime.c > nul
 
 if exist .git goto gitrev
+if exist ..\.git goto gitrev
 if exist .svn goto svnrev
 goto filwri