summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-03-17 15:29:21 -0400
committerEdward Thomson <ethomson@github.com>2016-03-23 17:17:02 -0400
commit6788553231699d4bb8e0ea0c05fdf83407bfaf6f (patch)
tree0ed8b2b9e50da8a26c1d2c4093eea601945c9620
parent0a2e10328aedae4e989c61f46c29f1fd26ae92d6 (diff)
downloadlibgit2-6788553231699d4bb8e0ea0c05fdf83407bfaf6f.tar.gz
diff: stop processing nitem when its removed
When a directory is removed out from underneath us, stop trying to manipulate it.
-rw-r--r--src/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c
index a2bfcbf6a..5b70998f4 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1091,7 +1091,7 @@ static int handle_unmatched_new_item(
/* if directory is empty, can't advance into it, so either skip
* it or ignore it
*/
- if (contains_oitem)
+ if (error == GIT_ENOTFOUND || contains_oitem)
return iterator_advance(&info->nitem, info->new_iter);
delta_type = GIT_DELTA_IGNORED;
}