All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] t5300-pack-object.sh: portability issue using /usr/bin/stat
@ 2007-04-06 23:49 Arjen Laarhoven
  2007-04-07  2:08 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Arjen Laarhoven @ 2007-04-06 23:49 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

In the test 'compare delta flavors', /usr/bin/stat is used to get file size.
This isn't portable.  There already is a dependency on Perl, use its '-s'
operator to get the file size.

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

diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 35e036a..a400e7a 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -125,8 +125,8 @@ cd "$TRASH"
 
 test_expect_success \
     'compare delta flavors' \
-    'size_2=`stat -c "%s" test-2-${packname_2}.pack` &&
-     size_3=`stat -c "%s" test-3-${packname_3}.pack` &&
+    'size_2=`perl -e "print -s q[test-2-${packname_2}.pack]"` &&
+     size_3=`perl -e "print -s q[test-3-${packname_3}.pack]"` &&
      test $size_2 -gt $size_3'
 
 rm -fr .git2
-- 
1.5.1.rc3.29.gd8b6

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

end of thread, other threads:[~2007-04-07 12:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-06 23:49 [PATCH] t5300-pack-object.sh: portability issue using /usr/bin/stat Arjen Laarhoven
2007-04-07  2:08 ` Junio C Hamano
2007-04-07  2:33   ` Nicolas Pitre
2007-04-07  4:13     ` Junio C Hamano
2007-04-07 12:39       ` Nicolas Pitre
2007-04-07  2:45   ` Randal L. Schwartz

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.