This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

cmd: Use the same HOME fallback-logic as in etc/profile

This probably also fixes issue 497.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
  • Loading branch information...
sschuberth committed Jul 14, 2010
1 parent 6460bac commit 53e5b4faac83b8c503014612927e167968217854
Showing with 5 additions and 2 deletions.
  1. +3 −1 cmd/git.cmd
  2. +2 −1 cmd/gitk.cmd
View
@@ -6,7 +6,9 @@
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%
-@if "%HOME%"=="" @set HOME=%USERPROFILE%
+@if not exist "%HOME%" @set HOME="%HOMEDRIVE%%HOMEPATH%"
+@if not exist "%HOME%" @set HOME="%USERPROFILE%"
+
@set PLINK_PROTOCOL=ssh
@if "%1"=="gui" @goto gui
View
@@ -6,6 +6,7 @@
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%
-@if "%HOME%"=="" @set HOME=%USERPROFILE%
+@if not exist "%HOME%" @set HOME="%HOMEDRIVE%%HOMEPATH%"
+@if not exist "%HOME%" @set HOME="%USERPROFILE%"
@start wish.exe "%git_install_root%\bin\gitk" -- %*

0 comments on commit 53e5b4f

Please sign in to comment.