git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pekka Kaitaniemi <kaitanie@cc.helsinki.fi>
To: Junio C Hamano <gitster@pobox.com>
Cc: kaitanie@cc.helsinki.fi, git@vger.kernel.org
Subject: Re: [PATCH] Test case for a problem with git add -u from subdirectory
Date: Wed, 20 Feb 2008 21:31:26 +0200	[thread overview]
Message-ID: <20080220193126.GA26686@localdomain> (raw)
In-Reply-To: <7vhcg35v9r.fsf@gitster.siamese.dyndns.org>

On Wed, Feb 20, 2008 at 10:37:36AM -0800, Junio C Hamano wrote:
> Pekka Kaitaniemi <kaitanie@cc.helsinki.fi> writes:
> 
> > The key sentence being: "If no paths are specified, all tracked files
> > are updated."
> 
> My recollection is that the current behaviour was requested
> specifically by the users.  Although I do not remember offhand,
> the first implementation might have even been doing the whole
> tree unconditionally, and surprised users by stepping outside of
> the current subdirectory.

I was a bit confused whether it was a feature or a bug and since the
documentation seemed to indicate that "git add -u" should add
everything I suspected that it was a bug. Anyways, thanks for the
clarification.

> Sometimes I am annoyed that it does not do the whole tree
> (i.e. you have to go to the top), but some other times (which
> happens to be majority for me but it would depend on the
> project) I find the current behaviour a lot more convenient, and
> personally I do not think it is a good idea to change the
> current behaviour.

I agree. Changing the behaviour is not good since it was requested by
users and implemented intentionally.

If adding all tracked files in the whole tree to the index is needed,
then maybe it would be useful to add a new flag to git-add? Something
like -a (as in all), or -U (really update the whole tree) might be
useful option. But then again, the difference between them should also
be documented clearly.

> Please send in documentation clarifications.

OK, I'll prepare a patch.

Pekka

      reply	other threads:[~2008-02-20 19:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 14:32 [PATCH] Test case for a problem with git add -u from subdirectory Pekka Kaitaniemi
2008-02-20 18:37 ` Junio C Hamano
2008-02-20 19:31   ` Pekka Kaitaniemi [this message]

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=20080220193126.GA26686@localdomain \
    --to=kaitanie@cc.helsinki.fi \
    --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;
as well as URLs for NNTP newsgroup(s).