anchor.diff:    if errorlevel 1 goto :GIT_MAKE_BATCH_FILES
     goto :SYNC_GIT_HELP_FILES
   )
  -goto :GIT_INSTALL
   
   :GIT_INSTALL
   echo Installing git %GIT_VERSION% (avg 1-2 min download) ...
  -echo Detected: %OS_BITS% bits
  -if defined XP_SUFFIX         echo ... Windows XP
  -if defined GIT_PORTABLE_FLOW echo ... Portable installation flow
  -
  -:: git is not accessible; check it out and create 'proxy' files.
  +
   if exist "%GIT_DOWNLOAD_PATH%" del "%GIT_DOWNLOAD_PATH%"
   echo Fetching from %GIT_FETCH_URL%
   cscript //nologo //e:jscript "%~dp0get_file.js" %GIT_FETCH_URL% "%GIT_DOWNLOAD_PATH%"
  
positive.code: 
  :GIT_CHECK
  
  :: See if we're on XP
  for /f "tokens=2 delims=[]" %%i in ('ver') do set VERSTR=%%i
  for /f "tokens=2,3 delims=. " %%i in ("%VERSTR%") do (set VERMAJOR=%%i & set VERMINOR=%%j)
  if %VERMAJOR% lss 5 set GIT_VERSION=%GIT_VERSION%-xp
  if %VERMAJOR% equ 5 if %VERMINOR% lss 2 set XP_SUFFIX=-xp
  
  :: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or
  :: msys versions.
  set FIND_EXE=%SYSTEMROOT%\System32\find.exe
  
negative.code: :: Create the batch files.
  set GIT_TEMPL=%~dp0git.template.bat
  set SED=%GIT_INST_DIR%\usr\bin\sed.exe
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\git.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat"
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\gitk.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\gitk.bat"
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh.bat"
  call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh-keygen.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat"
  
  :: Ensure various git configurations are set correctly at they system level.
  call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.autocrlf false
  call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.filemode false
  call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.preloadindex true
  