Re: [BUG] 'add -u' doesn't work from untracked subdir
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 5, 2009, 07:58 UTC
- Message-ID
- <7v3a717rgl.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090905072017.GA5152@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I assume you mean "ls-files". I have every once in a while been annoyed > by that, but given how infrequently I run ls-files, it is not a big > deal. :)
I did mean ls-tree, but I misspelled the name of the escape hatch.
Try this:
$ cd Documentation
$ git ls-tree HEADIf I were designing this as a proper plumbing command from scratch, I wouldn't have given it a cwd behaviour. ls-files is somewhat more understandable, as it has other cruft relating the work tree, but ls-tree is worse:
$ cd Documentation
$ git ls-tree origin/htmlWhoa??? Yes, it tried to do what "git ls-tree origin/html:Documentation" would have done if it were unaware of cwd. It's just crazy.
Show 10 quoted lines
>> If "git add -u ../.." (I mean "the grand parent directory", not "an >> unnamed subdirectory") did not work, it would be unexcusable and we would >> want to devise an migration path, but otherwise I do not think it is such >> a big deal. I would say the commands that are used to incrementally build > > As I mentioned above, not only is that annoying to use, but the real > problem is that I _expect_ the other behavior and it silently does the > opposite of what I want. You can argue that my brain is defective (for > not remembering, I mean -- we _know_ it's defective in other ways), but > certainly a config option would be useful to me.
At this moment (as my brain is not quite functioning), I can only say we agreed to disagree what feels more natural here.