Fossil SCM

Rename the options for whitespace handling in annotate/blame/diff following GNU diff, not following GIT. So whether your diff tool is configured being internal or external, the same options can be used.

jan.nijtmans 2014-03-07 15:49 trunk
Commit 28234db8bc9605008c0326020eceb1efd56a7ce1
+25 -29
--- src/diff.c
+++ src/diff.c
@@ -28,12 +28,12 @@
2828
** Flag parameters to the text_diff() routine used to control the formatting
2929
** of the diff output.
3030
*/
3131
#define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
3232
#define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33
-#define DIFF_IGNORE_SOLWS ((u64)0x01000000) /* Ignore start-of-line whitespace */
34
-#define DIFF_IGNORE_EOLWS ((u64)0x02000000) /* Ignore end-of-line whitespace */
33
+#define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34
+#define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
3535
#define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
3636
#define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
3737
#define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
3838
#define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
3939
#define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
@@ -169,11 +169,11 @@
169169
s = 0;
170170
indent = 0;
171171
if( diffFlags & DIFF_IGNORE_EOLWS ){
172172
while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
173173
}
174
- if( diffFlags & DIFF_IGNORE_SOLWS ){
174
+ if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
175175
while( s<k && fossil_isspace(z[s]) ){
176176
if( z[s]=='\t' ){
177177
indent = ((indent+9)/8)*8;
178178
}else if( z[s]==' ' ){
179179
indent++;
@@ -1789,11 +1789,11 @@
17891789
if( diffFlags & DIFF_INVERT ){
17901790
Blob *pTemp = pA_Blob;
17911791
pA_Blob = pB_Blob;
17921792
pB_Blob = pTemp;
17931793
}
1794
- ignoreWs = (diffFlags & (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))!=0;
1794
+ ignoreWs = (diffFlags & DIFF_IGNORE_ALLWS)!=0;
17951795
blob_to_utf8_no_bom(pA_Blob, 0);
17961796
blob_to_utf8_no_bom(pB_Blob, 0);
17971797
17981798
/* Prepare the input files */
17991799
memset(&c, 0, sizeof(c));
@@ -1859,22 +1859,21 @@
18591859
18601860
/*
18611861
** Process diff-related command-line options and return an appropriate
18621862
** "diffFlags" integer.
18631863
**
1864
-** --brief Show filenames only DIFF_BRIEF
1865
-** --context|-c N N lines of context. DIFF_CONTEXT_MASK
1866
-** --html Format for HTML DIFF_HTML
1867
-** --invert Invert the diff DIFF_INVERT
1868
-** --ignore-space-at-eol Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1869
-** --ignore-space-at-sol Ignore sol-whitespaces DIFF_IGNORE_SOLWS
1870
-** --linenum|-n Show line numbers DIFF_LINENO
1871
-** --noopt Disable optimization DIFF_NOOPT
1872
-** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE
1873
-** --unified Unified diff. ~DIFF_SIDEBYSIDE
1874
-** -w Ignore all whitespaces DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS
1875
-** --width|-W N N character lines. DIFF_WIDTH_MASK
1864
+** --brief Show filenames only DIFF_BRIEF
1865
+** -c|--context N N lines of context. DIFF_CONTEXT_MASK
1866
+** --html Format for HTML DIFF_HTML
1867
+** --invert Invert the diff DIFF_INVERT
1868
+** -n|--linenum Show line numbers DIFF_LINENO
1869
+** --noopt Disable optimization DIFF_NOOPT
1870
+** --unified Unified diff. ~DIFF_SIDEBYSIDE
1871
+** -w|--ignore-all-space Ignore all whitespaces DIFF_IGNORE_ALLWS
1872
+** --width|-W N N character lines. DIFF_WIDTH_MASK
1873
+** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1874
+** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
18761875
*/
18771876
u64 diff_options(void){
18781877
u64 diffFlags = 0;
18791878
const char *z;
18801879
int f;
@@ -1888,13 +1887,12 @@
18881887
f *= DIFF_CONTEXT_MASK+1;
18891888
if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
18901889
diffFlags |= f;
18911890
}
18921891
if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML;
1893
- if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
1894
- if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1895
- if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
1892
+ if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1893
+ if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS;
18961894
if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO;
18971895
if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT;
18981896
if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT;
18991897
if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF;
19001898
return diffFlags;
@@ -2214,11 +2212,11 @@
22142212
fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
22152213
if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
22162214
iLimit = atoi(PD("limit","20"));
22172215
if( P("filevers") ) annFlags |= ANN_FILE_VERS;
22182216
ignoreWs = P("w")!=0;
2219
- if( ignoreWs ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2217
+ if( ignoreWs ) diffFlags |= DIFF_IGNORE_ALLWS;
22202218
if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
22212219
fossil_redirect_home();
22222220
}
22232221
22242222
/* compute the annotation */
@@ -2368,16 +2366,15 @@
23682366
** the file was last modified. The "annotate" command shows line numbers
23692367
** and omits the username. The "blame" and "praise" commands show the user
23702368
** who made each checkin and omits the line number.
23712369
**
23722370
** Options:
2373
-** --filevers Show file version numbers rather than check-in versions
2374
-** -l|--log List all versions analyzed
2375
-** -n|--limit N Only look backwards in time by N versions
2376
-** --ignore-space-at-eol Ignore eol-whitespaces
2377
-** --ignore-space-at-sol Ignore sol-whitespaces
2378
-** -w Ignore all whitespaces
2371
+** --filevers Show file version numbers rather than check-in versions
2372
+** -l|--log List all versions analyzed
2373
+** -n|--limit N Only look backwards in time by N versions
2374
+** -Z|--ignore-trailing-space Ignore eol-whitespaces
2375
+** -w|--ignore-all-space Ignore all whitespaces
23792376
**
23802377
** See also: info, finfo, timeline
23812378
*/
23822379
void annotate_cmd(void){
23832380
int fnid; /* Filename ID */
@@ -2399,13 +2396,12 @@
23992396
bBlame = g.argv[1][0]!='a';
24002397
zLimit = find_option("limit","n",1);
24012398
if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
24022399
iLimit = atoi(zLimit);
24032400
showLog = find_option("log","l",0)!=0;
2404
- if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
2405
- if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
2406
- if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2401
+ if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
2402
+ if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS;
24072403
fileVers = find_option("filevers",0,0)!=0;
24082404
db_must_be_within_tree();
24092405
if( g.argc<3 ) {
24102406
usage("FILENAME");
24112407
}
24122408
--- src/diff.c
+++ src/diff.c
@@ -28,12 +28,12 @@
28 ** Flag parameters to the text_diff() routine used to control the formatting
29 ** of the diff output.
30 */
31 #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_SOLWS ((u64)0x01000000) /* Ignore start-of-line whitespace */
34 #define DIFF_IGNORE_EOLWS ((u64)0x02000000) /* Ignore end-of-line whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37 #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
38 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
39 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
@@ -169,11 +169,11 @@
169 s = 0;
170 indent = 0;
171 if( diffFlags & DIFF_IGNORE_EOLWS ){
172 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
173 }
174 if( diffFlags & DIFF_IGNORE_SOLWS ){
175 while( s<k && fossil_isspace(z[s]) ){
176 if( z[s]=='\t' ){
177 indent = ((indent+9)/8)*8;
178 }else if( z[s]==' ' ){
179 indent++;
@@ -1789,11 +1789,11 @@
1789 if( diffFlags & DIFF_INVERT ){
1790 Blob *pTemp = pA_Blob;
1791 pA_Blob = pB_Blob;
1792 pB_Blob = pTemp;
1793 }
1794 ignoreWs = (diffFlags & (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))!=0;
1795 blob_to_utf8_no_bom(pA_Blob, 0);
1796 blob_to_utf8_no_bom(pB_Blob, 0);
1797
1798 /* Prepare the input files */
1799 memset(&c, 0, sizeof(c));
@@ -1859,22 +1859,21 @@
1859
1860 /*
1861 ** Process diff-related command-line options and return an appropriate
1862 ** "diffFlags" integer.
1863 **
1864 ** --brief Show filenames only DIFF_BRIEF
1865 ** --context|-c N N lines of context. DIFF_CONTEXT_MASK
1866 ** --html Format for HTML DIFF_HTML
1867 ** --invert Invert the diff DIFF_INVERT
1868 ** --ignore-space-at-eol Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1869 ** --ignore-space-at-sol Ignore sol-whitespaces DIFF_IGNORE_SOLWS
1870 ** --linenum|-n Show line numbers DIFF_LINENO
1871 ** --noopt Disable optimization DIFF_NOOPT
1872 ** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE
1873 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1874 ** -w Ignore all whitespaces DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS
1875 ** --width|-W N N character lines. DIFF_WIDTH_MASK
1876 */
1877 u64 diff_options(void){
1878 u64 diffFlags = 0;
1879 const char *z;
1880 int f;
@@ -1888,13 +1887,12 @@
1888 f *= DIFF_CONTEXT_MASK+1;
1889 if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
1890 diffFlags |= f;
1891 }
1892 if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML;
1893 if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
1894 if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1895 if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
1896 if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO;
1897 if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT;
1898 if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT;
1899 if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF;
1900 return diffFlags;
@@ -2214,11 +2212,11 @@
2214 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2215 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2216 iLimit = atoi(PD("limit","20"));
2217 if( P("filevers") ) annFlags |= ANN_FILE_VERS;
2218 ignoreWs = P("w")!=0;
2219 if( ignoreWs ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2220 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2221 fossil_redirect_home();
2222 }
2223
2224 /* compute the annotation */
@@ -2368,16 +2366,15 @@
2368 ** the file was last modified. The "annotate" command shows line numbers
2369 ** and omits the username. The "blame" and "praise" commands show the user
2370 ** who made each checkin and omits the line number.
2371 **
2372 ** Options:
2373 ** --filevers Show file version numbers rather than check-in versions
2374 ** -l|--log List all versions analyzed
2375 ** -n|--limit N Only look backwards in time by N versions
2376 ** --ignore-space-at-eol Ignore eol-whitespaces
2377 ** --ignore-space-at-sol Ignore sol-whitespaces
2378 ** -w Ignore all whitespaces
2379 **
2380 ** See also: info, finfo, timeline
2381 */
2382 void annotate_cmd(void){
2383 int fnid; /* Filename ID */
@@ -2399,13 +2396,12 @@
2399 bBlame = g.argv[1][0]!='a';
2400 zLimit = find_option("limit","n",1);
2401 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2402 iLimit = atoi(zLimit);
2403 showLog = find_option("log","l",0)!=0;
2404 if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
2405 if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
2406 if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2407 fileVers = find_option("filevers",0,0)!=0;
2408 db_must_be_within_tree();
2409 if( g.argc<3 ) {
2410 usage("FILENAME");
2411 }
2412
--- src/diff.c
+++ src/diff.c
@@ -28,12 +28,12 @@
28 ** Flag parameters to the text_diff() routine used to control the formatting
29 ** of the diff output.
30 */
31 #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34 #define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37 #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
38 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
39 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
@@ -169,11 +169,11 @@
169 s = 0;
170 indent = 0;
171 if( diffFlags & DIFF_IGNORE_EOLWS ){
172 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
173 }
174 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
175 while( s<k && fossil_isspace(z[s]) ){
176 if( z[s]=='\t' ){
177 indent = ((indent+9)/8)*8;
178 }else if( z[s]==' ' ){
179 indent++;
@@ -1789,11 +1789,11 @@
1789 if( diffFlags & DIFF_INVERT ){
1790 Blob *pTemp = pA_Blob;
1791 pA_Blob = pB_Blob;
1792 pB_Blob = pTemp;
1793 }
1794 ignoreWs = (diffFlags & DIFF_IGNORE_ALLWS)!=0;
1795 blob_to_utf8_no_bom(pA_Blob, 0);
1796 blob_to_utf8_no_bom(pB_Blob, 0);
1797
1798 /* Prepare the input files */
1799 memset(&c, 0, sizeof(c));
@@ -1859,22 +1859,21 @@
1859
1860 /*
1861 ** Process diff-related command-line options and return an appropriate
1862 ** "diffFlags" integer.
1863 **
1864 ** --brief Show filenames only DIFF_BRIEF
1865 ** -c|--context N N lines of context. DIFF_CONTEXT_MASK
1866 ** --html Format for HTML DIFF_HTML
1867 ** --invert Invert the diff DIFF_INVERT
1868 ** -n|--linenum Show line numbers DIFF_LINENO
1869 ** --noopt Disable optimization DIFF_NOOPT
1870 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1871 ** -w|--ignore-all-space Ignore all whitespaces DIFF_IGNORE_ALLWS
1872 ** --width|-W N N character lines. DIFF_WIDTH_MASK
1873 ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1874 ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
 
1875 */
1876 u64 diff_options(void){
1877 u64 diffFlags = 0;
1878 const char *z;
1879 int f;
@@ -1888,13 +1887,12 @@
1887 f *= DIFF_CONTEXT_MASK+1;
1888 if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
1889 diffFlags |= f;
1890 }
1891 if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML;
1892 if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1893 if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS;
 
1894 if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO;
1895 if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT;
1896 if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT;
1897 if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF;
1898 return diffFlags;
@@ -2214,11 +2212,11 @@
2212 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2213 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2214 iLimit = atoi(PD("limit","20"));
2215 if( P("filevers") ) annFlags |= ANN_FILE_VERS;
2216 ignoreWs = P("w")!=0;
2217 if( ignoreWs ) diffFlags |= DIFF_IGNORE_ALLWS;
2218 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2219 fossil_redirect_home();
2220 }
2221
2222 /* compute the annotation */
@@ -2368,16 +2366,15 @@
2366 ** the file was last modified. The "annotate" command shows line numbers
2367 ** and omits the username. The "blame" and "praise" commands show the user
2368 ** who made each checkin and omits the line number.
2369 **
2370 ** Options:
2371 ** --filevers Show file version numbers rather than check-in versions
2372 ** -l|--log List all versions analyzed
2373 ** -n|--limit N Only look backwards in time by N versions
2374 ** -Z|--ignore-trailing-space Ignore eol-whitespaces
2375 ** -w|--ignore-all-space Ignore all whitespaces
 
2376 **
2377 ** See also: info, finfo, timeline
2378 */
2379 void annotate_cmd(void){
2380 int fnid; /* Filename ID */
@@ -2399,13 +2396,12 @@
2396 bBlame = g.argv[1][0]!='a';
2397 zLimit = find_option("limit","n",1);
2398 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2399 iLimit = atoi(zLimit);
2400 showLog = find_option("log","l",0)!=0;
2401 if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
2402 if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS;
 
2403 fileVers = find_option("filevers",0,0)!=0;
2404 db_must_be_within_tree();
2405 if( g.argc<3 ) {
2406 usage("FILENAME");
2407 }
2408
+16 -17
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1089,27 +1089,26 @@
10891089
** The "--binary" option causes files matching the glob PATTERN to be treated
10901090
** as binary when considering if they should be used with external diff program.
10911091
** This option overrides the "binary-glob" setting.
10921092
**
10931093
** Options:
1094
-** --binary PATTERN Treat files that match the glob PATTERN as binary
1095
-** --branch BRANCH Show diff of all changes on BRANCH
1096
-** --brief Show filenames only
1097
-** --context|-c N Use N lines of context
1098
-** --diff-binary BOOL Include binary files when using external commands
1099
-** --from|-r VERSION select VERSION as source for the diff
1100
-** --ignore-space-at-eol Ignore changes to end-of-line whitespace
1101
-** --ignore-space-at-sol Ignore changes to start-of-line whitespace
1102
-** --internal|-i use internal diff logic
1103
-** --side-by-side|-y side-by-side diff
1104
-** --tk Launch a Tcl/Tk GUI for display
1105
-** --to VERSION select VERSION as target for the diff
1106
-** --unified unified diff
1107
-** -v|--verbose output complete text of added or deleted files
1108
-** -w Ignore changes to start-of-line and end-of-line
1109
-** whitespace
1110
-** -W|--width Width of lines in side-by-side diff
1094
+** --binary PATTERN Treat files that match the glob PATTERN as binary
1095
+** --branch BRANCH Show diff of all changes on BRANCH
1096
+** --brief Show filenames only
1097
+** --context|-c N Use N lines of context
1098
+** --diff-binary BOOL Include binary files when using external commands
1099
+** --from|-r VERSION select VERSION as source for the diff
1100
+** --internal|-i use internal diff logic
1101
+** --side-by-side|-y side-by-side diff
1102
+** --tk Launch a Tcl/Tk GUI for display
1103
+** --to VERSION select VERSION as target for the diff
1104
+** --unified unified diff
1105
+** -v|--verbose output complete text of added or deleted files
1106
+** -w|--ignore-all-space Ignore changes to start-of-line and end-of-line
1107
+** whitespace
1108
+** -W|--width Width of lines in side-by-side diff
1109
+** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
11111110
*/
11121111
void diff_cmd(void){
11131112
int isGDiff; /* True for gdiff. False for normal diff */
11141113
int isInternDiff; /* True for internal diff */
11151114
int verboseFlag; /* True if -v or --verbose flag is used */
11161115
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1089,27 +1089,26 @@
1089 ** The "--binary" option causes files matching the glob PATTERN to be treated
1090 ** as binary when considering if they should be used with external diff program.
1091 ** This option overrides the "binary-glob" setting.
1092 **
1093 ** Options:
1094 ** --binary PATTERN Treat files that match the glob PATTERN as binary
1095 ** --branch BRANCH Show diff of all changes on BRANCH
1096 ** --brief Show filenames only
1097 ** --context|-c N Use N lines of context
1098 ** --diff-binary BOOL Include binary files when using external commands
1099 ** --from|-r VERSION select VERSION as source for the diff
1100 ** --ignore-space-at-eol Ignore changes to end-of-line whitespace
1101 ** --ignore-space-at-sol Ignore changes to start-of-line whitespace
1102 ** --internal|-i use internal diff logic
1103 ** --side-by-side|-y side-by-side diff
1104 ** --tk Launch a Tcl/Tk GUI for display
1105 ** --to VERSION select VERSION as target for the diff
1106 ** --unified unified diff
1107 ** -v|--verbose output complete text of added or deleted files
1108 ** -w Ignore changes to start-of-line and end-of-line
1109 ** whitespace
1110 ** -W|--width Width of lines in side-by-side diff
1111 */
1112 void diff_cmd(void){
1113 int isGDiff; /* True for gdiff. False for normal diff */
1114 int isInternDiff; /* True for internal diff */
1115 int verboseFlag; /* True if -v or --verbose flag is used */
1116
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1089,27 +1089,26 @@
1089 ** The "--binary" option causes files matching the glob PATTERN to be treated
1090 ** as binary when considering if they should be used with external diff program.
1091 ** This option overrides the "binary-glob" setting.
1092 **
1093 ** Options:
1094 ** --binary PATTERN Treat files that match the glob PATTERN as binary
1095 ** --branch BRANCH Show diff of all changes on BRANCH
1096 ** --brief Show filenames only
1097 ** --context|-c N Use N lines of context
1098 ** --diff-binary BOOL Include binary files when using external commands
1099 ** --from|-r VERSION select VERSION as source for the diff
1100 ** --internal|-i use internal diff logic
1101 ** --side-by-side|-y side-by-side diff
1102 ** --tk Launch a Tcl/Tk GUI for display
1103 ** --to VERSION select VERSION as target for the diff
1104 ** --unified unified diff
1105 ** -v|--verbose output complete text of added or deleted files
1106 ** -w|--ignore-all-space Ignore changes to start-of-line and end-of-line
1107 ** whitespace
1108 ** -W|--width Width of lines in side-by-side diff
1109 ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
 
1110 */
1111 void diff_cmd(void){
1112 int isGDiff; /* True for gdiff. False for normal diff */
1113 int isInternDiff; /* True for internal diff */
1114 int verboseFlag; /* True if -v or --verbose flag is used */
1115
+4 -5
--- src/info.c
+++ src/info.c
@@ -460,11 +460,11 @@
460460
}else{
461461
diffFlags = DIFF_INLINE;
462462
}
463463
464464
if( P("w") ){
465
- diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
465
+ diffFlags |= DIFF_IGNORE_ALLWS;
466466
}
467467
/* "dc" query parameter determines lines of context */
468468
x = atoi(PD("dc","7"));
469469
if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470470
diffFlags += x;
@@ -678,11 +678,11 @@
678678
verboseFlag = !verboseFlag;
679679
zPage = "ci";
680680
zPageHide = "vinfo";
681681
}
682682
diffFlags = construct_diff_flags(verboseFlag, sideBySide);
683
- zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
683
+ zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
684684
if( verboseFlag ){
685685
@ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
686686
@ Hide&nbsp;Diffs</a>
687687
if( sideBySide ){
688688
@ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
@@ -988,11 +988,11 @@
988988
zTo = P("to");
989989
if(zGlob && !*zGlob){
990990
zGlob = NULL;
991991
}
992992
diffFlags = construct_diff_flags(verboseFlag, sideBySide);
993
- zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
993
+ zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
994994
if( sideBySide || verboseFlag ){
995995
style_submenu_element("Hide Diff", "hidediff",
996996
"%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
997997
zFrom, zTo,
998998
zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
@@ -1382,13 +1382,12 @@
13821382
zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
13831383
zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
13841384
diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
13851385
13861386
style_header("Diff");
1387
- zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
1387
+ zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
13881388
if( *zW ){
1389
- diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
13901389
style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes",
13911390
"%s/fdiff?v1=%T&v2=%T&sbs=%d",
13921391
g.zTop, P("v1"), P("v2"), sideBySide);
13931392
}else{
13941393
style_submenu_element("Ignore Whitespace", "Ignore Whitespace",
13951394
--- src/info.c
+++ src/info.c
@@ -460,11 +460,11 @@
460 }else{
461 diffFlags = DIFF_INLINE;
462 }
463
464 if( P("w") ){
465 diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
466 }
467 /* "dc" query parameter determines lines of context */
468 x = atoi(PD("dc","7"));
469 if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470 diffFlags += x;
@@ -678,11 +678,11 @@
678 verboseFlag = !verboseFlag;
679 zPage = "ci";
680 zPageHide = "vinfo";
681 }
682 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
683 zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
684 if( verboseFlag ){
685 @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
686 @ Hide&nbsp;Diffs</a>
687 if( sideBySide ){
688 @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
@@ -988,11 +988,11 @@
988 zTo = P("to");
989 if(zGlob && !*zGlob){
990 zGlob = NULL;
991 }
992 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
993 zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
994 if( sideBySide || verboseFlag ){
995 style_submenu_element("Hide Diff", "hidediff",
996 "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
997 zFrom, zTo,
998 zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
@@ -1382,13 +1382,12 @@
1382 zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
1383 zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
1384 diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
1385
1386 style_header("Diff");
1387 zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
1388 if( *zW ){
1389 diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
1390 style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes",
1391 "%s/fdiff?v1=%T&v2=%T&sbs=%d",
1392 g.zTop, P("v1"), P("v2"), sideBySide);
1393 }else{
1394 style_submenu_element("Ignore Whitespace", "Ignore Whitespace",
1395
--- src/info.c
+++ src/info.c
@@ -460,11 +460,11 @@
460 }else{
461 diffFlags = DIFF_INLINE;
462 }
463
464 if( P("w") ){
465 diffFlags |= DIFF_IGNORE_ALLWS;
466 }
467 /* "dc" query parameter determines lines of context */
468 x = atoi(PD("dc","7"));
469 if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470 diffFlags += x;
@@ -678,11 +678,11 @@
678 verboseFlag = !verboseFlag;
679 zPage = "ci";
680 zPageHide = "vinfo";
681 }
682 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
683 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
684 if( verboseFlag ){
685 @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
686 @ Hide&nbsp;Diffs</a>
687 if( sideBySide ){
688 @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
@@ -988,11 +988,11 @@
988 zTo = P("to");
989 if(zGlob && !*zGlob){
990 zGlob = NULL;
991 }
992 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
993 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
994 if( sideBySide || verboseFlag ){
995 style_submenu_element("Hide Diff", "hidediff",
996 "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
997 zFrom, zTo,
998 zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
@@ -1382,13 +1382,12 @@
1382 zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
1383 zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
1384 diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
1385
1386 style_header("Diff");
1387 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
1388 if( *zW ){
 
1389 style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes",
1390 "%s/fdiff?v1=%T&v2=%T&sbs=%d",
1391 g.zTop, P("v1"), P("v2"), sideBySide);
1392 }else{
1393 style_submenu_element("Ignore Whitespace", "Ignore Whitespace",
1394
--- www/changes.wiki
+++ www/changes.wiki
@@ -11,14 +11,13 @@
1111
filter links.
1212
* The [/help/info | info command] now shows leaf status of the checkout.
1313
* Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
1414
* Add option --empty to the "[/help?cmd=open | fossil open]" command.
1515
* Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter.
16
- * Add --ignore-space-at-sol and --ignore-space-at-eol options to
16
+ * Add -w|--ignore-all-space and -Z|--ignore-trailing-space options to
1717
[/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame],
1818
[/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff].
19
- The option -w activates both of them.
2019
* Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff
2120
and /vdiff UI pages.
2221
2322
<h2>Changes For Version 1.28 (2014-01-27)</h2>
2423
* Enhance [/help?cmd=/reports | /reports] to support event type filtering.
2524
--- www/changes.wiki
+++ www/changes.wiki
@@ -11,14 +11,13 @@
11 filter links.
12 * The [/help/info | info command] now shows leaf status of the checkout.
13 * Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
14 * Add option --empty to the "[/help?cmd=open | fossil open]" command.
15 * Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter.
16 * Add --ignore-space-at-sol and --ignore-space-at-eol options to
17 [/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame],
18 [/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff].
19 The option -w activates both of them.
20 * Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff
21 and /vdiff UI pages.
22
23 <h2>Changes For Version 1.28 (2014-01-27)</h2>
24 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
25
--- www/changes.wiki
+++ www/changes.wiki
@@ -11,14 +11,13 @@
11 filter links.
12 * The [/help/info | info command] now shows leaf status of the checkout.
13 * Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
14 * Add option --empty to the "[/help?cmd=open | fossil open]" command.
15 * Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter.
16 * Add -w|--ignore-all-space and -Z|--ignore-trailing-space options to
17 [/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame],
18 [/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff].
 
19 * Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff
20 and /vdiff UI pages.
21
22 <h2>Changes For Version 1.28 (2014-01-27)</h2>
23 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
24

Keyboard Shortcuts

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