Commit Diff


commit - 1b3c539b2dd85be56e0b40125774b3d621db6351
commit + 40dba3d841ef97bc452f734f6945dff48bc2f925
blob - 6d3c494aa3e129c1b4f0c594d10a4559ab39a750
blob + ed69c313f4ddb604d3cc46607cc371e59bdbc9ed
--- lib/diff_atomize_text.c
+++ lib/diff_atomize_text.c
@@ -159,10 +159,10 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d)
 static int
 diff_data_atomize_text_lines(struct diff_data *d)
 {
-	if (d->f == NULL)
-		return diff_data_atomize_text_lines_mmap(d);
-	else
+	if (d->data == NULL)
 		return diff_data_atomize_text_lines_fd(d);
+	else
+		return diff_data_atomize_text_lines_mmap(d);
 }
 
 int