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

Re: Teach git-bundle to read revision arguments from stdin like git-rev-list

From
Adam Brewster <adambrewster@gmail.com>
Date
Jul 6, 2008, 14:28 UTC
Message-ID
<1215354538-1469-1-git-send-email-adambrewster@gmail.com>
In-Reply-To
<7v63rjrfqz.fsf@gitster.siamese.dyndns.org>
On Sat, Jul 5, 2008 at 8:57 PM, Junio C Hamano <gitster@pobox.com> 
>> +                     if (read_from_stdin++)
>> +                             die("--stdin given twice?");
>
> Hmm, do we deeply care about this case?  What bad things coulc happen 
if
> you call read_revisions_from_stdin() twice?
>
Presently, it'll actually try to read stdin twice and that won't work.

Also, if you want git-bundle to deal with --stdin --stdin, I'd say that git-rev-list should do the same. I don't really care how this particular error case is handled, but I think git-rev-list and git-bundle should do the same thing for any given input.

If you prefer to be liberal in what you accept, then you might like these two patches that allow git-rev-list and git-bundle to deal with --stdin --stdin.

By the way, I'm not exactly sure on the format of these guys. You said you queued some changes yesterday, so these go on top of those. If you want me to start from scratch and give you the whole chain again, I can do that too.

Previous: Junio C HamanoNext: Adam Brewster
Message 13 of 18 in “bundle.c: added --stdin option to git-bundle”
  1. bundle.c: added --stdin option to git-bundleAdam Brewster, Jul 5, 2008
  2. Jakub NarebskiJul 5, 2008
  3. Junio C HamanoJul 5, 2008
  4. 0/3 Adam Brewster, Jul 5, 2008
  5. Move read_revisions_from_stdin from builtin-rev-list.c to revision.cAdam Brewster, Jul 5, 2008
  6. git-bundle: add --stdinAdam Brewster, Jul 5, 2008
  7. Add git-basis.perl to contrib directoryAdam Brewster, Jul 5, 2008
  8. Miklos VajnaJul 5, 2008
  9. Adam Brewster, Jul 5, 2008
  10. Move read_revisions_from_stdin from builtin-rev-list.c to revision.cAdam Brewster, Jul 5, 2008
  11. git-bundle: add --stdinAdam Brewster, Jul 5, 2008
  12. Junio C HamanoJul 6, 2008
  13. Adam BrewsterJul 6, 2008
  14. git-rev-list: tolerate multiple --stdin optionsAdam Brewster, Jul 6, 2008
  15. Teach git-bundle to read revision arguments from stdin likeAdam Brewster, Jul 6, 2008
  16. Junio C HamanoJul 6, 2008
  17. Adam BrewsterJul 6, 2008
  18. Junio C HamanoJul 6, 2008

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.