git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Wincent Colaiuta <win@wincent.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>
Subject: Re: "git add -i" with path gives "Argument list too long"
Date: Tue, 5 Jan 2010 13:34:32 +0100	[thread overview]
Message-ID: <AAABEE5B-0419-4344-86E2-7EB550CCFC01@wincent.com> (raw)
In-Reply-To: <20100105041438.GB12574@coredump.intra.peff.net>

El 05/01/2010, a las 05:14, Jeff King escribió:

>> - or, preferably, teach "git diff index" to recurse into directories
>> rather than expect a list of paths-of-blobs (possibly with a command
>> line switch to activate the behaviour if it were deemed a dangerous
>> default)
>
> Doesn't it already do this? If I say "git diff index subdir" it
> will limit the diff only to things inside subdir/.

[snip patch]

I tried out the patch and it obviously does avoid the "Argument list  
too long" problem. At least for my usage patterns the superficial  
differences in behavior that you note would not be a problem (I  
usually want to limit things to a subdir, and seldom if ever pass in  
things like '*.c').

> but note that the pathspecs given to ls-files and the path limiters
> given to diff are not quite the same. So "git add -i '*.c'" will
> currently find "subdir/foo.c", but would not with the above patch. Is
> that what you meant when you said "recurse into directories"?

In my relative ignorance of the finer details here, I meant that I  
would want "diff-index" to give us the exact same set of blobs as we  
get from "ls-files", so as to fix the error without modifying the user  
visible behavior.

As I said, I personally wouldn't be impacted by the change in behavior  
that your patch produces, but maybe others might.

Cheers,
Wincent

  parent reply	other threads:[~2010-01-05 12:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 18:43 "git add -i" with path gives "Argument list too long" Wincent Colaiuta
2010-01-05  4:14 ` Jeff King
2010-01-05  5:31   ` Junio C Hamano
2010-01-05 12:34   ` Wincent Colaiuta [this message]
2010-01-06 12:19     ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2010-03-21 20:52 Wincent Colaiuta
2010-03-22  0:39 ` Jeff King
2010-03-22  1:23   ` Junio C Hamano
2010-03-22  1:41     ` Jeff King
2010-03-22  1:55       ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=AAABEE5B-0419-4344-86E2-7EB550CCFC01@wincent.com \
    --to=win@wincent.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).