mirror of
https://github.com/git/git.git
synced 2024-11-16 14:04:52 +01:00
835252272e
For compatibility reasons, "git init --shared=all" does not write "all" into the config, but a number. In the shared setup, you really have to support even older clients on the _same_ repository. But git_config_perm() did not pick up on it. Also, "git update-server-info" failed to pick up on the shared permissions. This patch fixes both issues, and adds a test to prove it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Tested-by: martin f krafft <madduck@madduck.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
27 lines
495 B
Bash
Executable file
27 lines
495 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 &&
|
|
test 444 = $(stat -c %a .git/info/refs)
|
|
'
|
|
|
|
test_done
|