author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 16 Nov 2006 03:13:45 +0000 (22:13 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 18 Nov 2006 04:56:15 +0000 (23:56 -0500) | ||
commit | fbee8500a5b64a1c0c6103232879bcecc30f64b4 | |
tree | a22794046c1244c0e73be95d0125c6cdbe1386b8 | tree | snapshot |
parent | b3678bacbcd2dc0e1c61fd91f4146d0c037e626f | commit | diff |
git-gui: Correctly handle GIT_DIR environment variable.
Some users may want to start us by running "git --git-dir=... gui"
rather than trying to cd into the directory first. This is especially
true if they want to just make a shortcut to our executable on Windows
and always have that associated with a certain repository.
Since Tcl on Windows throws away our environment and doesn't pass it
down to the child process correctly we cannot call git-rev-parse to
get the GIT_DIR environment variable. So instead we ask for it
specifically ourselves; if its not defined then we ask rev-parse.
This should actually reduce startup by 1 fork/exec if we were started
as "git gui" as GIT_DIR will be set for us.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Some users may want to start us by running "git --git-dir=... gui"
rather than trying to cd into the directory first. This is especially
true if they want to just make a shortcut to our executable on Windows
and always have that associated with a certain repository.
Since Tcl on Windows throws away our environment and doesn't pass it
down to the child process correctly we cannot call git-rev-parse to
get the GIT_DIR environment variable. So instead we ask for it
specifically ourselves; if its not defined then we ask rev-parse.
This should actually reduce startup by 1 fork/exec if we were started
as "git gui" as GIT_DIR will be set for us.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | diff | blob | history |