mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 17:51:33 +00:00
Skip unreadable files for now.
This commit is contained in:
parent
9055347944
commit
f47bc8ff5e
@ -925,14 +925,14 @@ static int handle_unmatched_new_item(
|
||||
error = git_iterator_advance_into(&info->nitem, info->new_iter);
|
||||
|
||||
/* if real error or no error, proceed with iteration */
|
||||
if (error != GIT_ENOTFOUND)
|
||||
if (error != GIT_ENOTFOUND && error != GIT_EUNREADABLE)
|
||||
return error;
|
||||
giterr_clear();
|
||||
|
||||
/* if directory is empty, can't advance into it, so either skip
|
||||
* it or ignore it
|
||||
*/
|
||||
if (contains_oitem)
|
||||
if (contains_oitem && error != GIT_EUNREADABLE)
|
||||
return git_iterator_advance(&info->nitem, info->new_iter);
|
||||
delta_type = GIT_DELTA_IGNORED;
|
||||
}
|
||||
@ -981,7 +981,7 @@ static int handle_unmatched_new_item(
|
||||
}
|
||||
|
||||
/* Actually create the record for this item if necessary */
|
||||
if ((error = diff_delta__from_one(diff, delta_type, nitem)) != 0)
|
||||
if (error != GIT_EUNREADABLE && (error = diff_delta__from_one(diff, delta_type, nitem)) != 0)
|
||||
return error;
|
||||
|
||||
/* If user requested TYPECHANGE records, then check for that instead of
|
||||
|
@ -329,8 +329,10 @@ int git_status_list_new(
|
||||
|
||||
if (show != GIT_STATUS_SHOW_INDEX_ONLY) {
|
||||
if ((error = git_diff_index_to_workdir(
|
||||
&status->idx2wd, repo, index, &diffopt)) < 0)
|
||||
&status->idx2wd, repo, index, &diffopt)) < 0) {
|
||||
printf("git_diff_index_to_workdir failed with error %d\n", error);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ((flags & GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR) != 0 &&
|
||||
(error = git_diff_find_similar(status->idx2wd, &findopt)) < 0)
|
||||
@ -407,8 +409,10 @@ int git_status_foreach_ext(
|
||||
size_t i;
|
||||
int error = 0;
|
||||
|
||||
if ((error = git_status_list_new(&status, repo, opts)) < 0)
|
||||
if ((error = git_status_list_new(&status, repo, opts)) < 0) {
|
||||
printf("git_status_list_new failed with error %d\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
git_vector_foreach(&status->paired, i, status_entry) {
|
||||
const char *path = status_entry->head_to_index ?
|
||||
|
Loading…
Reference in New Issue
Block a user