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

pull from stdin

From
Mmiket99@safe-mail.net <miket99@safe-mail.net>
Date
Jul 7, 2011, 15:23 UTC
Message-ID
<N1B-u7I8PJ0byN@Safe-mail.net>
Hello,
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?
Minimal sample:
~$ mkdir test
~$ cd test
~/test$ git init
Initialized empty Git repository in /home/test/test/.git/
~/test$ echo a > a
~/test$ git add -A
~/test$ git commit -m test
[master (root-commit) 4ed639a] test
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
~/test$ git bundle create b --all
Counting objects: 3, done.
Writing objects: 100% (3/3), 193 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
~/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
Next: Jeff King
Message 1 of 2 in “pull from stdin”
  1. miket99@safe-mail.netJul 7, 2011
  2. Jeff KingJul 7, 2011

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.