Fossil SCM
Fix the unified diff output so that it conforms with established conventions.
Commit
7fd2a3652ea7368abd40d5c9af07b0e56feb9091bd7c3380e3f28a7773a6b191
Parent
93bb323192ab7db…
1 file changed
+2
-2
+2
-2
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -440,12 +440,12 @@ | ||
| 440 | 440 | * If the patch changes an empty file or results in an empty file, |
| 441 | 441 | * the block header must use 0,0 as position indicator and not 1,0. |
| 442 | 442 | * Otherwise, patch would be confused and may reject the diff. |
| 443 | 443 | */ |
| 444 | 444 | blob_appendf(pOut,"@@ -%d,%d +%d,%d @@", |
| 445 | - na ? a+skip+1 : 0, na, | |
| 446 | - nb ? b+skip+1 : 0, nb); | |
| 445 | + na ? a+skip+1 : a+skip, na, | |
| 446 | + nb ? b+skip+1 : b+skip, nb); | |
| 447 | 447 | if( html ) blob_appendf(pOut, "</span>"); |
| 448 | 448 | blob_append(pOut, "\n", 1); |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | /* Show the initial common area */ |
| 452 | 452 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -440,12 +440,12 @@ | |
| 440 | * If the patch changes an empty file or results in an empty file, |
| 441 | * the block header must use 0,0 as position indicator and not 1,0. |
| 442 | * Otherwise, patch would be confused and may reject the diff. |
| 443 | */ |
| 444 | blob_appendf(pOut,"@@ -%d,%d +%d,%d @@", |
| 445 | na ? a+skip+1 : 0, na, |
| 446 | nb ? b+skip+1 : 0, nb); |
| 447 | if( html ) blob_appendf(pOut, "</span>"); |
| 448 | blob_append(pOut, "\n", 1); |
| 449 | } |
| 450 | |
| 451 | /* Show the initial common area */ |
| 452 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -440,12 +440,12 @@ | |
| 440 | * If the patch changes an empty file or results in an empty file, |
| 441 | * the block header must use 0,0 as position indicator and not 1,0. |
| 442 | * Otherwise, patch would be confused and may reject the diff. |
| 443 | */ |
| 444 | blob_appendf(pOut,"@@ -%d,%d +%d,%d @@", |
| 445 | na ? a+skip+1 : a+skip, na, |
| 446 | nb ? b+skip+1 : b+skip, nb); |
| 447 | if( html ) blob_appendf(pOut, "</span>"); |
| 448 | blob_append(pOut, "\n", 1); |
| 449 | } |
| 450 | |
| 451 | /* Show the initial common area */ |
| 452 |