Merge branch 'gp/add-u-A-documentation'

* gp/add-u-A-documentation:
  add: Clarify documentation of -A and -u
This commit is contained in:
Junio C Hamano 2013-03-11 08:11:37 -07:00
commit ca8df3df8c

View File

@ -100,12 +100,9 @@ apply to the index. See EDITING PATCHES below.
-u:: -u::
--update:: --update::
Only match <pathspec> against already tracked files in Update the index just where it already has an entry matching
the index rather than the working tree. That means that it <pathspec>. This removes as well as modifies index entries to
will never stage new files, but that it will stage modified match the working tree, but adds no new files.
new contents of tracked files and that it will remove files
from the index if the corresponding files in the working tree
have been removed.
+ +
If no <pathspec> is given, the current version of Git defaults to If no <pathspec> is given, the current version of Git defaults to
"."; in other words, update all tracked files in the current directory "."; in other words, update all tracked files in the current directory
@ -114,10 +111,15 @@ of Git, hence the form without <pathspec> should not be used.
-A:: -A::
--all:: --all::
Like `-u`, but match <pathspec> against files in the Update the index not only where the working tree has a file
working tree in addition to the index. That means that it matching <pathspec> but also where the index already has an
will find new files as well as staging modified content and entry. This adds, modifies, and removes index entries to
removing files that are no longer in the working tree. match the working tree.
+
If no <pathspec> is given, the current version of Git defaults to
"."; in other words, update all files in the current directory
and its subdirectories. This default will change in a future version
of Git, hence the form without <pathspec> should not be used.
-N:: -N::
--intent-to-add:: --intent-to-add::