From: Jeff King Date: Thu, 07 Jul 2011 19:28:13 GMT Subject: Re: pull from stdin Message-ID: <20110707192813.GE12044@sigill.intra.peff.net> In-Reply-To: On Thu, Jul 07, 2011 at 11:23:04AM -0400, miket99@Safe-mail.net wrote: > I am using a rather complicated distributed workflow to keep various > git repositories in sync. Basically I am creating bundles, pushing > them to a server, and pull them again using a special application > which output the bundle content to stdin. Unfortunately git-fetch and > friends do not like /dev/stdin as input. Is there any way to pass the > bundle contents via stdin to git? > [...] > ~/test$ cat b | git pull -- /dev/stdin > fatal: '/dev/stdin' does not appear to be a git repository > fatal: The remote end hung up unexpectedly I think the problem is that "git fetch" tests for a bundle by checking whether the argument is a regular file, which /dev/stdin is not. We could perhaps fix that, but I think it still wouldn't work. The bundle-reading code calls lseek, and your pipe will not be seekable. So this works: $ git bundle unbundle /dev/stdin