Merge branch 'dt/gc-ignore-old-gc-logs'
authorJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2017 21:57:15 +0000 (13:57 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2017 21:57:15 +0000 (13:57 -0800)
A "gc.log" file left by a backgrounded "gc --auto" disables further
automatic gc; it has been taught to run at least once a day (by
default) by ignoring a stale "gc.log" file that is too old.

* dt/gc-ignore-old-gc-logs:
gc: ignore old gc.log files

1  2 
Documentation/config.txt
diff --combined Documentation/config.txt
index 9dbd96dbba4e773d7dfd910857ab5d69760a03a0,d385711b70c5e88d2e5972398a51e20f5dd9dd30..47603f54847f70d72d3da328e451392882af5d0b
@@@ -170,9 -170,6 +170,9 @@@ The position of any attributes with res
  be turned off by prefixing them with `no` or `no-` (e.g., `noreverse`,
  `no-ul`, etc).
  +
 +An empty color string produces no color effect at all. This can be used
 +to avoid coloring specific elements without disabling color entirely.
 ++
  For git's pre-defined color slots, the attributes are meant to be reset
  at the beginning of each item in the colored output. So setting
  `color.decorate.branch` to `black` will paint that branch name in a
@@@ -520,12 -517,10 +520,12 @@@ core.logAllRefUpdates:
        "`$GIT_DIR/logs/<ref>`", by appending the new and old
        SHA-1, the date/time and the reason of the update, but
        only when the file exists.  If this configuration
 -      variable is set to true, missing "`$GIT_DIR/logs/<ref>`"
 +      variable is set to `true`, missing "`$GIT_DIR/logs/<ref>`"
        file is automatically created for branch heads (i.e. under
 -      refs/heads/), remote refs (i.e. under refs/remotes/),
 -      note refs (i.e. under refs/notes/), and the symbolic ref HEAD.
 +      `refs/heads/`), remote refs (i.e. under `refs/remotes/`),
 +      note refs (i.e. under `refs/notes/`), and the symbolic ref `HEAD`.
 +      If it is set to `always`, then a missing reflog is automatically
 +      created for any ref under `refs/`.
  +
  This information can be used to determine what commit
  was the tip of a branch "2 days ago".
@@@ -1402,6 -1397,12 +1402,12 @@@ gc.autoDetach:
        Make `git gc --auto` return immediately and run in background
        if the system supports it. Default is true.
  
+ gc.logExpiry::
+       If the file gc.log exists, then `git gc --auto` won't run
+       unless that file is more than 'gc.logExpiry' old.  Default is
+       "1.day".  See `gc.pruneExpire` for more ways to specify its
+       value.
  gc.packRefs::
        Running `git pack-refs` in a repository renders it
        unclonable by Git versions prior to 1.5.1.2 over dumb
@@@ -1919,10 -1920,7 +1925,10 @@@ http.<url>.*:
    must match exactly between the config key and the URL.
  
  . Host/domain name (e.g., `example.com` in `https://example.com/`).
 -  This field must match exactly between the config key and the URL.
 +  This field must match between the config key and the URL. It is
 +  possible to specify a `*` as part of the host name to match all subdomains
 +  at this level. `https://*.example.com/` for example would match
 +  `https://foo.example.com/`, but not `https://foo.bar.example.com/`.
  
  . Port number (e.g., `8080` in `http://example.com:8080/`).
    This field must match exactly between the config key and the URL.
@@@ -1957,17 -1955,6 +1963,17 @@@ Environment variable settings always ov
  matched against are those given directly to Git commands.  This means any URLs
  visited as a result of a redirection do not participate in matching.
  
 +ssh.variant::
 +      Depending on the value of the environment variables `GIT_SSH` or
 +      `GIT_SSH_COMMAND`, or the config setting `core.sshCommand`, Git
 +      auto-detects whether to adjust its command-line parameters for use
 +      with plink or tortoiseplink, as opposed to the default (OpenSSH).
 ++
 +The config variable `ssh.variant` can be set to override this auto-detection;
 +valid values are `ssh`, `plink`, `putty` or `tortoiseplink`. Any other value
 +will be treated as normal ssh. This setting can be overridden via the
 +environment variable `GIT_SSH_VARIANT`.
 +
  i18n.commitEncoding::
        Character encoding the commit messages are stored in; Git itself
        does not care per se, but this information is necessary e.g. when
@@@ -2055,10 -2042,6 +2061,10 @@@ log.follow:
        i.e. it cannot be used to follow multiple files and does not work well
        on non-linear history.
  
 +log.graphColors::
 +      A list of colors, separated by commas, that can be used to draw
 +      history lines in `git log --graph`.
 +
  log.showRoot::
        If true, the initial commit will be shown as a big creation event.
        This is equivalent to a diff against an empty tree.
@@@ -2344,52 -2327,6 +2350,52 @@@ pretty.<name>:
        Note that an alias with the same name as a built-in format
        will be silently ignored.
  
 +protocol.allow::
 +      If set, provide a user defined default policy for all protocols which
 +      don't explicitly have a policy (`protocol.<name>.allow`).  By default,
 +      if unset, known-safe protocols (http, https, git, ssh, file) have a
 +      default policy of `always`, known-dangerous protocols (ext) have a
 +      default policy of `never`, and all other protocols have a default
 +      policy of `user`.  Supported policies:
 ++
 +--
 +
 +* `always` - protocol is always able to be used.
 +
 +* `never` - protocol is never able to be used.
 +
 +* `user` - protocol is only able to be used when `GIT_PROTOCOL_FROM_USER` is
 +  either unset or has a value of 1.  This policy should be used when you want a
 +  protocol to be directly usable by the user but don't want it used by commands which
 +  execute clone/fetch/push commands without user input, e.g. recursive
 +  submodule initialization.
 +
 +--
 +
 +protocol.<name>.allow::
 +      Set a policy to be used by protocol `<name>` with clone/fetch/push
 +      commands. See `protocol.allow` above for the available policies.
 ++
 +The protocol names currently used by git are:
 ++
 +--
 +  - `file`: any local file-based path (including `file://` URLs,
 +    or local paths)
 +
 +  - `git`: the anonymous git protocol over a direct TCP
 +    connection (or proxy, if configured)
 +
 +  - `ssh`: git over ssh (including `host:path` syntax,
 +    `ssh://`, etc).
 +
 +  - `http`: git over http, both "smart http" and "dumb http".
 +    Note that this does _not_ include `https`; if you want to configure
 +    both, you must do so individually.
 +
 +  - any external helpers are named by their protocol (e.g., use
 +    `hg` to allow the `git-remote-hg` helper)
 +--
 +
  pull.ff::
        By default, Git does not create an extra merge commit when merging
        a commit that is a descendant of the current commit. Instead, the
@@@ -2963,7 -2900,7 +2969,7 @@@ submodule.alternateLocation:
        value is set to `superproject` the submodule to be cloned computes
        its alternates location relative to the superprojects alternate.
  
 -submodule.alternateErrorStrategy
 +submodule.alternateErrorStrategy::
        Specifies how to treat errors with the alternates for a submodule
        as computed via `submodule.alternateLocation`. Possible values are
        `ignore`, `info`, `die`. Default is `die`.
@@@ -3136,39 -3073,17 +3142,39 @@@ user.signingKey:
        This option is passed unchanged to gpg's --local-user parameter,
        so you may specify a key using any method that gpg supports.
  
 -versionsort.prereleaseSuffix::
 -      When version sort is used in linkgit:git-tag[1], prerelease
 -      tags (e.g. "1.0-rc1") may appear after the main release
 -      "1.0". By specifying the suffix "-rc" in this variable,
 -      "1.0-rc1" will appear before "1.0".
 -+
 -This variable can be specified multiple times, once per suffix. The
 -order of suffixes in the config file determines the sorting order
 -(e.g. if "-pre" appears before "-rc" in the config file then 1.0-preXX
 -is sorted before 1.0-rcXX). The sorting order between different
 -suffixes is undefined if they are in multiple config files.
 +versionsort.prereleaseSuffix (deprecated)::
 +      Deprecated alias for `versionsort.suffix`.  Ignored if
 +      `versionsort.suffix` is set.
 +
 +versionsort.suffix::
 +      Even when version sort is used in linkgit:git-tag[1], tagnames
 +      with the same base version but different suffixes are still sorted
 +      lexicographically, resulting e.g. in prerelease tags appearing
 +      after the main release (e.g. "1.0-rc1" after "1.0").  This
 +      variable can be specified to determine the sorting order of tags
 +      with different suffixes.
 ++
 +By specifying a single suffix in this variable, any tagname containing
 +that suffix will appear before the corresponding main release.  E.g. if
 +the variable is set to "-rc", then all "1.0-rcX" tags will appear before
 +"1.0".  If specified multiple times, once per suffix, then the order of
 +suffixes in the configuration will determine the sorting order of tagnames
 +with those suffixes.  E.g. if "-pre" appears before "-rc" in the
 +configuration, then all "1.0-preX" tags will be listed before any
 +"1.0-rcX" tags.  The placement of the main release tag relative to tags
 +with various suffixes can be determined by specifying the empty suffix
 +among those other suffixes.  E.g. if the suffixes "-rc", "", "-ck" and
 +"-bfs" appear in the configuration in this order, then all "v4.8-rcX" tags
 +are listed first, followed by "v4.8", then "v4.8-ckX" and finally
 +"v4.8-bfsX".
 ++
 +If more than one suffixes match the same tagname, then that tagname will
 +be sorted according to the suffix which starts at the earliest position in
 +the tagname.  If more than one different matching suffixes start at
 +that earliest position, then that tagname will be sorted according to the
 +longest of those suffixes.
 +The sorting order between different suffixes is undefined if they are
 +in multiple config files.
  
  web.browser::
        Specify a web browser that may be used by some commands.