summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorAlan Rogers <alan@github.com>2014-05-20 18:16:04 +1000
committerAlan Rogers <alan@github.com>2014-05-20 18:16:04 +1000
commitf47bc8ff5e844fec15e705e8ebd11bae742b8039 (patch)
treeb85e8aa23622a5e9c3eb21278cb748906b47ef7e /src/diff.c
parent9055347944ff13fd5e91de0b29caeecb41c8bff4 (diff)
downloadlibgit2-f47bc8ff5e844fec15e705e8ebd11bae742b8039.tar.gz
Skip unreadable files for now.
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/diff.c b/src/diff.c
index bc23e6b0d..a0cfb5890 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -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