All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <J.Sixt@eudaptics.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: [PATCH] Work around a bad interaction between Tcl and cmd.exe with  "^{tree}"
Date: Tue, 10 Jul 2007 18:10:20 +0200	[thread overview]
Message-ID: <4693AF6C.99DB933@eudaptics.com> (raw)

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@telecom.at>
---
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

             reply	other threads:[~2007-07-10 16:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10 16:10 Johannes Sixt [this message]
2007-07-11  8:03 ` [PATCH] Work around a bad interaction between Tcl and cmd.exe with "^{tree}" Shawn O. Pearce
2007-07-12  6:47 ` Shawn O. Pearce
  -- strict thread matches above, loose matches on Subject: below --
2007-07-10 13:09 Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4693AF6C.99DB933@eudaptics.com \
    --to=j.sixt@eudaptics.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.