From 6788553231699d4bb8e0ea0c05fdf83407bfaf6f Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 17 Mar 2016 15:29:21 -0400 Subject: [PATCH] diff: stop processing nitem when its removed When a directory is removed out from underneath us, stop trying to manipulate it. --- src/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }