提交 19b28bf5 编写于 作者: A Arjen Laarhoven 提交者: Junio C Hamano

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: NArjen Laarhoven <arjen@yaph.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 13cc4c81
...@@ -21,7 +21,16 @@ test_expect_success 'update-server-info honors core.sharedRepository' ' ...@@ -21,7 +21,16 @@ test_expect_success 'update-server-info honors core.sharedRepository' '
git commit -m a1 && git commit -m a1 &&
umask 0277 && umask 0277 &&
git update-server-info && git update-server-info &&
test 444 = $(stat -c %a .git/info/refs) actual="$(ls -l .git/info/refs)" &&
case "$actual" in
-r--r--r--*)
: happy
;;
*)
echo Oops, .git/info/refs is not 0444
false
;;
esac
' '
test_done test_done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册