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

git {pull,push} fails without stdin

From
GHGustav Hållberg <gustav@gmail.com>
Date
Jan 28, 2009, 09:27 UTC
Message-ID
<a1e915350901280127g55d6a978i241c2b9793cc8690@mail.gmail.com>
This was seen in git 1.6.0.2...

I want to run "git push" in an automated system and, as there's no sensible stdin to use, I close fd 0 before exec'ing. However, it does not work:

  sh$ git push <&-
  fatal: read error (Bad file descriptor)
compared to:
  sh$ git push
  Everything up-to-date

The same thing happens with "git pull", but not the other git commands I tried (in a far-from-exhaustive search).

It's trivial to work around (e.g., use /dev/null as stdin), but it would be more convenient if it just worked :-)

- Gustav
Message 1 of 1 in “git {pull,push} fails without stdin”
  1. Gustav HållbergJan 28, 2009

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.