Re: [PATCH v2 4/4] upload-archive: use start_command instead of fork
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Aug 2, 2011, 23:37 UTC
- Message-ID
- <4E388A55.6080606@kdbg.org>
- In-Reply-To
- <20110802181357.GA1861@sigill.intra.peff.net>
Am 02.08.2011 20:13, schrieb Jeff King:
> Hmm. So it's not _just_ the pipe vs file thing. What's different about > calling it from the shell, versus the way we call it from git-archive?
When the parent process of an MSYS process is itself an MSYS process, such as bash, then the child does not do its own binary-mode-vs.-text-mode detection, but just uses whatever it is told by the parent. This is achieved by MSYS's fork emulation.
But if the parent is a regular Windows program, such as git(-archive), then the autodection happens and file descriptors pointing to files are put into text mode.
-- Hannes