upload-pack: document and rename --advertise-refs
The --advertise-refs documentation in git-upload-pack added in9812f2136b
(upload-pack.c: use parse-options API, 2016-05-31) hasn't been entirely true ever since v2 support was implemented ine52449b672
(connect: request remote refs using v2, 2018-03-15). Under v2 we don't advertise the refs at all, but rather dump the capabilities header. This option has always been an obscure internal implementation detail, it wasn't even documented for git-receive-pack. Since it has exactly one user let's rename it to --http-backend-info-refs, which is more accurate and points the reader in the right direction. Let's also cross-link this from the protocol v1 and v2 documentation. I'm retaining a hidden --advertise-refs alias in case there's any external users of this, and making both options hidden to the bash completion (as with most other internal-only options). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
f234da8019
commit
98e2d9d6f7
@ -8,6 +8,20 @@ test_expect_success 'setup' '
|
||||
test_commit --no-tag initial
|
||||
'
|
||||
|
||||
test_expect_success 'git upload-pack --http-backend-info-refs and --advertise-refs are aliased' '
|
||||
git upload-pack --http-backend-info-refs . >expected 2>err.expected &&
|
||||
git upload-pack --advertise-refs . >actual 2>err.actual &&
|
||||
test_cmp err.expected err.actual &&
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
test_expect_success 'git receive-pack --http-backend-info-refs and --advertise-refs are aliased' '
|
||||
git receive-pack --http-backend-info-refs . >expected 2>err.expected &&
|
||||
git receive-pack --advertise-refs . >actual 2>err.actual &&
|
||||
test_cmp err.expected err.actual &&
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
test_expect_success 'git upload-pack --advertise-refs' '
|
||||
cat >expect <<-EOF &&
|
||||
$(git rev-parse HEAD) HEAD
|
||||
|
Reference in New Issue
Block a user