Re: [PATCH 5/5] list-objects: pass full pathname to callbacks

2016-02-11 Thread Jeff King
On Thu, Feb 11, 2016 at 05:28:36PM -0500, Jeff King wrote: > +void show_object_with_name(FILE *out, struct object *obj, const char *name) > [...] > fprintf(out, "%s ", oid_to_hex(&obj->oid)); > for (p = name; *p && *p != '\n'; p++) > fputc(*p, out); > fputc('\n', ou

[PATCH 5/5] list-objects: pass full pathname to callbacks

2016-02-11 Thread Jeff King
When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and we could simply append "c"