Fossil SCM

Suppress the top divider on a context-diff with line numbers.

drh 2012-02-04 20:16 UTC retro-sbsdiff
Commit 43cbe9dd5a1d2ebccd975f7ad20cd1fc9735abd6
1 file changed +3 -1
+3 -1
--- src/diff.c
+++ src/diff.c
@@ -296,11 +296,13 @@
296296
* If the patch changes an empty file or results in an empty file,
297297
* the block header must use 0,0 as position indicator and not 1,0.
298298
* Otherwise, patch would be confused and may reject the diff.
299299
*/
300300
if( showLn ){
301
- if( html ){
301
+ if( r==0 ){
302
+ /* Do not show a top divider */
303
+ }else if( html ){
302304
blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.');
303305
}else{
304306
blob_appendf(pOut, "%.80c\n", '.');
305307
}
306308
}else{
307309
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button