Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Björn Gustavsson" <bgustavsson@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] Documentation: 'git add -A' can remove files
Date: Mon, 7 Dec 2009 01:57:32 +0100	[thread overview]
Message-ID: <20091207005732.GA20909@atjola.homenet> (raw)
In-Reply-To: <7vr5r7el2q.fsf@alter.siamese.dyndns.org>

On 2009.12.06 15:31:25 -0800, Junio C Hamano wrote:
> I wonder if we can restructure the description of "-u" to make it easier
> to read, to simplify the description of "-A".

What I usually say on #git is something like:

	"git add <path>" looks at the working tree to find files
	matching <path>.  "git add -u <path>" looks at the index, and
	"git add -A <path>" looks at both. Therefore "add" and "add -A"
	can add new files to the index, and "add -u" and "add -A" can
	remove files from it.

	And for convenience, -u and -A default to "." as the path argument.

So maybe something like this?

-u, --update
    Instead of matching <filepattern> against files in the working tree,
    it is matched against the already tracked files in the index. This
    means that it won't find any new files, but can find files already
    deleted from the working tree and remove them from the index. Also,
    if no <filepattern> is given, this option will make it default to
    ".", updating all tracked files in the current directory and its
    subdirectories.

-A, --all
    Like -u, but matches <filepattern> against files in the index in
    addition to the files in working tree. This means that it can find
    new files as well.


Björn

  reply	other threads:[~2009-12-07  0:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 23:03 [PATCH 1/2] Documentation: 'git add -A' can remove files Björn Gustavsson
2009-12-06 23:31 ` Junio C Hamano
2009-12-07  0:57   ` Björn Steinbrink [this message]
2009-12-07  7:34     ` Junio C Hamano
2009-12-07  8:48       ` Björn Steinbrink
2009-12-07  0:05 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091207005732.GA20909@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=bgustavsson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox