Skip to content

Commit 60fadf8

Browse files
avargitster
authored andcommitted
fetch: document the --negotiate-only option
There was no documentation for the --negotiate-only option added in 9c1e657 (fetch: teach independent negotiation (no packfile), 2021-05-04), only documentation for the related push.negotiation option added in the following commit in 477673d (send-pack: support push negotiation, 2021-05-04). Let's document it, and update the cross-linking I'd added between --negotiation-tip=* and 'fetch.negotiationAlgorithm' in 5266082 (fetch doc: cross-link two new negotiation options, 2018-08-01). I think it would be better to say "in common with the remote" here than "...the server", but the documentation for --negotiation-tip=* above this talks about "the server", so let's continue doing that in this related option. See 3390e42 (fetch-pack: support negotiation tip whitelist, 2018-07-02) for that documentation. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1e5b5ea commit 60fadf8

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Documentation/config/fetch.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ fetch.negotiationAlgorithm::
6969
setting defaults to "skipping".
7070
Unknown values will cause 'git fetch' to error out.
7171
+
72-
See also the `--negotiation-tip` option for linkgit:git-fetch[1].
72+
See also the `--negotiate-only` and `--negotiation-tip` options to
73+
linkgit:git-fetch[1].
7374

7475
fetch.showForcedUpdates::
7576
Set to false to enable `--no-show-forced-updates` in

Documentation/fetch-options.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,17 @@ The argument to this option may be a glob on ref names, a ref, or the (possibly
6262
abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying
6363
this option multiple times, one for each matching ref name.
6464
+
65-
See also the `fetch.negotiationAlgorithm` configuration variable
66-
documented in linkgit:git-config[1].
65+
See also the `fetch.negotiationAlgorithm` and `push.negotiate`
66+
configuration variables documented in linkgit:git-config[1], and the
67+
`--negotiate-only` option below.
68+
69+
--negotiate-only::
70+
Do not fetch anything from the server, and instead print the
71+
ancestors of the provided `--negotiation-tip=*` arguments,
72+
which we have in common with the server.
73+
+
74+
Internally this is used to implement the `push.negotiate` option, see
75+
linkgit:git-config[1].
6776

6877
--dry-run::
6978
Show what would be done, without making any changes.

0 commit comments

Comments
 (0)