Re: [FAQ?] Rationale for git's way to manage the index

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

 



Junio C Hamano wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> writes:
>> On Fri, 11 May 2007, Junio C Hamano wrote:
>>> Jakub Narebski <jnareb@xxxxxxxxx> 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:
>> ...
>>   -u::
>>         Update all files that git already knows about. This is what
>>         "git commit -a" does in preparation for making a commit.
> 
> What does "git commit -a" do?  Does it take paths?

I was mislead by synopsis, which reads:

  'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] <file>...

It looks from it like -u is _not_ incompatibile with explicit paths;
moreover it looks like explicit path is _required_.

>> I think however that "git add -u dir/" could be quite useful; it is
>> not needed to have `-u' and explicit paths incompatibile.
> 
> I tend to agree, and I think that change should not be too
> difficult.

So do you want to accept my patch for git-add documentation for now,
or rather the replacement patch below? Well, best with the patch that
changes -u to be able to work with explicit codepath...
 
> Also it might make sense to have "git commit" use it in the
> "git-commit --only $paths" codepath.  I dunno.

Didn't you mean "git commit --include $paths" codepath? IIRC --only
codepath deals with temporary index...

-- >8 --
From: Jakub Narebski <jnareb@xxxxxxxxx>
Date: Sat, 12 May 2007 01:05:01 +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 does not need explicit paths, and that
"add --interactive does not take any parameters".

Signed-off-by: Jakub Narebski <jnareb@xxxxxxxxx>
---
 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..3c6d431 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>...] | [--] <file>...)
+'git-add' (--interactive | -i)
 
 DESCRIPTION
 -----------
-- 
1.5.1.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]

  Powered by Linux