Re: [PATCH v2 05/31] tree: add repository argument to lookup_tree
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 14, 2018, 17:55 UTC
- Message-ID
- <fcb052e0-2308-31bd-aa90-d6d3327642c0@gmail.com>
- In-Reply-To
- <20180613230522.55335-6-sbeller@google.com>
On 6/13/2018 7:04 PM, Stefan Beller wrote:
Show 28 quoted lines
> diff --git a/commit-graph.c b/commit-graph.c
> index 71125d7cbb6..88a4b0d2a47 100644
> --- a/commit-graph.c
> +++ b/commit-graph.c
> @@ -261,7 +261,7 @@ static int fill_commit_in_graph(struct commit *item, struct commit_graph *g, uin
> item->graph_pos = pos;
>
> hashcpy(oid.hash, commit_data);
> - item->tree = lookup_tree(&oid);
> + item->tree = lookup_tree(the_repository, &oid);
>
> date_high = get_be32(commit_data + g->hash_len + 8) & 0x3;
> date_low = get_be32(commit_data + g->hash_len + 12);
> diff --git a/commit.c b/commit.c
> index d76d64d4dfc..755b8b9d94f 100644
> --- a/commit.c
> +++ b/commit.c
> @@ -354,7 +354,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
> if (get_sha1_hex(bufptr + 5, parent.hash) < 0)
> return error("bad tree pointer in commit %s",
> oid_to_hex(&item->object.oid));
> - item->tree = lookup_tree(&parent);
> + item->tree = lookup_tree(the_repository, &parent);
> bufptr += tree_entry_len + 1; /* "tree " + "hex sha1" + "\n" */
> pptr = &item->parents;
>
> diff --git a/fsck.c b/fsck.c
> index 2d372f2a3f3..b07abb9796c 100644I'm a bit late here, but you don't have ds/lazy-load-trees merged in your history, so this will conflict with 'master'. I caught this as I was trying to merge ds/generation-numbers with your branch.
The 'tree' member of 'struct commit' was renamed to 'maybe_tree'.
Thanks, -Stolee