aboutsummaryrefslogtreecommitdiff
path: root/bundle.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-25 14:01:07 -0700
committerJunio C Hamano <gitster@pobox.com>2013-03-25 14:01:07 -0700
commit870987dec752fe2a6752f7813fe1892b5e1a8d32 (patch)
tree64744e8b48696fb0a27411fdd2966dd8c2928d6e /bundle.c
parent4e38e9b1d05fb00ad87cba8c44117a537d779c9e (diff)
parentc29c46fa2e21e608ce2e603649af5bf38e7969c2 (diff)
downloadgit-870987dec752fe2a6752f7813fe1892b5e1a8d32.tar.gz
git-870987dec752fe2a6752f7813fe1892b5e1a8d32.tar.xz
Merge branch 'jk/fully-peeled-packed-ref'
Not that we do not actively encourage having annotated tags outside refs/tags/ hierarchy, but they were not advertised correctly to the ls-remote and fetch with recent version of Git. * jk/fully-peeled-packed-ref: pack-refs: add fully-peeled trait pack-refs: write peeled entry for non-tags use parse_object_or_die instead of die("bad object") avoid segfaults on parse_object failure
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundle.c b/bundle.c
index 6210a6be8..505e07e93 100644
--- a/bundle.c
+++ b/bundle.c
@@ -279,12 +279,12 @@ int create_bundle(struct bundle_header *header, const char *path,
if (buf.len > 0 && buf.buf[0] == '-') {
write_or_die(bundle_fd, buf.buf, buf.len);
if (!get_sha1_hex(buf.buf + 1, sha1)) {
- struct object *object = parse_object(sha1);
+ struct object *object = parse_object_or_die(sha1, buf.buf);
object->flags |= UNINTERESTING;
add_pending_object(&revs, object, xstrdup(buf.buf));
}
} else if (!get_sha1_hex(buf.buf, sha1)) {
- struct object *object = parse_object(sha1);
+ struct object *object = parse_object_or_die(sha1, buf.buf);
object->flags |= SHOWN;
}
}
@@ -361,7 +361,7 @@ int create_bundle(struct bundle_header *header, const char *path,
* end up triggering "empty bundle"
* error.
*/
- obj = parse_object(sha1);
+ obj = parse_object_or_die(sha1, e->name);
obj->flags |= SHOWN;
add_pending_object(&revs, obj, e->name);
}