Skip to content

test bundle --stdin, fix objects_array_remove_duplicates()

Jonathan Nieder git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t5704 (bundle): add tests for bundle --stdint/t5704-bundle.sh+16 -00 replies
2/2fix "bundle --stdin" segfaultobject.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Quoted 4 lines · Joey Hess

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:

Quoted 4 lines

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.

[...]

Quoted 3 lines

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