[PATCH] Work around a bad interaction between Tcl and cmd.exe with "^{tree}"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Fortunately, recent versions of git can refer to the root tree object using
the notation "$commit:", which avoids the problematic case.

Signed-off-by: Johannes Sixt <johannes.sixt@xxxxxxxxxx>
---
This is a resend with a slightly improved commit message.
The first version didn't get through for some reason anyway, it seems.

 lib/commit.tcl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/commit.tcl b/lib/commit.tcl
index dc7c88c..43a5aca 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -258,7 +258,7 @@ proc commit_committree {fd_wt curHEAD msg} {
 	# -- Verify this wasn't an empty change.
 	#
 	if {$commit_type eq {normal}} {
-		set old_tree [git rev-parse "$PARENT^{tree}"]
+		set old_tree [git rev-parse "$PARENT:"]
 		if {$tree_id eq $old_tree} {
 			info_popup {No changes to commit.
 
-- 
1.5.3.rc0.32.g2968f

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux