Commit 554b91b15a7cc9f7b1e6946d04eb54a5dd2f2232

Stefan Sperling 2019-02-04T16:55:18

oops, fix endless loop in diff_fileindex_dir(); code was missing somehow

diff --git a/lib/fileindex.c b/lib/fileindex.c
index 0c72541..9923cab 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -832,6 +832,20 @@ diff_fileindex_dir(struct got_fileindex *fileindex,
 			}
 			if (err)
 				break;
+		} else if (*ie) {
+			next = walk_fileindex(fileindex, *ie);
+			err = cb->diff_old(cb_arg, *ie, path);
+			if (err)
+				break;
+			*ie = next;
+		} else if (dle) {
+			err = cb->diff_new(cb_arg, dle->de, path);
+			if (err)
+				break;
+			err = walk_dir(&dle, fileindex, ie, dle, path, dir,
+			    repo, cb, cb_arg);
+			if (err)
+				break;
 		}
 	}