mailinfo: ignore blanks after in-body headers.
[gitweb.git] / builtin-rev-list.c
index 5277d3cf12da2f029499342eea32441ae4b983d9..e885624255ac8e1007df797d339e3e81020f95a2 100644 (file)
@@ -113,7 +113,8 @@ static struct object_list **process_tree(struct tree *tree,
                                         const char *name)
 {
        struct object *obj = &tree->object;
-       struct tree_entry_list *entry;
+       struct tree_desc desc;
+       struct name_entry entry;
        struct name_path me;
 
        if (!revs.tree_objects)
@@ -128,18 +129,18 @@ static struct object_list **process_tree(struct tree *tree,
        me.up = path;
        me.elem = name;
        me.elem_len = strlen(name);
-       entry = tree->entries;
-       tree->entries = NULL;
-       while (entry) {
-               struct tree_entry_list *next = entry->next;
-               if (entry->directory)
-                       p = process_tree(entry->item.tree, p, &me, entry->name);
+
+       desc.buf = tree->buffer;
+       desc.size = tree->size;
+
+       while (tree_entry(&desc, &entry)) {
+               if (S_ISDIR(entry.mode))
+                       p = process_tree(lookup_tree(entry.sha1), p, &me, entry.path);
                else
-                       p = process_blob(entry->item.blob, p, &me, entry->name);
-               free(entry->name);
-               free(entry);
-               entry = next;
+                       p = process_blob(lookup_blob(entry.sha1), p, &me, entry.path);
        }
+       free(tree->buffer);
+       tree->buffer = NULL;
        return p;
 }