[PATCH] add: Clarify documentation of -A and -u

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The documentation of '-A' is very confusing for someone who doesn't
already know what it does.  In particular, it describes the option's
meaning by reference to that of '-u', but it's no more similar to the
latter than it is to the default behavior.  Describe it directly (and
in a way that uses the word 'all'), and then describe the contrast
separately.

Signed-off-by: Greg Price <price@xxxxxxx>
---
 Documentation/git-add.txt | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 388a225..f89d920 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -105,7 +105,9 @@ apply to the index. See EDITING PATCHES below.
 	will never stage new files, but that it will stage modified
 	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.
+	have been removed.  By contrast `-A` will add new files as
+	well as updating and removing existing ones, and the default
+	behavior will add new files and will not remove existing ones.
 +
 If no <pathspec> is given, the current version of Git defaults to
 "."; in other words, update all tracked files in the current directory
@@ -114,10 +116,17 @@ of Git, hence the form without <pathspec> should not be used.
 
 -A::
 --all::
-	Like `-u`, but match <pathspec> against files in the
-	working tree in addition to the index. That means that it
-	will find new files as well as staging modified content and
-	removing files that are no longer in the working tree.
+	Update the index regarding all files that match <pathspec>,
+	either in the index or the working tree.  That is, remove
+	files that are only in the index, add files that are only in
+	the working tree, and update files that differ between the
+	two.  By contrast `-u` only removes and updates, and the
+	default behavior only adds and updates.
++
+If no <pathspec> is given, the current version of Git defaults to
+"."; in other words, update all tracked 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::
 --intent-to-add::
-- 
1.7.11.3
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]