public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg•org>
To: Jeff King <peff@peff•net>
Cc: Junio C Hamano <gitster@pobox•com>,
	Nanako Shiraishi <nanako3@lavabit•com>,
	git@vger•kernel.org
Subject: [PATCH 8/6] t4030, t4031: work around bogus MSYS bash path conversion
Date: Fri, 01 Jan 2010 23:15:18 +0100	[thread overview]
Message-ID: <4B3E73F6.3040402@kdbg.org> (raw)
In-Reply-To: <4B3E73AE.6050003@kdbg.org>

Recall that MSYS bash converts POSIX style absolute paths to Windows style
absolute paths. Unfortunately, it converts a program argument that begins
with a double-quote and otherwise looks like an absolute POSIX path, but
in doing so, it strips everything past the second double-quote[*]. This
case is triggered in the two test scripts. The work-around is to place the
Windows style path between the quotes to avoid the path conversion.

[*] It is already bogus that a conversion is even considered when a program
argument begins with a double-quote because it cannot be an absolute POSIX
path.

Signed-off-by: Johannes Sixt <j6t@kdbg•org>
---
  t/t4030-diff-textconv.sh       |    2 +-
  t/t4031-diff-rewrite-binary.sh |    2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh
index 3cb7e63..9b94647 100755
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
@@ -50,7 +50,7 @@ test_expect_success 'file is considered binary by plumbing' '

  test_expect_success 'setup textconv filters' '
  	echo file diff=foo >.gitattributes &&
-	git config diff.foo.textconv "\"$PWD\""/hexdump &&
+	git config diff.foo.textconv "\"$(pwd)\""/hexdump &&
  	git config diff.fail.textconv false
  '

diff --git a/t/t4031-diff-rewrite-binary.sh b/t/t4031-diff-rewrite-binary.sh
index 27fb31b..7e7b307 100755
--- a/t/t4031-diff-rewrite-binary.sh
+++ b/t/t4031-diff-rewrite-binary.sh
@@ -54,7 +54,7 @@ chmod +x dump

  test_expect_success 'setup textconv' '
  	echo file diff=foo >.gitattributes &&
-	git config diff.foo.textconv "\"$PWD\""/dump
+	git config diff.foo.textconv "\"$(pwd)\""/dump
  '

  test_expect_success 'rewrite diff respects textconv' '
-- 
1.6.6.1073.gd853b.dirty

  reply	other threads:[~2010-01-01 22:17 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 22:17 Giving command line parameter to textconv command? Nanako Shiraishi
2009-12-14 23:31 ` Junio C Hamano
2009-12-15  3:11   ` Nanako Shiraishi
2009-12-15  5:56     ` Junio C Hamano
2009-12-15 16:49       ` Jeff King
2009-12-16  1:05         ` Junio C Hamano
2009-12-16  1:13           ` Jeff King
2009-12-15 17:03   ` Jeff King
2009-12-15 17:23     ` Junio C Hamano
2009-12-30  3:13   ` Nanako Shiraishi
2009-12-30  8:05     ` Junio C Hamano
2009-12-30  9:56       ` Jeff King
2009-12-30 10:53         ` [PATCH 1/6] run-command: add "use shell" option Jeff King
2009-12-30 13:55           ` Erik Faye-Lund
2010-01-01 22:12           ` Johannes Sixt
2009-12-30 10:53         ` [PATCH 2/6] run-command: convert simple callsites to use_shell Jeff King
2009-12-30 10:55         ` [PATCH 3/6] run-command: optimize out useless shell calls Jeff King
2009-12-31 16:54           ` Johannes Sixt
2009-12-31 19:47             ` Junio C Hamano
2009-12-31 21:41               ` Johannes Sixt
2009-12-31 21:41             ` Jeff King
2009-12-31 22:16               ` Johannes Sixt
2010-01-01  4:50                 ` Jeff King
2010-01-01 10:08                   ` Johannes Sixt
2009-12-30 10:56         ` [PATCH 4/6] editor: use run_command's shell feature Jeff King
2009-12-30 11:01         ` [PATCH 5/6] textconv: use shell to run helper Jeff King
2009-12-30 11:03         ` [PATCH 6/6] diff: run external diff helper with shell Jeff King
2010-01-01 22:14           ` [PATCH 7/6] t0021: use $SHELL_PATH for the filter script Johannes Sixt
2010-01-01 22:15             ` Johannes Sixt [this message]
2010-01-03  7:24             ` Jeff King
2010-01-04 15:50               ` Johannes Sixt
2010-01-04 16:03                 ` Jeff King
2010-01-04 16:46                   ` 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=4B3E73F6.3040402@kdbg.org \
    --to=j6t@kdbg$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=nanako3@lavabit$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox