mirror of
https://github.com/git/git.git
synced 2024-11-05 08:47:56 +01:00
19b28bf545
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>
36 lines
602 B
Bash
Executable file
36 lines
602 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2007 Johannes Schindelin
|
|
#
|
|
|
|
test_description='Test shared repository initialization'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'shared=all' '
|
|
mkdir sub &&
|
|
cd sub &&
|
|
git init --shared=all &&
|
|
test 2 = $(git config core.sharedrepository)
|
|
'
|
|
|
|
test_expect_success 'update-server-info honors core.sharedRepository' '
|
|
: > a1 &&
|
|
git add a1 &&
|
|
test_tick &&
|
|
git commit -m a1 &&
|
|
umask 0277 &&
|
|
git update-server-info &&
|
|
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
|