Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjen Laarhoven <arjen@yaph.org>2007-08-17 02:02:17 +0400
committerJunio C Hamano <gitster@pobox.com>2007-08-17 02:32:46 +0400
commit19b28bf5454380f9f65063e8bc3cdee669e731a9 (patch)
tree463fddb1e89621af7ce32d4327b5f50d9c84754c /t/t1301-shared-repo.sh
parent13cc4c81df8f6b45540bd50ddffd3c11f98829bf (diff)
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>
Diffstat (limited to 't/t1301-shared-repo.sh')
-rwxr-xr-xt/t1301-shared-repo.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index bb5f30220a..6bfe19a4e5 100755
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
@@ -21,7 +21,16 @@ 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)
+ 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