diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-07-09 01:17:09 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-07-09 01:17:09 -0400 |
commit | 0b81261622afad691501ee51d7811048cf4a5fce (patch) | |
tree | 0b2862469d7a162e11063bd2fe301c45331c27d2 /lib/commit.tcl | |
parent | b79223064e163aa0ce7f5b63d12158e87f8729e4 (diff) | |
download | git-0b81261622afad691501ee51d7811048cf4a5fce.tar.gz git-0b81261622afad691501ee51d7811048cf4a5fce.tar.xz |
git-gui: Always use absolute path to all git executables
Rather than making the C library search for git every time we want
to execute it we now search for the main git wrapper at startup, do
symlink resolution, and then always use the absolute path that we
found to execute the binary later on. This should save us some
cycles, especially on stat challenged systems like Cygwin/Win32.
While I was working on this change I also converted all of our
existing pipes ([open "| git ..."]) to use two new pipe wrapper
functions. These functions take additional options like --nice
and --stderr which instructs Tcl to take special action, like
running the underlying git program through `nice` (if available)
or redirect stderr to stdout for capture in Tcl.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/commit.tcl')
-rw-r--r-- | lib/commit.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl index d0e4996ba..dc7c88c60 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -25,7 +25,7 @@ You are currently in the middle of a merge that has not been fully completed. Y set msg {} set parents [list] if {[catch { - set fd [open "| git cat-file commit $curHEAD" r] + set fd [git_read cat-file commit $curHEAD] fconfigure $fd -encoding binary -translation lf if {[catch {set enc $repo_config(i18n.commitencoding)}]} { set enc utf-8 @@ -235,7 +235,7 @@ proc commit_prehook_wait {fd_ph curHEAD msg} { proc commit_writetree {curHEAD msg} { ui_status {Committing changes...} - set fd_wt [open "| git write-tree" r] + set fd_wt [git_read write-tree] fileevent $fd_wt readable \ [list commit_committree $fd_wt $curHEAD $msg] } |