Fossil SCM
Minor bug-fix when using -w or -Z flag in diff logic. Make sure that the common lines printed in a diff always come from the left-side, it might be that the right-side is different by white-space only.
Commit
d38f0ce7597cc9afbf8dbd242fa07e0eec6f94a1
Parent
0bc584fe020fc43…
1 file changed
+2
-2
+2
-2
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -427,11 +427,11 @@ | ||
| 427 | 427 | b += m; |
| 428 | 428 | if( i<nr-1 ){ |
| 429 | 429 | m = R[r+i*3+3]; |
| 430 | 430 | for(j=0; j<m; j++){ |
| 431 | 431 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 432 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 432 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 433 | 433 | } |
| 434 | 434 | b += m; |
| 435 | 435 | a += m; |
| 436 | 436 | } |
| 437 | 437 | } |
| @@ -440,11 +440,11 @@ | ||
| 440 | 440 | assert( nr==i ); |
| 441 | 441 | m = R[r+nr*3]; |
| 442 | 442 | if( m>nContext ) m = nContext; |
| 443 | 443 | for(j=0; j<m; j++){ |
| 444 | 444 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 445 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 445 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 446 | 446 | } |
| 447 | 447 | } |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | /* |
| 451 | 451 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -427,11 +427,11 @@ | |
| 427 | b += m; |
| 428 | if( i<nr-1 ){ |
| 429 | m = R[r+i*3+3]; |
| 430 | for(j=0; j<m; j++){ |
| 431 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 432 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 433 | } |
| 434 | b += m; |
| 435 | a += m; |
| 436 | } |
| 437 | } |
| @@ -440,11 +440,11 @@ | |
| 440 | assert( nr==i ); |
| 441 | m = R[r+nr*3]; |
| 442 | if( m>nContext ) m = nContext; |
| 443 | for(j=0; j<m; j++){ |
| 444 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 445 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | /* |
| 451 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -427,11 +427,11 @@ | |
| 427 | b += m; |
| 428 | if( i<nr-1 ){ |
| 429 | m = R[r+i*3+3]; |
| 430 | for(j=0; j<m; j++){ |
| 431 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 432 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 433 | } |
| 434 | b += m; |
| 435 | a += m; |
| 436 | } |
| 437 | } |
| @@ -440,11 +440,11 @@ | |
| 440 | assert( nr==i ); |
| 441 | m = R[r+nr*3]; |
| 442 | if( m>nContext ) m = nContext; |
| 443 | for(j=0; j<m; j++){ |
| 444 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 445 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | /* |
| 451 |