show_object(): push path_name() call further down
[gitweb.git] / builtin-pack-objects.c
index dde8cc3f01a73f422e6cd025382bf6662804ea11..71041453f29715fdb18f2b74811f1ebfa6bf5311 100644 (file)
@@ -1856,8 +1856,10 @@ static void show_commit(struct commit *commit)
        commit->object.flags |= OBJECT_ADDED;
 }
 
-static void show_object(struct object *obj, const char *name)
+static void show_object(struct object *obj, const struct name_path *path, const char *last)
 {
+       char *name = path_name(path, last);
+
        add_preferred_base_object(name);
        add_object_entry(obj->sha1, obj->type, name, 0);
        obj->flags |= OBJECT_ADDED;