Merge branch 'nd/doc-header'
authorJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:21 +0000 (14:38 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:22 +0000 (14:38 +0900)
Doc formatting fix.

* nd/doc-header:
doc: keep first level section header in upper case

1  2 
Documentation/git-apply.txt
Documentation/git-clone.txt
Documentation/git-filter-branch.txt
Documentation/git-gc.txt
Documentation/git-push.txt
Documentation/gitattributes.txt
index c993fbf714d6d531105dfa0d8a9f024304bc0164,ad0888bfcb78aab335a734ffd7c2d68ca7b750fb..67228494c00e1df676723072d0884f7705e532f1
@@@ -113,10 -113,8 +113,10 @@@ explained for the configuration variabl
  linkgit:git-config[1]).
  
  -p<n>::
 -      Remove <n> leading slashes from traditional diff paths. The
 -      default is 1.
 +      Remove <n> leading path components (separated by slashes) from
 +      traditional diff paths. E.g., with `-p2`, a patch against
 +      `a/dir/file` will be applied directly to `file`. The default is
 +      1.
  
  -C<n>::
        Ensure at least <n> lines of surrounding context match before
@@@ -242,7 -240,7 +242,7 @@@ When `git apply` is used as a "better G
  the `--unsafe-paths` option to override this safety check.  This option
  has no effect when `--index` or `--cached` is in use.
  
- Configuration
+ CONFIGURATION
  -------------
  
  apply.ignoreWhitespace::
@@@ -253,7 -251,7 +253,7 @@@ apply.whitespace:
        When no `--whitespace` flag is given from the command
        line, this configuration item is used as the default.
  
- Submodules
+ SUBMODULES
  ----------
  If the patch contains any changes to submodules then 'git apply'
  treats these changes as follows.
index b844b9957cea30dcca244e863a5f41f7eaf51d8e,5a863f9a4c7e5f702b14804632e4dcaaee5a7a1a..a55536f0bfb2dfa3774e1b952ac4dee1eea6e505
@@@ -260,7 -260,7 +260,7 @@@ or `--mirror` is given
  
  <repository>::
        The (possibly remote) repository to clone from.  See the
 -      <<URLS,URLS>> section below for more information on specifying
 +      <<URLS,GIT URLS>> section below for more information on specifying
        repositories.
  
  <directory>::
  :git-clone: 1
  include::urls.txt[]
  
- Examples
+ EXAMPLES
  --------
  
  * Clone from upstream:
index 1d4d2f860453d4e0557c2473a5404bafb76da08e,aae02533790a7af795dad851e5512e1bff84c4cb..e6f08ab189489ec1631169d0ad0b190428883235
@@@ -230,7 -230,7 +230,7 @@@ rewrite, the exit status is `2`.  On an
  any other non-zero value.
  
  
- Examples
+ EXAMPLES
  --------
  
  Suppose you want to remove a file (containing confidential information
@@@ -288,7 -288,7 +288,7 @@@ git filter-branch --parent-filter 
  or even simpler:
  
  -----------------------------------------------
 -echo "$commit-id $graft-id" >> .git/info/grafts
 +git replace --graft $commit-id $graft-id
  git filter-branch $graft-id..HEAD
  -----------------------------------------------
  
@@@ -406,7 -406,7 +406,7 @@@ git filter-branch --index-filter 
  
  
  
- Checklist for Shrinking a Repository
+ CHECKLIST FOR SHRINKING A REPOSITORY
  ------------------------------------
  
  git-filter-branch can be used to get rid of a subset of files,
@@@ -445,7 -445,7 +445,7 @@@ warned
    (or if your git-gc is not new enough to support arguments to
    `--prune`, use `git repack -ad; git prune` instead).
  
- Notes
+ NOTES
  -----
  
  git-filter-branch allows you to make complex shell-scripted rewrites
diff --combined Documentation/git-gc.txt
index bb376ac584d0603c2cd6cb81a1ea3756d5c1531c,b61fb5751f64142d4192b2a534002c0318605b72..24b2dd44fe445a66121fa957f0af8e2209a85676
@@@ -9,7 -9,7 +9,7 @@@ git-gc - Cleanup unnecessary files and 
  SYNOPSIS
  --------
  [verse]
 -'git gc' [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune] [--force]
 +'git gc' [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune] [--force] [--keep-largest-pack]
  
  DESCRIPTION
  -----------
@@@ -56,16 -56,10 +56,16 @@@ single pack using `git repack -d -l`.  
  to 0 disables automatic packing of loose objects.
  +
  If the number of packs exceeds the value of `gc.autoPackLimit`,
 -then existing packs (except those marked with a `.keep` file)
 +then existing packs (except those marked with a `.keep` file
 +or over `gc.bigPackThreshold` limit)
  are consolidated into a single pack by using the `-A` option of
 -'git repack'. Setting `gc.autoPackLimit` to 0 disables
 -automatic consolidation of packs.
 +'git repack'.
 +If the amount of memory is estimated not enough for `git repack` to
 +run smoothly and `gc.bigPackThreshold` is not set, the largest
 +pack will also be excluded (this is the equivalent of running `git gc`
 +with `--keep-base-pack`).
 +Setting `gc.autoPackLimit` to 0 disables automatic consolidation of
 +packs.
  +
  If houskeeping is required due to many loose objects or packs, all
  other housekeeping tasks (e.g. rerere, working trees, reflog...) will
@@@ -90,12 -84,7 +90,12 @@@ be performed as well
        Force `git gc` to run even if there may be another `git gc`
        instance running on this repository.
  
- Configuration
 +--keep-largest-pack::
 +      All packs except the largest pack and those marked with a
 +      `.keep` files are consolidated into a single pack. When this
 +      option is used, `gc.bigPackThreshold` is ignored.
 +
+ CONFIGURATION
  -------------
  
  The optional configuration variable `gc.reflogExpire` can be
@@@ -140,7 -129,7 +140,7 @@@ The optional configuration variable `gc
  much time is spent optimizing the delta compression of the objects in
  the repository when the --aggressive option is specified.  The larger
  the value, the more time is spent optimizing the delta compression.  See
 -the documentation for the --window' option in linkgit:git-repack[1] for
 +the documentation for the --window option in linkgit:git-repack[1] for
  more details.  This defaults to 250.
  
  Similarly, the optional configuration variable `gc.aggressiveDepth`
@@@ -155,7 -144,7 +155,7 @@@ old a stale working tree should be befo
  it. Default is "3 months ago".
  
  
- Notes
+ NOTES
  -----
  
  'git gc' tries very hard not to delete objects that are referenced
index 34410f9fcad6eaac3a4ef036ed88c63596928b41,241c4ddbbe96fb9d835903f88690007915680356..02f65013992fd6d98d8fd7654ecbda4bb6ca1f40
@@@ -300,7 -300,7 +300,7 @@@ origin +master` to force a push to the 
        These options are passed to linkgit:git-send-pack[1]. A thin transfer
        significantly reduces the amount of sent data when the sender and
        receiver share many of the same objects in common. The default is
 -      \--thin.
 +      `--thin`.
  
  -q::
  --quiet::
@@@ -423,7 -423,7 +423,7 @@@ reason:
        refs, no explanation is needed. For a failed ref, the reason for
        failure is described.
  
- Note about fast-forwards
+ NOTE ABOUT FAST-FORWARDS
  ------------------------
  
  When an update changes a branch (or more in general, a ref) that used to
@@@ -510,7 -510,7 +510,7 @@@ overwrite it. In other words, "git pus
  a case where you do mean to lose history.
  
  
- Examples
+ EXAMPLES
  --------
  
  `git push`::
index ee210be3ecff794389764ebca2aff1d7658018f5,ee95d8531df3f2a109301f421a76a6ebeb34e35b..b72936a885c9772d60c7105cb9e5ba2e27968fcc
@@@ -279,94 -279,6 +279,94 @@@ few exceptions.  Even though..
    catch potential problems early, safety triggers.
  
  
 +`working-tree-encoding`
 +^^^^^^^^^^^^^^^^^^^^^^^
 +
 +Git recognizes files encoded in ASCII or one of its supersets (e.g.
 +UTF-8, ISO-8859-1, ...) as text files. Files encoded in certain other
 +encodings (e.g. UTF-16) are interpreted as binary and consequently
 +built-in Git text processing tools (e.g. 'git diff') as well as most Git
 +web front ends do not visualize the contents of these files by default.
 +
 +In these cases you can tell Git the encoding of a file in the working
 +directory with the `working-tree-encoding` attribute. If a file with this
 +attribute is added to Git, then Git reencodes the content from the
 +specified encoding to UTF-8. Finally, Git stores the UTF-8 encoded
 +content in its internal data structure (called "the index"). On checkout
 +the content is reencoded back to the specified encoding.
 +
 +Please note that using the `working-tree-encoding` attribute may have a
 +number of pitfalls:
 +
 +- Alternative Git implementations (e.g. JGit or libgit2) and older Git
 +  versions (as of March 2018) do not support the `working-tree-encoding`
 +  attribute. If you decide to use the `working-tree-encoding` attribute
 +  in your repository, then it is strongly recommended to ensure that all
 +  clients working with the repository support it.
 +
 +  For example, Microsoft Visual Studio resources files (`*.rc`) or
 +  PowerShell script files (`*.ps1`) are sometimes encoded in UTF-16.
 +  If you declare `*.ps1` as files as UTF-16 and you add `foo.ps1` with
 +  a `working-tree-encoding` enabled Git client, then `foo.ps1` will be
 +  stored as UTF-8 internally. A client without `working-tree-encoding`
 +  support will checkout `foo.ps1` as UTF-8 encoded file. This will
 +  typically cause trouble for the users of this file.
 +
 +  If a Git client, that does not support the `working-tree-encoding`
 +  attribute, adds a new file `bar.ps1`, then `bar.ps1` will be
 +  stored "as-is" internally (in this example probably as UTF-16).
 +  A client with `working-tree-encoding` support will interpret the
 +  internal contents as UTF-8 and try to convert it to UTF-16 on checkout.
 +  That operation will fail and cause an error.
 +
 +- Reencoding content to non-UTF encodings can cause errors as the
 +  conversion might not be UTF-8 round trip safe. If you suspect your
 +  encoding to not be round trip safe, then add it to
 +  `core.checkRoundtripEncoding` to make Git check the round trip
 +  encoding (see linkgit:git-config[1]). SHIFT-JIS (Japanese character
 +  set) is known to have round trip issues with UTF-8 and is checked by
 +  default.
 +
 +- Reencoding content requires resources that might slow down certain
 +  Git operations (e.g 'git checkout' or 'git add').
 +
 +Use the `working-tree-encoding` attribute only if you cannot store a file
 +in UTF-8 encoding and if you want Git to be able to process the content
 +as text.
 +
 +As an example, use the following attributes if your '*.ps1' files are
 +UTF-16 encoded with byte order mark (BOM) and you want Git to perform
 +automatic line ending conversion based on your platform.
 +
 +------------------------
 +*.ps1         text working-tree-encoding=UTF-16
 +------------------------
 +
 +Use the following attributes if your '*.ps1' files are UTF-16 little
 +endian encoded without BOM and you want Git to use Windows line endings
 +in the working directory. Please note, it is highly recommended to
 +explicitly define the line endings with `eol` if the `working-tree-encoding`
 +attribute is used to avoid ambiguity.
 +
 +------------------------
 +*.ps1         text working-tree-encoding=UTF-16LE eol=CRLF
 +------------------------
 +
 +You can get a list of all available encodings on your platform with the
 +following command:
 +
 +------------------------
 +iconv --list
 +------------------------
 +
 +If you do not know the encoding of a file, then you can use the `file`
 +command to guess the encoding:
 +
 +------------------------
 +file foo.ps1
 +------------------------
 +
 +
  `ident`
  ^^^^^^^
  
@@@ -1229,8 -1141,8 +1229,8 @@@ to
  ------------
  
  
- EXAMPLE
- -------
+ EXAMPLES
+ --------
  
  If you have these three `gitattributes` file: