diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-01-29 21:47:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-29 21:47:56 +0100 |
commit | 371820d5f1bb3c3e691ad21cee652c02c36ea758 (patch) | |
tree | ad479bc8fd4e4c59c93807fe47355ef6fccf68e5 /builtin/pack-objects.c | |
parent | Merge branch 'jt/upload-pack-deepen-relative-proto-v2' (diff) | |
parent | cache: make oidcpy always copy GIT_MAX_RAWSZ bytes (diff) | |
download | git-371820d5f1bb3c3e691ad21cee652c02c36ea758.tar.xz git-371820d5f1bb3c3e691ad21cee652c02c36ea758.zip |
Merge branch 'bc/tree-walk-oid'
The code to walk tree objects has been taught that we may be
working with object names that are not computed with SHA-1.
* bc/tree-walk-oid:
cache: make oidcpy always copy GIT_MAX_RAWSZ bytes
tree-walk: store object_id in a separate member
match-trees: use hashcpy to splice trees
match-trees: compute buffer offset correctly when splicing
tree-walk: copy object ID before use
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r-- | builtin/pack-objects.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 889df2c755..0a70d04604 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -1334,7 +1334,7 @@ static void add_pbase_object(struct tree_desc *tree, if (cmp < 0) return; if (name[cmplen] != '/') { - add_object_entry(entry.oid, + add_object_entry(&entry.oid, object_type(entry.mode), fullname, 1); return; @@ -1345,7 +1345,7 @@ static void add_pbase_object(struct tree_desc *tree, const char *down = name+cmplen+1; int downlen = name_cmp_len(down); - tree = pbase_tree_get(entry.oid); + tree = pbase_tree_get(&entry.oid); if (!tree) return; init_tree_desc(&sub, tree->tree_data, tree->tree_size); |