Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Drop ui-blob's constant file_only arguments
Diffstat (limited to '')
| -rw-r--r-- | source/ui-blob.c | 12 |
1 file changed, 6 insertions, 6 deletions
diff --git a/source/ui-blob.c b/source/ui-blob.c index 948b348..bc66509 100644 --- a/source/ui-blob.c +++ b/source/ui-blob.c @@ -91,7 +91,7 @@ static int find_path_oid(struct object_id *oid, char *path, int file_only) return walk.found_path; } -int cgit_ref_path_exists(const char *path, const char *ref, int file_only) +int cgit_ref_path_exists(const char *path, const char *ref) { struct object_id oid; size_t size; @@ -103,14 +103,14 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only) peel_to_commit(&oid); if (odb_read_object_info(the_repository->objects, &oid, &size) != OBJ_COMMIT) goto done; - found = find_path_oid(&oid, path_copy, file_only); + found = find_path_oid(&oid, path_copy, 1); done: free(path_copy); return found; } -int cgit_print_file(char *path, const char *head, int file_only, int html_escape) +int cgit_print_file(char *path, const char *head, int html_escape) { struct object_id oid; enum object_type type; @@ -122,7 +122,7 @@ int cgit_print_file(char *path, const char *head, int file_only, int html_escape peel_to_commit(&oid); type = odb_read_object_info(the_repository->objects, &oid, &size); if (type == OBJ_COMMIT) { - if (!find_path_oid(&oid, path, file_only)) + if (!find_path_oid(&oid, path, 1)) return -1; type = odb_read_object_info(the_repository->objects, &oid, &size); } @@ -157,7 +157,7 @@ int cgit_print_file(char *path, const char *head, int file_only, int html_escape return 0; } -void cgit_print_blob(const char *hex, char *path, const char *head, int file_only) +void cgit_print_blob(const char *hex, char *path, const char *head) { struct object_id oid; enum object_type type; @@ -186,7 +186,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl } if (type == OBJ_COMMIT && path) { - if (!find_path_oid(&oid, path, file_only)) { + if (!find_path_oid(&oid, path, 0)) { cgit_print_error_page(404, "Not Found", "Path not found: %s", path); return; } |
