struct walk_tree_context {
const char *match_path;
- struct object_id matched_oid;
+ struct object_id *matched_oid;
unsigned int found_path:1;
unsigned int file_only:1;
};
if (strncmp(base->buf, walk_tree_ctx->match_path, base->len)
|| strcmp(walk_tree_ctx->match_path + base->len, pathname))
return READ_TREE_RECURSIVE;
- hashcpy(walk_tree_ctx->matched_oid.hash, sha1);
+ hashcpy(walk_tree_ctx->matched_oid->hash, sha1);
walk_tree_ctx->found_path = 1;
return 0;
}
};
struct walk_tree_context walk_tree_ctx = {
.match_path = path,
- .matched_oid = oid,
+ .matched_oid = &oid,
.found_path = 0,
.file_only = file_only
};
};
struct walk_tree_context walk_tree_ctx = {
.match_path = path,
- .matched_oid = oid,
+ .matched_oid = &oid,
.found_path = 0,
.file_only = file_only
};
};
struct walk_tree_context walk_tree_ctx = {
.match_path = path,
- .matched_oid = oid,
+ .matched_oid = &oid,
.found_path = 0,
.file_only = file_only
};