diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-08-05 03:25:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-05 08:59:37 -0700 |
commit | 98e2d9d6f7dc1aff61e99a1daed98e18c7c8526b (patch) | |
tree | 4922d2ea560278279c8421556e834b72d304695b /builtin | |
parent | serve.[ch]: remove "serve_options", split up --advertise-refs code (diff) | |
download | tgif-98e2d9d6f7dc1aff61e99a1daed98e18c7c8526b.tar.xz |
upload-pack: document and rename --advertise-refs
The --advertise-refs documentation in git-upload-pack added in
9812f2136b3 (upload-pack.c: use parse-options API, 2016-05-31) hasn't
been entirely true ever since v2 support was implemented in
e52449b6722 (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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/receive-pack.c | 3 | ||||
-rw-r--r-- | builtin/upload-pack.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 2d1f97e1ca..7ffb45d706 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -2477,7 +2477,8 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) struct option options[] = { OPT__QUIET(&quiet, N_("quiet")), OPT_HIDDEN_BOOL(0, "stateless-rpc", &stateless_rpc, NULL), - OPT_HIDDEN_BOOL(0, "advertise-refs", &advertise_refs, NULL), + OPT_HIDDEN_BOOL(0, "http-backend-info-refs", &advertise_refs, NULL), + OPT_ALIAS(0, "advertise-refs", "http-backend-info-refs"), OPT_HIDDEN_BOOL(0, "reject-thin-pack-for-testing", &reject_thin, NULL), OPT_END() }; diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c index 8506030a64..125af53885 100644 --- a/builtin/upload-pack.c +++ b/builtin/upload-pack.c @@ -22,8 +22,9 @@ int cmd_upload_pack(int argc, const char **argv, const char *prefix) struct option options[] = { OPT_BOOL(0, "stateless-rpc", &stateless_rpc, N_("quit after a single request/response exchange")), - OPT_BOOL(0, "advertise-refs", &advertise_refs, - N_("exit immediately after initial ref advertisement")), + OPT_HIDDEN_BOOL(0, "http-backend-info-refs", &advertise_refs, + N_("serve up the info/refs for git-http-backend")), + OPT_ALIAS(0, "advertise-refs", "http-backend-info-refs"), OPT_BOOL(0, "strict", &strict, N_("do not try <directory>/.git/ if <directory> is no Git directory")), OPT_INTEGER(0, "timeout", &timeout, |