Fossil SCM
Suppress the top divider on a context-diff with line numbers.
Commit
43cbe9dd5a1d2ebccd975f7ad20cd1fc9735abd6
Parent
56ad4ac7aecf1de…
1 file changed
+3
-1
+3
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -296,11 +296,13 @@ | ||
| 296 | 296 | * If the patch changes an empty file or results in an empty file, |
| 297 | 297 | * the block header must use 0,0 as position indicator and not 1,0. |
| 298 | 298 | * Otherwise, patch would be confused and may reject the diff. |
| 299 | 299 | */ |
| 300 | 300 | if( showLn ){ |
| 301 | - if( html ){ | |
| 301 | + if( r==0 ){ | |
| 302 | + /* Do not show a top divider */ | |
| 303 | + }else if( html ){ | |
| 302 | 304 | blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.'); |
| 303 | 305 | }else{ |
| 304 | 306 | blob_appendf(pOut, "%.80c\n", '.'); |
| 305 | 307 | } |
| 306 | 308 | }else{ |
| 307 | 309 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -296,11 +296,13 @@ | |
| 296 | * If the patch changes an empty file or results in an empty file, |
| 297 | * the block header must use 0,0 as position indicator and not 1,0. |
| 298 | * Otherwise, patch would be confused and may reject the diff. |
| 299 | */ |
| 300 | if( showLn ){ |
| 301 | if( html ){ |
| 302 | blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.'); |
| 303 | }else{ |
| 304 | blob_appendf(pOut, "%.80c\n", '.'); |
| 305 | } |
| 306 | }else{ |
| 307 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -296,11 +296,13 @@ | |
| 296 | * If the patch changes an empty file or results in an empty file, |
| 297 | * the block header must use 0,0 as position indicator and not 1,0. |
| 298 | * Otherwise, patch would be confused and may reject the diff. |
| 299 | */ |
| 300 | if( showLn ){ |
| 301 | if( r==0 ){ |
| 302 | /* Do not show a top divider */ |
| 303 | }else if( html ){ |
| 304 | blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.'); |
| 305 | }else{ |
| 306 | blob_appendf(pOut, "%.80c\n", '.'); |
| 307 | } |
| 308 | }else{ |
| 309 |