Antoine Pelisse [off-list ref] writes:
Re-reading note: OK, This last sentence ("If not we will eventually be
too far and break") is actually a bug. We might break before we find
something interesting while we should keep going. For example in such
a case, we should display like this, but won't:
Glad to see that my question has helped ;-)
quoted hunk
quoted
This is on the else side of if (!xch->ignore), so we are looking at
ignored hunk, which means there is only blank line change. Can chg2
be 0 while chg1 is not zero, i.e. xch being a blank line removal?
Exactly. It can be a blank line removal. But I don't want to consider
it in the calculation.
Here's why:
...
What should be the output of diff --ignore-blank-lines ?
I chose this alternative:
@@ -1,3 +1,4 @@
+change
1
2
3
@@ -7,3 +5,4 @@
4
5
6
+change
While one could have chosen:
@@ -1,10 +1,8 @@
+change
1
2
3
-
-
-
-
4
5
6
+change
...
Nothing is interesting here, we just leave the interesting zone (if
not already left) because everything else failed.
Yes, that asymmetry is what I was wondering if we want to have. If
we show additional blanks as a significant event, I am not so sure
we can say "Nothing is interesting here".
I do not feel strongly either way, but it just felt somewhat
inconsistent.
Thanks.