| line |
true |
false |
branch |
|
21
|
0 |
169 |
GIT_ASSERT_ARG_WITH_RETVAL(blob, NULL); |
|
23
|
0 |
169 |
if (blob->raw) |
|
31
|
0 |
176 |
GIT_ASSERT_ARG(blob); |
|
33
|
0 |
176 |
if (blob->raw) |
|
43
|
0 |
0 |
GIT_ERROR_CHECK_BLOBSIZE(size); |
|
50
|
190 |
0 |
if (!blob->raw) |
|
59
|
0 |
0 |
GIT_ASSERT_ARG(blob); |
|
71
|
0 |
190 |
GIT_ASSERT_ARG(blob); |
|
86
|
0 |
16 |
GIT_ASSERT_ARG(id); |
|
87
|
0 |
16 |
GIT_ASSERT_ARG(repo); |
|
89
|
16 |
0 |
if ((error = git_repository_odb__weakptr(&odb, repo)) < 0 || |
|
|
0 |
16 |
if ((error = git_repository_odb__weakptr(&odb, repo)) < 0 || |
|
93
|
16 |
0 |
if ((error = git_odb_stream_write(stream, buffer, len)) == 0) |
|
109
|
0 |
47 |
if ((error = git_odb_open_wstream( |
|
113
|
0 |
47 |
if ((fd = git_futils_open_ro(path)) < 0) { |
|
118
|
93 |
0 |
while (!error && (read_len = p_read(fd, buffer, sizeof(buffer))) > 0) { |
|
|
46 |
47 |
while (!error && (read_len = p_read(fd, buffer, sizeof(buffer))) > 0) { |
|
125
|
47 |
0 |
if (written != file_size || read_len < 0) { |
|
|
0 |
47 |
if (written != file_size || read_len < 0) { |
|
130
|
47 |
0 |
if (!error) |
|
151
|
15 |
2 |
if (!error) { |
|
169
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(link_data); |
|
172
|
0 |
0 |
if (read_len != (ssize_t)link_size) { |
|
199
|
0 |
64 |
GIT_ASSERT_ARG(hint_path || !try_load_filters); |
|
|
0 |
0 |
GIT_ASSERT_ARG(hint_path || !try_load_filters); |
|
201
|
64 |
0 |
if (!content_path) { |
|
202
|
0 |
64 |
if (git_repository_workdir_path(&path, repo, hint_path) < 0) |
|
208
|
64 |
0 |
if ((error = git_fs_path_lstat(content_path, &st)) < 0 || |
|
|
64 |
0 |
if ((error = git_fs_path_lstat(content_path, &st)) < 0 || |
|
212
|
0 |
64 |
if (S_ISDIR(st.st_mode)) { |
|
218
|
64 |
0 |
if (out_st) |
|
222
|
64 |
0 |
mode = hint_mode ? hint_mode : st.st_mode; |
|
224
|
0 |
64 |
if (S_ISLNK(mode)) { |
|
229
|
64 |
0 |
if (try_load_filters) |
|
235
|
64 |
0 |
if (error < 0) |
|
237
|
47 |
17 |
else if (fl == NULL) |
|
283
|
0 |
0 |
if ((error = git_fs_path_prettify(&full_path, path, NULL)) < 0) { |
|
290
|
0 |
0 |
if (workdir && !git__prefixcmp(full_path.ptr, workdir)) |
|
|
0 |
0 |
if (workdir && !git__prefixcmp(full_path.ptr, workdir)) |
|
337
|
0 |
0 |
GIT_ASSERT_ARG(out); |
|
338
|
0 |
0 |
GIT_ASSERT_ARG(repo); |
|
341
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(stream); |
|
343
|
0 |
0 |
if (hintpath) { |
|
345
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(stream->hintpath); |
|
353
|
0 |
0 |
if ((error = git_repository__item_path(&path, repo, GIT_REPOSITORY_ITEM_OBJECTS)) < 0 |
|
354
|
0 |
0 |
|| (error = git_str_joinpath(&path, path.ptr, "streamed")) < 0) |
|
357
|
0 |
0 |
if ((error = git_filebuf_open_withsize(&stream->fbuf, git_str_cstr(&path), GIT_FILEBUF_TEMPORARY, |
|
364
|
0 |
0 |
if (error < 0) |
|
381
|
0 |
0 |
if ((error = git_filebuf_flush(&stream->fbuf)) < 0) |
|
398
|
0 |
10 |
GIT_ASSERT_ARG(blob); |
|
420
|
0 |
0 |
GIT_INIT_STRUCTURE_FROM_TEMPLATE(opts, version, |
|
436
|
0 |
0 |
GIT_ASSERT_ARG(blob); |
|
437
|
0 |
0 |
GIT_ASSERT_ARG(path); |
|
438
|
0 |
0 |
GIT_ASSERT_ARG(out); |
|
440
|
0 |
0 |
GIT_ERROR_CHECK_VERSION( |
|
443
|
0 |
0 |
if (given_opts != NULL) |
|
450
|
0 |
0 |
if ((opts.flags & GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES) != 0) |
|
453
|
0 |
0 |
if ((opts.flags & GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD) != 0) |
|
456
|
0 |
0 |
if ((opts.flags & GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT) != 0) { |
|
460
|
0 |
0 |
if (opts.commit_id) |
|
467
|
0 |
0 |
if (!(error = git_filter_list_load_ext( |
|
521
|
0 |
0 |
if (check_for_binary_data) |