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

pathspec: problems with too long command line

From
Marc Strapetz <marc.strapetz@syntevo.com>
Date
Nov 21, 2018, 09:23 UTC
Message-ID
<c3be6eff-365b-96b8-16d2-0528612fc1fc@syntevo.com>
 From our GUI client we are invoking git operations on a possibly large 
set of files. This may result in pathspecs which are exceeding the 
maximum command line length, especially on Windows [1] and OSX [2]. To 
workaround this problem we are currently splitting up such operations by 
invoking multiple git commands. This works well for some commands (like 
add), but doesn't work well for others (like commit).

A possible solution could be to add another patchspec magic word which will read paths from a file instead of command line. A similar approach can be found in Mercurial with its "listfile:" pattern [3].

Does that sound reasonable? If so, we should be able to provide a corresponding patch.

-Marc

[1] https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553/ [2] https://serverfault.com/questions/69430 [3] https://www.mercurial-scm.org/repo/hg/help/patterns

Next: Jeff King
Message 1 of 4 in “pathspec: problems with too long command line”
  1. Marc StrapetzNov 21, 2018
  2. Jeff KingNov 21, 2018
  3. Junio C HamanoNov 21, 2018
  4. Marc StrapetzNov 21, 2018

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.