Fossil SCM
Prevent error-message for "fossil diff --tk" in combination with -v/--verbose/--interactive/--side-by-side (which are already implied by --tk)
Commit
c060947196baef2d37b8cc40718779a2a6a7ef31
Parent
cac91b6cd17ab74…
1 file changed
+8
-13
+8
-13
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -1010,25 +1010,20 @@ | ||
| 1010 | 1010 | char *zTempFile = 0; |
| 1011 | 1011 | char *zCmd; |
| 1012 | 1012 | blob_zero(&script); |
| 1013 | 1013 | blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v", |
| 1014 | 1014 | g.nameOfExe, zSubCmd); |
| 1015 | + find_option("html",0,0); | |
| 1016 | + find_option("side-by-side","y",0); | |
| 1017 | + find_option("internal","i",0); | |
| 1018 | + find_option("verbose","v",0); | |
| 1019 | + /* The undocumented --script FILENAME option causes the Tk script to | |
| 1020 | + ** be written into the FILENAME instead of being run. This is used | |
| 1021 | + ** for testing and debugging. */ | |
| 1022 | + zTempFile = find_option("script",0,1); | |
| 1015 | 1023 | for(i=firstArg; i<g.argc; i++){ |
| 1016 | 1024 | const char *z = g.argv[i]; |
| 1017 | - if( z[0]=='-' ){ | |
| 1018 | - if( strglob("*-html",z) ) continue; | |
| 1019 | - if( strglob("*-y",z) ) continue; | |
| 1020 | - if( strglob("*-i",z) ) continue; | |
| 1021 | - /* The undocumented --script FILENAME option causes the Tk script to | |
| 1022 | - ** be written into the FILENAME instead of being run. This is used | |
| 1023 | - ** for testing and debugging. */ | |
| 1024 | - if( strglob("*-script",z) && i<g.argc-1 ){ | |
| 1025 | - i++; | |
| 1026 | - zTempFile = g.argv[i]; | |
| 1027 | - continue; | |
| 1028 | - } | |
| 1029 | - } | |
| 1030 | 1025 | if( sqlite3_strglob("*}*",z) ){ |
| 1031 | 1026 | blob_appendf(&script, " {%/}", z); |
| 1032 | 1027 | }else{ |
| 1033 | 1028 | int j; |
| 1034 | 1029 | blob_append(&script, " ", 1); |
| 1035 | 1030 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1010,25 +1010,20 @@ | |
| 1010 | char *zTempFile = 0; |
| 1011 | char *zCmd; |
| 1012 | blob_zero(&script); |
| 1013 | blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v", |
| 1014 | g.nameOfExe, zSubCmd); |
| 1015 | for(i=firstArg; i<g.argc; i++){ |
| 1016 | const char *z = g.argv[i]; |
| 1017 | if( z[0]=='-' ){ |
| 1018 | if( strglob("*-html",z) ) continue; |
| 1019 | if( strglob("*-y",z) ) continue; |
| 1020 | if( strglob("*-i",z) ) continue; |
| 1021 | /* The undocumented --script FILENAME option causes the Tk script to |
| 1022 | ** be written into the FILENAME instead of being run. This is used |
| 1023 | ** for testing and debugging. */ |
| 1024 | if( strglob("*-script",z) && i<g.argc-1 ){ |
| 1025 | i++; |
| 1026 | zTempFile = g.argv[i]; |
| 1027 | continue; |
| 1028 | } |
| 1029 | } |
| 1030 | if( sqlite3_strglob("*}*",z) ){ |
| 1031 | blob_appendf(&script, " {%/}", z); |
| 1032 | }else{ |
| 1033 | int j; |
| 1034 | blob_append(&script, " ", 1); |
| 1035 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1010,25 +1010,20 @@ | |
| 1010 | char *zTempFile = 0; |
| 1011 | char *zCmd; |
| 1012 | blob_zero(&script); |
| 1013 | blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v", |
| 1014 | g.nameOfExe, zSubCmd); |
| 1015 | find_option("html",0,0); |
| 1016 | find_option("side-by-side","y",0); |
| 1017 | find_option("internal","i",0); |
| 1018 | find_option("verbose","v",0); |
| 1019 | /* The undocumented --script FILENAME option causes the Tk script to |
| 1020 | ** be written into the FILENAME instead of being run. This is used |
| 1021 | ** for testing and debugging. */ |
| 1022 | zTempFile = find_option("script",0,1); |
| 1023 | for(i=firstArg; i<g.argc; i++){ |
| 1024 | const char *z = g.argv[i]; |
| 1025 | if( sqlite3_strglob("*}*",z) ){ |
| 1026 | blob_appendf(&script, " {%/}", z); |
| 1027 | }else{ |
| 1028 | int j; |
| 1029 | blob_append(&script, " ", 1); |
| 1030 |