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.)

florian 2021-12-28 06:46 trunk
Commit 5aa1ec37890fe6d505d410df5f1b0864e7894414867c305c1a78e4c26279be6a
1 file changed +1 -1
+1 -1
--- src/info.c
+++ src/info.c
@@ -1767,11 +1767,11 @@
17671767
if( isPatch ){
17681768
Blob c1, c2, *pOut;
17691769
DiffConfig DCfg;
17701770
pOut = cgi_output_blob();
17711771
cgi_set_content_type("text/plain");
1772
- diffFlags = 4;
1772
+ diffFlags = DIFF_VERBOSE;
17731773
content_get(v1, &c1);
17741774
content_get(v2, &c2);
17751775
diff_config_init(&DCfg, diffFlags);
17761776
DCfg.pRe = pRe;
17771777
text_diff(&c1, &c2, pOut, &DCfg);
17781778
--- 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

Keyboard Shortcuts

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