[RFC/PATCH 7/8] bundle: Keep names of basis refs after discovery
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 26, 2010, 06:29 UTC
- Message-ID
- <20100626062918.GH15881@burratino>
- In-Reply-To
- <20100626061735.GA15881@burratino>
Without this change, attempts to examine revs->pending.objects[i].name when debugging produce random giberish. On the other hand, it introduces a small per-basis-ref memory leak.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> --- For illustration.
bundle.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/bundle.c b/bundle.c index 311c554..7aff369 100644 --- a/bundle.c +++ b/bundle.c @@ -226,8 +226,7 @@ static void list_prerequisite(int bundle_fd, struct object_array *pending, write_or_die(bundle_fd, buf.buf, buf.len); rev->object.flags |= UNINTERESTING; - add_object_array(&rev->object, buf.buf, pending); - strbuf_release(&buf); + add_object_array(&rev->object, strbuf_detach(&buf, NULL), pending); } static int list_prerequisites(int bundle_fd, struct rev_info *revs,
-- 1.7.1.198.g8d802