Re: [PATCH] Test case for a problem with git add -u from subdirectory

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

 



On Wed, Feb 20, 2008 at 10:37:36AM -0800, Junio C Hamano wrote:
> Pekka Kaitaniemi <kaitanie@xxxxxxxxxxxxxx> 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
-
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