Fossil SCM
Modify "/fdiff?patch" to generate unified patches with the default number of context lines, analogous to "/vdiff?patch". It looks like "/fdiff?patch" was switched to side-by-side during the recent diff refactoring, when "diffFlags = 4" in its code path no longer meant "4 lines of diff context" (packed into the now obsoleted DIFF_CONTEXT_MASK range), but DIFF_SIDEBYSIDE. (Please roll back this commit or move it to a siding branch if incorrect.)
Commit
5aa1ec37890fe6d505d410df5f1b0864e7894414867c305c1a78e4c26279be6a
Parent
37ccaafddb2bd4e…
1 file changed
+1
-1
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1767,11 +1767,11 @@ | ||
| 1767 | 1767 | if( isPatch ){ |
| 1768 | 1768 | Blob c1, c2, *pOut; |
| 1769 | 1769 | DiffConfig DCfg; |
| 1770 | 1770 | pOut = cgi_output_blob(); |
| 1771 | 1771 | cgi_set_content_type("text/plain"); |
| 1772 | - diffFlags = 4; | |
| 1772 | + diffFlags = DIFF_VERBOSE; | |
| 1773 | 1773 | content_get(v1, &c1); |
| 1774 | 1774 | content_get(v2, &c2); |
| 1775 | 1775 | diff_config_init(&DCfg, diffFlags); |
| 1776 | 1776 | DCfg.pRe = pRe; |
| 1777 | 1777 | text_diff(&c1, &c2, pOut, &DCfg); |
| 1778 | 1778 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1767,11 +1767,11 @@ | |
| 1767 | if( isPatch ){ |
| 1768 | Blob c1, c2, *pOut; |
| 1769 | DiffConfig DCfg; |
| 1770 | pOut = cgi_output_blob(); |
| 1771 | cgi_set_content_type("text/plain"); |
| 1772 | diffFlags = 4; |
| 1773 | content_get(v1, &c1); |
| 1774 | content_get(v2, &c2); |
| 1775 | diff_config_init(&DCfg, diffFlags); |
| 1776 | DCfg.pRe = pRe; |
| 1777 | text_diff(&c1, &c2, pOut, &DCfg); |
| 1778 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1767,11 +1767,11 @@ | |
| 1767 | if( isPatch ){ |
| 1768 | Blob c1, c2, *pOut; |
| 1769 | DiffConfig DCfg; |
| 1770 | pOut = cgi_output_blob(); |
| 1771 | cgi_set_content_type("text/plain"); |
| 1772 | diffFlags = DIFF_VERBOSE; |
| 1773 | content_get(v1, &c1); |
| 1774 | content_get(v2, &c2); |
| 1775 | diff_config_init(&DCfg, diffFlags); |
| 1776 | DCfg.pRe = pRe; |
| 1777 | text_diff(&c1, &c2, pOut, &DCfg); |
| 1778 |