X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=reachable.c;h=3fc6b1d320faad3a528db016a0d800ff1bdde4f0;hb=refs%2Ftags%2Fv1.7.8.5;hp=3b1c18ff9b9060d0dd437ce89aedb8871c66c54c;hpb=4d9e42f8f11c57b32b976a943c8ddaf6214e64b8;p=git.git diff --git a/reachable.c b/reachable.c index 3b1c18ff9..3fc6b1d32 100644 --- a/reachable.c +++ b/reachable.c @@ -48,7 +48,6 @@ static void process_tree(struct tree *tree, obj->flags |= SEEN; if (parse_tree(tree) < 0) die("bad tree object %s", sha1_to_hex(obj->sha1)); - name = xstrdup(name); add_object(obj, p, path, name); me.up = path; me.elem = name; @@ -71,16 +70,11 @@ static void process_tree(struct tree *tree, static void process_tag(struct tag *tag, struct object_array *p, const char *name) { struct object *obj = &tag->object; - struct name_path me; if (obj->flags & SEEN) return; obj->flags |= SEEN; - me.up = NULL; - me.elem = "tag:/"; - me.elem_len = 5; - if (parse_tag(tag) < 0) die("bad tag object %s", sha1_to_hex(obj->sha1)); if (tag->tagged) @@ -91,7 +85,7 @@ static void walk_commit_list(struct rev_info *revs) { int i; struct commit *commit; - struct object_array objects = { 0, 0, NULL }; + struct object_array objects = OBJECT_ARRAY_INIT; /* Walk all commits, process their trees */ while ((commit = get_revision(revs)) != NULL)