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

Re: StGIT cannot import properly from stdin

From
POPierre Ossman <drzeus-list@drzeus.cx>
Date
Sep 22, 2005, 11:08 UTC
Message-ID
<433290A5.5070008@drzeus.cx>
In-Reply-To
<b0943d9e05092101033dd5d366@mail.gmail.com>
Catalin Marinas wrote:
Show 10 quoted lines
>
>It works for me with the latest snapshot. What might happen in your
>case is a missing "---" line after the patch description. The import
>command reads the sys.stdin file descriptor until the first "---"
>line. After that, the git.apply() function will read the rest of the
>lines and pass them to git-apply. You can put some prints in the
>git.apply() function to check where it starts reading from.
>
>  
>

Hmm... it seems you're kind of right. It doesn't need the patch twice. But it needs EOF more than once. The for-loop in __parse_patch() doesn't start until the EOF is recieved. And the second for-loop in _input() requires a new EOF.

Show 6 quoted lines
>Patches without description cannot be read from stdin at the moment.
>Maybe I could add another option to prevent it from reading the
>description.
>
>  
>

If you would cache the input to a file (or memory) you would remove both of these problems.

Rgds Pierre

Previous: Catalin MarinasNext: Catalin Marinas
Message 3 of 9 in “StGIT cannot import properly from stdin”
  1. Pierre OssmanSep 21, 2005
  2. Catalin MarinasSep 21, 2005
  3. Pierre OssmanSep 22, 2005
  4. Catalin MarinasSep 22, 2005
  5. Pierre OssmanSep 22, 2005
  6. Catalin MarinasSep 22, 2005
  7. Pierre OssmanSep 22, 2005
  8. Catalin MarinasSep 22, 2005
  9. Catalin MarinasSep 22, 2005

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.