@matheusbsbs / matheus-bagliano / commits / 19b28bf545
Fork 0

t1301-shared-repo.sh: fix 'stat' portability issue

The t1301-shared-repo.sh testscript uses /usr/bin/stat to get the file mode, which isn't portable. Implement the test in shell using 'ls' as shown by Junio. Signed-off-by: Arjen Laarhoven <arjen@yaph.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Arjen Laarhoven committed Aug 17, 2007 at 00:02 UTC 19b28bf5454380f9f65063e8bc3cdee669e731a9
1 file changed +10 -1
t/t1301-shared-repo.sh
+10 -1
@@ -21,7 +21,16 @@ test_expect_success 'update-server-info honors core.sharedRepository' '
21 git commit -m a1 &&
22 umask 0277 &&
23 git update-server-info &&
24 - test 444 = $(stat -c %a .git/info/refs)
24 + actual="$(ls -l .git/info/refs)" &&
25 + case "$actual" in
26 + -r--r--r--*)
27 + : happy
28 + ;;
29 + *)
30 + echo Oops, .git/info/refs is not 0444
31 + false
32 + ;;
33 + esac
34 '
35
36 test_done