t4014: let sed open its own files
[gitweb.git] / Documentation / fetch-options.txt
index 97d3217df9ac3f048073f62a0d5356c4546354ff..3c9b4f9e09515d99d32a3d6dfa6603ef3a6f23b6 100644 (file)
@@ -42,6 +42,25 @@ the current repository has the same history as the source repository.
        .git/shallow. This option updates .git/shallow and accept such
        refs.
 
+--negotiation-tip=<commit|glob>::
+       By default, Git will report, to the server, commits reachable
+       from all local refs to find common commits in an attempt to
+       reduce the size of the to-be-received packfile. If specified,
+       Git will only report commits reachable from the given tips.
+       This is useful to speed up fetches when the user knows which
+       local ref is likely to have commits in common with the
+       upstream ref being fetched.
++
+This option may be specified more than once; if so, Git will report
+commits reachable from any of the given commits.
++
+The argument to this option may be a glob on ref names, a ref, or the (possibly
+abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying
+this option multiple times, one for each matching ref name.
++
+See also the `fetch.negotiationAlgorithm` configuration variable
+documented in linkgit:git-config[1].
+
 ifndef::git-pull[]
 --dry-run::
        Show what would be done, without making any changes.
@@ -49,11 +68,16 @@ endif::git-pull[]
 
 -f::
 --force::
-       When 'git fetch' is used with `<rbranch>:<lbranch>`
-       refspec, it refuses to update the local branch
-       `<lbranch>` unless the remote branch `<rbranch>` it
-       fetches is a descendant of `<lbranch>`.  This option
-       overrides that check.
+       When 'git fetch' is used with `<src>:<dst>` refspec it may
+       refuse to update the local branch as discussed
+ifdef::git-pull[]
+       in the `<refspec>` part of the linkgit:git-fetch[1]
+       documentation.
+endif::git-pull[]
+ifndef::git-pull[]
+       in the `<refspec>` part below.
+endif::git-pull[]
+       This option overrides that check.
 
 -k::
 --keep::
@@ -64,6 +88,10 @@ ifndef::git-pull[]
        Allow several <repository> and <group> arguments to be
        specified. No <refspec>s may be specified.
 
+--[no-]auto-gc::
+       Run `git gc --auto` at the end to perform garbage collection
+       if needed. This is enabled by default.
+
 -p::
 --prune::
        Before fetching, remove any remote-tracking references that no
@@ -192,10 +220,24 @@ endif::git-pull[]
 --server-option=<option>::
        Transmit the given string to the server when communicating using
        protocol version 2.  The given string must not contain a NUL or LF
-       character.
+       character.  The server's handling of server options, including
+       unknown ones, is server-specific.
        When multiple `--server-option=<option>` are given, they are all
        sent to the other side in the order listed on the command line.
 
+--show-forced-updates::
+       By default, git checks if a branch is force-updated during
+       fetch. This can be disabled through fetch.showForcedUpdates, but
+       the --show-forced-updates option guarantees this check occurs.
+       See linkgit:git-config[1].
+
+--no-show-forced-updates::
+       By default, git checks if a branch is force-updated during
+       fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates
+       to false to skip this check for performance reasons. If used during
+       'git-pull' the --ff-only option will still check for forced updates
+       before attempting a fast-forward update. See linkgit:git-config[1].
+
 -4::
 --ipv4::
        Use IPv4 addresses only, ignoring IPv6 addresses.