git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t1301-shared-repo.sh: fix 'stat' portability issue
@ 2007-08-16 15:21 Arjen Laarhoven
  2007-08-16 19:09 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Arjen Laarhoven @ 2007-08-16 15:21 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List; +Cc: Arjen Laarhoven

The t1301-shared-repo.sh testscript uses /usr/bin/stat to get the file
mode, which isn't portable.  There already is a dependency on Perl, so
use a Perl one-liner to do the file mode test, but portable.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
---
 t/t1301-shared-repo.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index bb5f302..888c5fb 100755
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
@@ -21,7 +21,7 @@ test_expect_success 'update-server-info honors core.sharedRepository' '
 	git commit -m a1 &&
 	umask 0277 &&
 	git update-server-info &&
-	test 444 = $(stat -c %a .git/info/refs)
+	$(perl -e '\''exit !(((stat ".git/info/refs")[2] & 0777) == 0444)'\'')
 '
 
 test_done
-- 
1.5.3.rc4.67.gf9286

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-17 23:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-16 15:21 [PATCH] t1301-shared-repo.sh: fix 'stat' portability issue Arjen Laarhoven
2007-08-16 19:09 ` Junio C Hamano
2007-08-16 22:02   ` Arjen Laarhoven
2007-08-17 12:48     ` Uwe Kleine-König
2007-08-17 23:37       ` Junio C Hamano

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).