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

[PATCH 0/2] test bundle --stdin, fix objects_array_remove_duplicates()

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 19, 2010, 07:14 UTC
Message-ID
<20100419071449.GA23166@progeny.tock>
In-Reply-To
<20100119002641.GA31434@gnu.kitenet.net>

This series does not make ‘git bundle --stdin’ work. In fact, the bug that it does fix would not be visible if bundle --stdin worked as it was supposed to.

Instead, this fixes a segfault that the bug triggers. The patches have been sitting in my git tree for a while. They fix a real problem regardless, and maybe they would help someone to get bundle --stdin working properly.

Thoughts welcome, as always.
Jonathan Nieder (2):
  t5704 (bundle): add tests for bundle --stdin
  fix "bundle --stdin" segfault
 object.c          |    4 ++--
 t/t5704-bundle.sh |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)
As for how to fix bundle --stdin, Joey Hess wrote:
> I also tried going back to 22568f0a336ac37ae7329c917857b455839d1d09, but
> still see a bug with Adam Brewster's initial code to add --stdin to
> git-bundle. That code still tries to read stdin twice. If it sees
> "master" both times, it does create a bundle.

and Johannes Schindelin suggested slurping up the input and explicitly using it twice, or:

> Alternatively, you can try to implement the rev-list --boundary by
> hand (the --pretty=oneline is only needed to get a boundary marker
> IIRC), taking care to reset the commit flags that were set in the
> process.
[...]
> If you want to go that route (which is arguably more elegant anyway),
> I suggest having a look at the merge_bases() and get_merge_bases()
> functions in commit.c

Dscho’s full message is pretty helpful: http://thread.gmane.org/gmane.comp.version-control.git/137414/focus=137503

Previous: Johannes SchindelinNext: Jonathan Nieder
Message 3 of 19 in “bug: git-bundle create foo --stdin -> segfault”
  1. Joey HessJan 19, 2010
  2. Johannes SchindelinJan 19, 2010
  3. 0/2 test bundle --stdin, fix objects_array_remove_duplicates()Jonathan Nieder, Apr 19, 2010
  4. 1/2 t5704 (bundle): add tests for bundle --stdinJonathan Nieder, Apr 19, 2010
  5. 2/2 fix "bundle --stdin" segfaultJonathan Nieder, Apr 19, 2010
  6. Junio C HamanoApr 20, 2010
  7. 0/8 Re: bug: git-bundle create foo --stdin -> segfaultJonathan Nieder, Jun 26, 2010
  8. 1/8 bundle: split basis discovery into its own functionJonathan Nieder, Jun 26, 2010
  9. 2/8 bundle: use libified rev-list --boundaryJonathan Nieder, Jun 26, 2010
  10. Junio C HamanoJun 30, 2010
  11. Jonathan NiederJun 30, 2010
  12. 3/8 bundle: give list_prerequisites() loop body its own functionJonathan Nieder, Jun 26, 2010
  13. Junio C HamanoJun 30, 2010
  14. Jonathan NiederJun 30, 2010
  15. 4/8 bundle: split table of contents output into its own functionJonathan Nieder, Jun 26, 2010
  16. 5/8 bundle: reuse setup_revisions resultJonathan Nieder, Jun 26, 2010
  17. 6/8 Fix bundle --stdinJonathan Nieder, Jun 26, 2010
  18. 7/8 bundle: Keep names of basis refs after discoveryJonathan Nieder, Jun 26, 2010
  19. 8/8 bundle_create: Do not exit when given no revs to bundleJonathan Nieder, Jun 26, 2010

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.