Re: "git add -i" with path gives "Argument list too long"

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

 



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



--
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]