author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 12 Jul 2007 06:31:28 +0000 (02:31 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 12 Jul 2007 06:38:14 +0000 (02:38 -0400) | ||
commit | 20f1a10bfb6c31a3728a74bf1c33cb3cc5ac0c7e | |
tree | 8d68b72b2f7875d4f52de0876dedecde71079735 | tree | snapshot |
parent | e87fb0f1b4a4b458394a65d664145a9a8001e821 | commit | diff |
git-gui: Work around bad interaction between Tcl and cmd.exe on ^{tree}
From Johannes Sixt <J.Sixt@eudaptics.com>:
> It seems that MSYS's wish does some quoting for Bourne shells,
> in particular, escape the first '{' of the "^{tree}" suffix, but
> then it uses cmd.exe to run "git rev-parse". However, cmd.exe does
> not remove the backslash, so that the resulting rev expression
> ends up in git's guts as unrecognizable garbage: rev-parse fails,
> and git-gui hickups in a way that it must be restarted.
Johannes originally submitted a patch to this section of commit.tcl
to use `git rev-parse $PARENT:`, but not all versions of Git will
accept that format. So I'm just taking the really simple approach
here of scanning the first line of the commit to grab its tree.
About the same cost, but works everywhere.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
From Johannes Sixt <J.Sixt@eudaptics.com>:
> It seems that MSYS's wish does some quoting for Bourne shells,
> in particular, escape the first '{' of the "^{tree}" suffix, but
> then it uses cmd.exe to run "git rev-parse". However, cmd.exe does
> not remove the backslash, so that the resulting rev expression
> ends up in git's guts as unrecognizable garbage: rev-parse fails,
> and git-gui hickups in a way that it must be restarted.
Johannes originally submitted a patch to this section of commit.tcl
to use `git rev-parse $PARENT:`, but not all versions of Git will
accept that format. So I'm just taking the really simple approach
here of scanning the first line of the commit to grab its tree.
About the same cost, but works everywhere.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/commit.tcl | diff | blob | history |