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

Re: [PATCH] Teach git-checkout-index to read filenames from stdin.

From
Shawn Pearce <spearce@spearce.org>
Date
Mar 1, 2006, 17:56 UTC
Message-ID
<20060301175606.GA4190@spearce.org>
In-Reply-To
<20060301155053.GC1010@trixie.casa.cgf.cx>
Christopher Faylor <me@cgf.cx> wrote:
Show 7 quoted lines
> AFAIK, the length of the command line for cygwin apps is very large --
> if you're using recent versions of Cygwin.  I believe that it is longer
> than the linux default.  We bypass the Windows mechanism for setting the
> command line when a cygwin program starts a cygwin program.
> 
> For native Windows programs, the command line length is ~32K but I don't
> think that git uses any native Windows programs, does it?

No. Currently GIT is entirely dependent on Cygwin. So GIT wouldn't bump into the ~32K limit due to the cygwin-cygwin feature you mention. But thanks for the information. I had thought I had read somewhere in the Cygwin documentation that the command line length was rather limited (even under cygwin-cygwin calls). Maybe I was just seeing things. :-)

But even if we can get a long set of args into git-checkout-index its probably still better to stream them as you can get both programs working at the same time (rather than waiting for xargs to build the argument buffer) and you are saving yourself at least one fork as you don't need to start xargs just to feed git-checkout-index. Even on Linux where fork is cheap, that's still soemething saved.

-- 
Shawn.
Previous: Christopher FaylorNext: Alex Riesen
Message 3 of 5 in “Teach git-checkout-index to read filenames from stdin.”
  1. Teach git-checkout-index to read filenames from stdin.Shawn Pearce, Mar 1, 2006
  2. Christopher FaylorMar 1, 2006
  3. Shawn PearceMar 1, 2006
  4. Alex RiesenMar 2, 2006
  5. Alex RiesenMar 2, 2006

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.