From: Junio C Hamano <junkio@cox.net>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: Reworked read-tree.
Date: Thu, 01 Sep 2005 00:10:43 -0700 [thread overview]
Message-ID: <7vpsrt1cwc.fsf_-_@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vvf1l1env.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Wed, 31 Aug 2005 23:32:36 -0700")
Daniel, I do not know what your current status is, but I think
you need something like this.
I was scratching my head figuring out why it passes all the t/
tests but couldn't do a simple 'git-read-tree HEAD'.
---
diff --git a/tree.c b/tree.c
--- a/tree.c
+++ b/tree.c
@@ -224,10 +224,12 @@ struct tree *parse_tree_indirect(const u
if (obj->type == tree_type)
return (struct tree *) obj;
else if (obj->type == commit_type)
- return ((struct commit *) obj)->tree;
+ obj = (struct object *)(((struct commit *) obj)->tree);
else if (obj->type == tag_type)
- obj = ((struct tag *) obj)->tagged;
+ obj = deref_tag(obj);
else
return NULL;
+ if (!obj->parsed)
+ parse_object(obj->sha1);
} while (1);
}
next prev parent reply other threads:[~2005-09-01 7:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-01 4:17 Couple of read-tree questions Daniel Barkalow
2005-09-01 5:16 ` Junio C Hamano
2005-09-01 5:52 ` Junio C Hamano
2005-09-01 6:16 ` Daniel Barkalow
2005-09-01 6:32 ` Junio C Hamano
2005-09-01 7:10 ` Junio C Hamano [this message]
2005-09-01 15:55 ` Reworked read-tree Daniel Barkalow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vpsrt1cwc.fsf_-_@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.