Commit Diff


commit - 72057b70697f93fa5e0c0b63ed2e378aab485bda
commit + 13b152737318b3ddf12efd04d2ecd8b22708f052
blob - 3c20bbfd322cfa4115053a4501a21fb3fb62c229
blob + ec47f65416456d6fa54228e53e8ccea1fd888fba
--- lib/debug.h
+++ lib/debug.h
@@ -54,9 +54,16 @@ static inline void dump_atom(const struct diff_data *l
 
 static inline void dump_atoms(const struct diff_data *d, struct diff_atom *atom, unsigned int count)
 {
-	struct diff_atom *i;
-	foreach_diff_atom(i, atom, count) {
-		dump_atom(d, NULL, i);
+	if (count > 42) {
+		dump_atoms(d, atom, 20);
+		print("[%u lines skipped]\n", count - 20 - 20);
+		dump_atoms(d, atom + count - 20, 20);
+		return;
+	} else {
+		struct diff_atom *i;
+		foreach_diff_atom(i, atom, count) {
+			dump_atom(d, NULL, i);
+		}
 	}
 }