Commit f47bc8ff by Alan Rogers

Skip unreadable files for now.

parent 90553479
...@@ -925,14 +925,14 @@ static int handle_unmatched_new_item( ...@@ -925,14 +925,14 @@ static int handle_unmatched_new_item(
error = git_iterator_advance_into(&info->nitem, info->new_iter); error = git_iterator_advance_into(&info->nitem, info->new_iter);
/* if real error or no error, proceed with iteration */ /* if real error or no error, proceed with iteration */
if (error != GIT_ENOTFOUND) if (error != GIT_ENOTFOUND && error != GIT_EUNREADABLE)
return error; return error;
giterr_clear(); giterr_clear();
/* if directory is empty, can't advance into it, so either skip /* if directory is empty, can't advance into it, so either skip
* it or ignore it * it or ignore it
*/ */
if (contains_oitem) if (contains_oitem && error != GIT_EUNREADABLE)
return git_iterator_advance(&info->nitem, info->new_iter); return git_iterator_advance(&info->nitem, info->new_iter);
delta_type = GIT_DELTA_IGNORED; delta_type = GIT_DELTA_IGNORED;
} }
...@@ -981,7 +981,7 @@ static int handle_unmatched_new_item( ...@@ -981,7 +981,7 @@ static int handle_unmatched_new_item(
} }
/* Actually create the record for this item if necessary */ /* 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; return error;
/* If user requested TYPECHANGE records, then check for that instead of /* If user requested TYPECHANGE records, then check for that instead of
......
...@@ -329,8 +329,10 @@ int git_status_list_new( ...@@ -329,8 +329,10 @@ int git_status_list_new(
if (show != GIT_STATUS_SHOW_INDEX_ONLY) { if (show != GIT_STATUS_SHOW_INDEX_ONLY) {
if ((error = git_diff_index_to_workdir( 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; goto done;
}
if ((flags & GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR) != 0 && if ((flags & GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR) != 0 &&
(error = git_diff_find_similar(status->idx2wd, &findopt)) < 0) (error = git_diff_find_similar(status->idx2wd, &findopt)) < 0)
...@@ -407,8 +409,10 @@ int git_status_foreach_ext( ...@@ -407,8 +409,10 @@ int git_status_foreach_ext(
size_t i; size_t i;
int error = 0; 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; return error;
}
git_vector_foreach(&status->paired, i, status_entry) { git_vector_foreach(&status->paired, i, status_entry) {
const char *path = status_entry->head_to_index ? const char *path = status_entry->head_to_index ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment