Re: [FAQ?] Rationale for git's way to manage the index
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- May 11, 2007, 11:26 UTC
- Message-ID
- <200705111326.35577.jnareb@gmail.com>
- In-Reply-To
- <7vd518gkyo.fsf@assigned-by-dhcp.cox.net>
On Fri, 11 May 2007, Junio C Hamano wrote:
Show 6 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes: > >> In the new version of git I *think* you can use "git add -u path/" > > I know you meant well, but next time could you please check the > fact before speaking?
> if (i < argc)
> die("-u and explicit paths are incompatible");> The list is getting more and more cluttered recently, perhaps > which is a good sign that more new people are actually using > git. Let's try to keep the signal quality of the messages on > the list high.
I'm sorry I haven't checked this before writing, especially that information in the synopsis contradict a bit the information in the `-u' option description:
Documentation/git-add.txt:
SYNOPSIS -------- 'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] <file>...
-u::
Update all files that git already knows about. This is what
"git commit -a" does in preparation for making a commit.I should have checked the facts before following the synopsis.
I think however that "git add -u dir/" could be quite useful; it is not needed to have `-u' and explicit paths incompatibile. I wouldn't change the fact that you can say "git add -u" and do not need "git add -u ." (like in the case without `-u' switch: you need "git add ." to 'add' all unignored files).
Below there is a patch which corrects synopsis for git add; unless you want to go the route of allowing "git add -u dir/"...
-- >8 -- From: Jakub Narebski <jnareb@gmail.com> Date: Fri, 11 May 2007 13:22:13 +0200 Subject: [PATCH] Documentation: Correct synopsis for git-add command
Change SYNOPISIS section of Documentation/git-add.txt to mark it explicitely that "-u option and explicit paths are incompatible", and that "add --interactive does not take any parameters".
Signed-off-by: Jakub Narebski <jnareb@gmail.com> --- Documentation/git-add.txt | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index ea27018..e5fc0da 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -7,7 +7,8 @@ git-add - Add file contents to the changeset to be committed next SYNOPSIS -------- -'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] <file>... +'git-add' [-n] [-v] [-f] [-u | [--] <file>...] +'git-add' (--interactive | -i) DESCRIPTION -----------
-- 1.5.1.3 -- Jakub Narebski Poland