diff options
Diffstat (limited to 'ui-blob.c')
-rw-r--r-- | ui-blob.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | struct walk_tree_context { | 14 | struct walk_tree_context { |
15 | const char *match_path; | 15 | const char *match_path; |
16 | struct object_id matched_oid; | 16 | struct object_id *matched_oid; |
17 | unsigned int found_path:1; | 17 | unsigned int found_path:1; |
18 | unsigned int file_only:1; | 18 | unsigned int file_only:1; |
19 | }; | 19 | }; |
@@ -28,7 +28,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base, | |||
28 | if (strncmp(base->buf, walk_tree_ctx->match_path, base->len) | 28 | if (strncmp(base->buf, walk_tree_ctx->match_path, base->len) |
29 | || strcmp(walk_tree_ctx->match_path + base->len, pathname)) | 29 | || strcmp(walk_tree_ctx->match_path + base->len, pathname)) |
30 | return READ_TREE_RECURSIVE; | 30 | return READ_TREE_RECURSIVE; |
31 | hashcpy(walk_tree_ctx->matched_oid.hash, sha1); | 31 | hashcpy(walk_tree_ctx->matched_oid->hash, sha1); |
32 | walk_tree_ctx->found_path = 1; | 32 | walk_tree_ctx->found_path = 1; |
33 | return 0; | 33 | return 0; |
34 | } | 34 | } |
@@ -47,7 +47,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only) | |||
47 | }; | 47 | }; |
48 | struct walk_tree_context walk_tree_ctx = { | 48 | struct walk_tree_context walk_tree_ctx = { |
49 | .match_path = path, | 49 | .match_path = path, |
50 | .matched_oid = oid, | 50 | .matched_oid = &oid, |
51 | .found_path = 0, | 51 | .found_path = 0, |
52 | .file_only = file_only | 52 | .file_only = file_only |
53 | }; | 53 | }; |
@@ -77,7 +77,7 @@ int cgit_print_file(char *path, const char *head, int file_only) | |||
77 | }; | 77 | }; |
78 | struct walk_tree_context walk_tree_ctx = { | 78 | struct walk_tree_context walk_tree_ctx = { |
79 | .match_path = path, | 79 | .match_path = path, |
80 | .matched_oid = oid, | 80 | .matched_oid = &oid, |
81 | .found_path = 0, | 81 | .found_path = 0, |
82 | .file_only = file_only | 82 | .file_only = file_only |
83 | }; | 83 | }; |
@@ -120,7 +120,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl | |||
120 | }; | 120 | }; |
121 | struct walk_tree_context walk_tree_ctx = { | 121 | struct walk_tree_context walk_tree_ctx = { |
122 | .match_path = path, | 122 | .match_path = path, |
123 | .matched_oid = oid, | 123 | .matched_oid = &oid, |
124 | .found_path = 0, | 124 | .found_path = 0, |
125 | .file_only = file_only | 125 | .file_only = file_only |
126 | }; | 126 | }; |