summaryrefslogtreecommitdiffstats
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-29 21:47:56 +0100
committerJunio C Hamano <gitster@pobox.com>2019-01-29 21:47:56 +0100
commit371820d5f1bb3c3e691ad21cee652c02c36ea758 (patch)
treead479bc8fd4e4c59c93807fe47355ef6fccf68e5 /builtin/pack-objects.c
parentMerge branch 'jt/upload-pack-deepen-relative-proto-v2' (diff)
parentcache: make oidcpy always copy GIT_MAX_RAWSZ bytes (diff)
downloadgit-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.c4
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);