Merge branch 'nd/commit-p-doc'
authorJunio C Hamano <gitster@pobox.com>
Mon, 17 Oct 2016 20:25:19 +0000 (13:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Oct 2016 20:25:19 +0000 (13:25 -0700)
Documentation for "git commit" was updated to clarify that "commit
-p <paths>" adds to the current contents of the index to come up
with what to commit.

* nd/commit-p-doc:
git-commit.txt: clarify --patch mode with pathspec

1  2 
Documentation/git-commit.txt
index b0a294d3b5e13b853f6c2c60201c2458788d4f00,ac219e9b5925a50faab6b0fbc50057ad294d1ad0..f2ab0ee2e7d1ff0f79c09cbd27e745f5f08d139d
@@@ -29,7 -29,8 +29,8 @@@ The content to be added can be specifie
  2. by using 'git rm' to remove files from the working tree
     and the index, again before using the 'commit' command;
  
- 3. by listing files as arguments to the 'commit' command, in which
+ 3. by listing files as arguments to the 'commit' command
+    (without --interactive or --patch switch), in which
     case the commit will ignore changes staged in the index, and instead
     record the current content of the listed files (which must already
     be known to Git);
@@@ -41,7 -42,8 +42,8 @@@
     actual commit;
  
  5. by using the --interactive or --patch switches with the 'commit' command
-    to decide one by one which files or hunks should be part of the commit,
+    to decide one by one which files or hunks should be part of the commit
+    in addition to contents in the index,
     before finalizing the operation. See the ``Interactive Mode'' section of
     linkgit:git-add[1] to learn how to operate these modes.
  
@@@ -75,7 -77,7 +77,7 @@@ OPTION
  
  -c <commit>::
  --reedit-message=<commit>::
 -      Like '-C', but with '-c' the editor is invoked, so that
 +      Like '-C', but with `-c` the editor is invoked, so that
        the user can further edit the commit message.
  
  --fixup=<commit>::
@@@ -201,7 -203,7 +203,7 @@@ default:
        Otherwise `whitespace`.
  --
  +
 -The default can be changed by the 'commit.cleanup' configuration
 +The default can be changed by the `commit.cleanup` configuration
  variable (see linkgit:git-config[1]).
  
  -e::
@@@ -260,7 -262,7 +262,7 @@@ FROM UPSTREAM REBASE" section in linkgi
        staged for other paths. This is the default mode of operation of
        'git commit' if any paths are given on the command line,
        in which case this option can be omitted.
 -      If this option is specified together with '--amend', then
 +      If this option is specified together with `--amend`, then
        no paths need to be specified, which can be used to amend
        the last commit without committing changes that have
        already been staged.
@@@ -290,8 -292,7 +292,8 @@@ configuration variable documented in li
        what changes the commit has.
        Note that this diff output doesn't have its
        lines prefixed with '#'. This diff will not be a part
 -      of the commit message.
 +      of the commit message. See the `commit.verbose` configuration
 +      variable in linkgit:git-config[1].
  +
  If specified twice, show in addition the unified diff between
  what would be committed and the worktree files, i.e. the unstaged
@@@ -450,8 -451,8 +452,8 @@@ include::i18n.txt[
  ENVIRONMENT AND CONFIGURATION VARIABLES
  ---------------------------------------
  The editor used to edit the commit log message will be chosen from the
 -GIT_EDITOR environment variable, the core.editor configuration variable, the
 -VISUAL environment variable, or the EDITOR environment variable (in that
 +`GIT_EDITOR` environment variable, the core.editor configuration variable, the
 +`VISUAL` environment variable, or the `EDITOR` environment variable (in that
  order).  See linkgit:git-var[1] for details.
  
  HOOKS