From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Dan McMahill <dmcmahill@netbsd.org>,
Steven Drake <sdrake@xnet.co.nz>
Subject: Re: [PATCH] diff: "S_IFREG | 0644" to "(S_IFREG | 0644)" to avoid warning
Date: Mon, 4 Oct 2010 05:35:50 -0500 [thread overview]
Message-ID: <20101004103550.GA4738@burratino> (raw)
In-Reply-To: <AANLkTim+QH6=XJikOsZs=qt9ZFHjP7gWz0zo9n4vz+gk@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> But tests on NetBSD with /bin/sh still fail since we use cd -P, but we
> have unapplied patches for that so I didn't pursue it:
>
> http://article.gmane.org/gmane.comp.version-control.git/136561/match=
> http://article.gmane.org/gmane.comp.version-control.git/136562/match=
Aren't these v1.7.0-rc0~76^2 and v1.7.0-rc0~76^2^?
Here's a patch for the more important of the remaining problems. I'm
just guessing here; untested, of course.
-- 8< --
Subject: tests: use pwd -P to simulate cd -P for portability
NetBSD supports pwd -P but not cd -P. POSIX has required both for
a while, so this should not be an issue for most Unix-like platforms.
The test harness uses cd -P to ensure $PWD and $(pwd) agree;
cd $(pwd -P) should do that, too.
If pwd -P fails on some platform, with this patch, the test harness
will die with 'FATAL: Unexpected exit with code 1'.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
t/test-lib.sh | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 830e5e7..184bf84 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -916,9 +916,10 @@ rm -fr "$test" || {
}
test_create_repo "$test"
-# Use -P to resolve symlinks in our working directory so that the cwd
-# in subprocesses like git equals our $PWD (for pathname comparisons).
-cd -P "$test" || exit 1
+cd "$test" || exit 1
+# Resolve symlinks in our working directory so that the cwd in
+# subprocesses like git equals our $PWD (for pathname comparisons).
+dir=$(pwd -P) && cd "$dir" || exit 1
HOME=$(pwd)
export HOME
--
1.7.2.3
next prev parent reply other threads:[~2010-10-04 10:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 9:21 [PATCH] diff: "S_IFREG | 0644" to "(S_IFREG | 0644)" to avoid warning Ævar Arnfjörð Bjarmason
2010-10-04 9:35 ` Jonathan Nieder
2010-10-04 9:47 ` Ævar Arnfjörð Bjarmason
2010-10-04 17:54 ` Junio C Hamano
2010-10-04 18:10 ` [PATCH v2] cache.h: work around broken NetBSD system headers Ævar Arnfjörð Bjarmason
2010-10-04 9:42 ` [PATCH] diff: "S_IFREG | 0644" to "(S_IFREG | 0644)" to avoid warning Ævar Arnfjörð Bjarmason
2010-10-04 10:35 ` Jonathan Nieder [this message]
2010-10-04 10:50 ` Jonathan Nieder
2010-10-04 10:53 ` René Scharfe
2010-10-04 11:45 ` Matthieu Moy
2010-10-04 19:23 ` Junio C Hamano
2010-10-04 21:11 ` René Scharfe
2010-10-04 12:28 ` yj2133011
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=20101004103550.GA4738@burratino \
--to=jrnieder@gmail.com \
--cc=avarab@gmail.com \
--cc=dmcmahill@netbsd.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sdrake@xnet.co.nz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).