Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC] notes: avoid recommitting identical trees

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:25

Michael J Gruber [off-list ref] writes:
Junio C Hamano venit, vidit, dixit 31.08.2010 18:44:
quoted
Michael J Gruber [off-list ref] writes:
quoted
quoted
quoted
+	if (!parent || parse_commit(parent->item) || parse_tree(parent->item->tree) ||
+		hashcmp(parent->item->tree->object.sha1, tree_sha1)) {
I didn't check, but I can imagine you can drop the parse_tree here. We
should know the object sha1 once the commit is parsed.
parse_commit() does a lookup_tree() but I don't think that it parses the
tree, i.e. I don't hink it fills in tree->object.sha1.
Huh?  parse_tree(tree) calls read_sha1_file(tree->object.sha1) to parse
the tree.  How can it do without filling tree->object.sha1?
Sure parse_tree() does that. That's why I call it. I never claimed it
doesn't.
Sorry, My second sentence was incorrect.

       How can it do so without getting a tree with tree->object.sha1
       already filled?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help