On Thu, 7 Jul 2005, Junio C Hamano wrote:
> (1) Would it make sense to have an extra flag to "rev-list
>     --objects" to make it list all the objects reachable from
>     commits listed in its output, even when some of them are
>     unchanged from UNINTERESTING commits?  Right now, a pack
>     produced from "rev-list --objects A ^B" does not have enough
>     information to reproduce the tree associated with commit A.

Well, that would certainly be possible. Just having a flag that disables 
"mark_tree_uninteresting()" would do it.

> (2) When "showing --objects", it lists the top-level tree node
>     with no name, which makes it indistinguishable from commit
>     objects by pack-objects, probably impacting the delta logic.
>     Would something like the following patch make sense, to name
>     such node "."; giving full-path not just the basename to
>     all named nodes would be even better, though.

It doesn't impact the delta algorithm, because the objects are sorted by 
type first, so it never mixes up trees and commits.

But if you wanted to, something like this would be cleaner than your 


diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -154,7 +154,7 @@ static void show_commit_list(struct comm
        while (list) {
                struct commit *commit = pop_most_recent_commit(&list, SEEN);
-               p = process_tree(commit->tree, p, "");
+               p = process_tree(commit->tree, p, "tree");
                if (process_commit(commit) == STOP)
@@ -386,7 +386,7 @@ static struct commit *get_commit_referen
                        return NULL;
-               add_pending_object(object, "");
+               add_pending_object(object, "tree");
                return NULL;
@@ -401,7 +401,7 @@ static struct commit *get_commit_referen
                        return NULL;
-               add_pending_object(object, "");
+               add_pending_object(object, "blob");
                return NULL;
        die("%s is unknown object", name);
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to