git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 5, 2010, 05:31 UTC
Message-ID
<7vzl4t6ru1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100105041438.GB12574@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I seem to recall Junio noting in the past the inconsistencies in git
> about what is a path and what is a pathspec. Is this one of those
> inconsistencies, and would it be a positive thing to fix it?

We actually never take paths and everything we take is pathspec. One longstanding gripe I had around this area is there are two kinds of pathspecs. "diff-tree" family of pathspecs only match "leading directories" while "dir.c" and "builtin-grep.c" pathspecs allow both "leading directories" and "glob" pathspecs. Teaching "diff-tree" family to also grok globs would be a very nice thing to do, and the listing of paths with ls-files in the sample patch you are removing is indeed a workaround for this issue.

Previous: Jeff KingNext: Wincent Colaiuta
Message 3 of 5 in “"git add -i" with path gives "Argument list too long"”
  1. Wincent ColaiutaJan 4, 2010
  2. Jeff KingJan 5, 2010
  3. Junio C HamanoJan 5, 2010
  4. Wincent ColaiutaJan 5, 2010
  5. Jeff KingJan 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.