Fossil SCM

In the 'all' command, use strcmp instead of strncmp to compare the subcommand name to avoid the problem described in [forum:8ec0c228c1ce8da5|forum post 8ec0c228c1ce8da5], where (e.g.) the subcommand 's' evaluates to 'server' and 'p' to 'push' despite both of those being ambiguous subcommand name prefixes.

stephan 2022-06-23 13:08 trunk
Commit e098d810dcaded1e40a81ddd93126b538faf2c0dc9e8dce1b2e5550c1d3f9cd0
1 file changed +26 -28
+26 -28
--- src/allrepo.c
+++ src/allrepo.c
@@ -153,11 +153,10 @@
153153
** --dry-run If given, display instead of run actions.
154154
** --showfile Show the repository or checkout being operated upon.
155155
** --stop-on-error Halt immediately if any subprocess fails.
156156
*/
157157
void all_cmd(void){
158
- int n;
159158
Stmt q;
160159
const char *zCmd;
161160
char *zSyscmd;
162161
Blob extra;
163162
int useCheckouts = 0;
@@ -176,35 +175,35 @@
176175
}
177176
178177
if( g.argc<3 ){
179178
usage("SUBCOMMAND ...");
180179
}
181
- n = strlen(g.argv[2]);
182180
db_open_config(1, 0);
183181
blob_zero(&extra);
184182
zCmd = g.argv[2];
185183
if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin);
186
- if( strncmp(zCmd, "ui", n)==0 || strncmp(zCmd, "server", n)==0 ){
184
+ if( fossil_strcmp(zCmd, "ui")==0
185
+ || fossil_strcmp(zCmd, "server")==0 ){
187186
g.argv[1] = g.argv[2];
188187
g.argv[2] = "/";
189188
cmd_webserver();
190189
return;
191190
}
192
- if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
191
+ if( fossil_strcmp(zCmd, "list")==0 || fossil_strcmp(zCmd,"ls")==0 ){
193192
zCmd = "list";
194193
useCheckouts = find_option("ckout","c",0)!=0;
195
- }else if( strncmp(zCmd, "backup", n)==0 ){
194
+ }else if( fossil_strcmp(zCmd, "backup")==0 ){
196195
char *zDest;
197196
zCmd = "backup -R";
198197
collect_argument(&extra, "overwrite",0);
199198
if( g.argc!=4 ) usage("backup DIRECTORY");
200199
zDest = g.argv[3];
201200
if( file_isdir(zDest, ExtFILE)!=1 ){
202201
fossil_fatal("argument to \"fossil all backup\" must be a directory");
203202
}
204203
blob_appendf(&extra, " %$", zDest);
205
- }else if( strncmp(zCmd, "clean", n)==0 ){
204
+ }else if( fossil_strcmp(zCmd, "clean")==0 ){
206205
zCmd = "clean --chdir";
207206
collect_argument(&extra, "allckouts",0);
208207
collect_argument_value(&extra, "case-sensitive");
209208
collect_argument_value(&extra, "clean");
210209
collect_argument(&extra, "dirsonly",0);
@@ -217,27 +216,27 @@
217216
collect_argument(&extra, "no-prompt",0);
218217
collect_argument(&extra, "temp",0);
219218
collect_argument(&extra, "verbose","v");
220219
collect_argument(&extra, "whatif",0);
221220
useCheckouts = 1;
222
- }else if( strncmp(zCmd, "config", n)==0 ){
221
+ }else if( fossil_strcmp(zCmd, "config")==0 ){
223222
zCmd = "config -R";
224223
collect_argv(&extra, 3);
225224
(void)find_option("legacy",0,0);
226225
(void)find_option("overwrite",0,0);
227226
verify_all_options();
228227
if( g.argc!=5 || fossil_strcmp(g.argv[3],"pull")!=0 ){
229228
usage("configure pull AREA ?OPTIONS?");
230229
}
231
- }else if( strncmp(zCmd, "dbstat", n)==0 ){
230
+ }else if( fossil_strcmp(zCmd, "dbstat")==0 ){
232231
zCmd = "dbstat --omit-version-info -R";
233232
showLabel = 1;
234233
quiet = 1;
235234
collect_argument(&extra, "brief", "b");
236235
collect_argument(&extra, "db-check", 0);
237236
collect_argument(&extra, "db-verify", 0);
238
- }else if( strncmp(zCmd, "extras", n)==0 ){
237
+ }else if( fossil_strcmp(zCmd, "extras")==0 ){
239238
if( showFile ){
240239
zCmd = "extras --chdir";
241240
}else{
242241
zCmd = "extras --header --chdir";
243242
}
@@ -247,32 +246,31 @@
247246
collect_argument_value(&extra, "ignore");
248247
collect_argument(&extra, "rel-paths",0);
249248
useCheckouts = 1;
250249
stopOnError = 0;
251250
quiet = 1;
252
- }else if( strncmp(zCmd, "git", n)==0 ){
251
+ }else if( fossil_strcmp(zCmd, "git")==0 ){
253252
if( g.argc<4 ){
254253
usage("git (export|status)");
255254
}else{
256
- int n3 = (int)strlen(g.argv[3]);
257
- if( strncmp(g.argv[3], "export", n3)==0 ){
255
+ if( fossil_strcmp(g.argv[3], "export")==0 ){
258256
zCmd = "git export --if-mirrored -R";
259
- }else if( strncmp(g.argv[3], "status", n3)==0 ){
257
+ }else if( fossil_strcmp(g.argv[3], "status")==0 ){
260258
zCmd = "git status --by-all -q -R";
261259
quiet = 1;
262260
}else{
263261
usage("git (export|status)");
264262
}
265263
}
266
- }else if( strncmp(zCmd, "push", n)==0 ){
264
+ }else if( fossil_strcmp(zCmd, "push")==0 ){
267265
zCmd = "push -autourl -R";
268266
collect_argument(&extra, "verbose","v");
269
- }else if( strncmp(zCmd, "pull", n)==0 ){
267
+ }else if( fossil_strcmp(zCmd, "pull")==0 ){
270268
zCmd = "pull -autourl -R";
271269
collect_argument(&extra, "verbose","v");
272270
collect_argument(&extra, "share-links",0);
273
- }else if( strncmp(zCmd, "rebuild", n)==0 ){
271
+ }else if( fossil_strcmp(zCmd, "rebuild")==0 ){
274272
zCmd = "rebuild";
275273
collect_argument(&extra, "cluster",0);
276274
collect_argument(&extra, "compress",0);
277275
collect_argument(&extra, "compress-only",0);
278276
collect_argument(&extra, "noverify",0);
@@ -283,40 +281,40 @@
283281
collect_argument(&extra, "wal",0);
284282
collect_argument(&extra, "stats",0);
285283
collect_argument(&extra, "index",0);
286284
collect_argument(&extra, "noindex",0);
287285
collect_argument(&extra, "ifneeded", 0);
288
- }else if( strncmp(zCmd, "setting", n)==0 ){
286
+ }else if( fossil_strcmp(zCmd, "setting")==0 ){
289287
zCmd = "setting -R";
290288
collect_argv(&extra, 3);
291
- }else if( strncmp(zCmd, "unset", n)==0 ){
289
+ }else if( fossil_strcmp(zCmd, "unset")==0 ){
292290
zCmd = "unset -R";
293291
collect_argv(&extra, 3);
294
- }else if( strncmp(zCmd, "fts-config", n)==0 ){
292
+ }else if( fossil_strcmp(zCmd, "fts-config")==0 ){
295293
zCmd = "fts-config -R";
296294
collect_argv(&extra, 3);
297
- }else if( strncmp(zCmd, "sync", n)==0 ){
295
+ }else if( fossil_strcmp(zCmd, "sync")==0 ){
298296
zCmd = "sync -autourl -R";
299297
collect_argument(&extra, "share-links",0);
300298
collect_argument(&extra, "verbose","v");
301299
collect_argument(&extra, "unversioned","u");
302
- }else if( strncmp(zCmd, "test-integrity", n)==0 ){
300
+ }else if( fossil_strcmp(zCmd, "test-integrity")==0 ){
303301
collect_argument(&extra, "db-only", "d");
304302
collect_argument(&extra, "parse", 0);
305303
collect_argument(&extra, "quick", "q");
306304
zCmd = "test-integrity";
307
- }else if( strncmp(zCmd, "test-orphans", n)==0 ){
305
+ }else if( fossil_strcmp(zCmd, "test-orphans")==0 ){
308306
zCmd = "test-orphans -R";
309
- }else if( strncmp(zCmd, "test-missing", n)==0 ){
307
+ }else if( fossil_strcmp(zCmd, "test-missing")==0 ){
310308
zCmd = "test-missing -q -R";
311309
collect_argument(&extra, "notshunned",0);
312
- }else if( strncmp(zCmd, "changes", n)==0 ){
310
+ }else if( fossil_strcmp(zCmd, "changes")==0 ){
313311
zCmd = "changes --quiet --header --chdir";
314312
useCheckouts = 1;
315313
stopOnError = 0;
316314
quiet = 1;
317
- }else if( strncmp(zCmd, "ignore", n)==0 ){
315
+ }else if( fossil_strcmp(zCmd, "ignore")==0 ){
318316
int j;
319317
Blob fn = BLOB_INITIALIZER;
320318
Blob sql = BLOB_INITIALIZER;
321319
useCheckouts = find_option("ckout","c",0)!=0;
322320
verify_all_options();
@@ -338,11 +336,11 @@
338336
db_end_transaction(0);
339337
blob_reset(&sql);
340338
blob_reset(&fn);
341339
blob_reset(&extra);
342340
return;
343
- }else if( strncmp(zCmd, "add", n)==0 ){
341
+ }else if( fossil_strcmp(zCmd, "add")==0 ){
344342
int j;
345343
Blob fn = BLOB_INITIALIZER;
346344
Blob sql = BLOB_INITIALIZER;
347345
verify_all_options();
348346
db_begin_transaction();
@@ -375,15 +373,15 @@
375373
db_end_transaction(0);
376374
blob_reset(&sql);
377375
blob_reset(&fn);
378376
blob_reset(&extra);
379377
return;
380
- }else if( strncmp(zCmd, "info", n)==0 ){
378
+ }else if( fossil_strcmp(zCmd, "info")==0 ){
381379
zCmd = "info";
382380
showLabel = 1;
383381
quiet = 1;
384
- }else if( strncmp(zCmd, "cache", n)==0 ){
382
+ }else if( fossil_strcmp(zCmd, "cache")==0 ){
385383
zCmd = "cache -R";
386384
showLabel = 1;
387385
collect_argv(&extra, 3);
388386
}else{
389387
fossil_fatal("\"all\" subcommand should be one of: "
390388
--- src/allrepo.c
+++ src/allrepo.c
@@ -153,11 +153,10 @@
153 ** --dry-run If given, display instead of run actions.
154 ** --showfile Show the repository or checkout being operated upon.
155 ** --stop-on-error Halt immediately if any subprocess fails.
156 */
157 void all_cmd(void){
158 int n;
159 Stmt q;
160 const char *zCmd;
161 char *zSyscmd;
162 Blob extra;
163 int useCheckouts = 0;
@@ -176,35 +175,35 @@
176 }
177
178 if( g.argc<3 ){
179 usage("SUBCOMMAND ...");
180 }
181 n = strlen(g.argv[2]);
182 db_open_config(1, 0);
183 blob_zero(&extra);
184 zCmd = g.argv[2];
185 if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin);
186 if( strncmp(zCmd, "ui", n)==0 || strncmp(zCmd, "server", n)==0 ){
 
187 g.argv[1] = g.argv[2];
188 g.argv[2] = "/";
189 cmd_webserver();
190 return;
191 }
192 if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
193 zCmd = "list";
194 useCheckouts = find_option("ckout","c",0)!=0;
195 }else if( strncmp(zCmd, "backup", n)==0 ){
196 char *zDest;
197 zCmd = "backup -R";
198 collect_argument(&extra, "overwrite",0);
199 if( g.argc!=4 ) usage("backup DIRECTORY");
200 zDest = g.argv[3];
201 if( file_isdir(zDest, ExtFILE)!=1 ){
202 fossil_fatal("argument to \"fossil all backup\" must be a directory");
203 }
204 blob_appendf(&extra, " %$", zDest);
205 }else if( strncmp(zCmd, "clean", n)==0 ){
206 zCmd = "clean --chdir";
207 collect_argument(&extra, "allckouts",0);
208 collect_argument_value(&extra, "case-sensitive");
209 collect_argument_value(&extra, "clean");
210 collect_argument(&extra, "dirsonly",0);
@@ -217,27 +216,27 @@
217 collect_argument(&extra, "no-prompt",0);
218 collect_argument(&extra, "temp",0);
219 collect_argument(&extra, "verbose","v");
220 collect_argument(&extra, "whatif",0);
221 useCheckouts = 1;
222 }else if( strncmp(zCmd, "config", n)==0 ){
223 zCmd = "config -R";
224 collect_argv(&extra, 3);
225 (void)find_option("legacy",0,0);
226 (void)find_option("overwrite",0,0);
227 verify_all_options();
228 if( g.argc!=5 || fossil_strcmp(g.argv[3],"pull")!=0 ){
229 usage("configure pull AREA ?OPTIONS?");
230 }
231 }else if( strncmp(zCmd, "dbstat", n)==0 ){
232 zCmd = "dbstat --omit-version-info -R";
233 showLabel = 1;
234 quiet = 1;
235 collect_argument(&extra, "brief", "b");
236 collect_argument(&extra, "db-check", 0);
237 collect_argument(&extra, "db-verify", 0);
238 }else if( strncmp(zCmd, "extras", n)==0 ){
239 if( showFile ){
240 zCmd = "extras --chdir";
241 }else{
242 zCmd = "extras --header --chdir";
243 }
@@ -247,32 +246,31 @@
247 collect_argument_value(&extra, "ignore");
248 collect_argument(&extra, "rel-paths",0);
249 useCheckouts = 1;
250 stopOnError = 0;
251 quiet = 1;
252 }else if( strncmp(zCmd, "git", n)==0 ){
253 if( g.argc<4 ){
254 usage("git (export|status)");
255 }else{
256 int n3 = (int)strlen(g.argv[3]);
257 if( strncmp(g.argv[3], "export", n3)==0 ){
258 zCmd = "git export --if-mirrored -R";
259 }else if( strncmp(g.argv[3], "status", n3)==0 ){
260 zCmd = "git status --by-all -q -R";
261 quiet = 1;
262 }else{
263 usage("git (export|status)");
264 }
265 }
266 }else if( strncmp(zCmd, "push", n)==0 ){
267 zCmd = "push -autourl -R";
268 collect_argument(&extra, "verbose","v");
269 }else if( strncmp(zCmd, "pull", n)==0 ){
270 zCmd = "pull -autourl -R";
271 collect_argument(&extra, "verbose","v");
272 collect_argument(&extra, "share-links",0);
273 }else if( strncmp(zCmd, "rebuild", n)==0 ){
274 zCmd = "rebuild";
275 collect_argument(&extra, "cluster",0);
276 collect_argument(&extra, "compress",0);
277 collect_argument(&extra, "compress-only",0);
278 collect_argument(&extra, "noverify",0);
@@ -283,40 +281,40 @@
283 collect_argument(&extra, "wal",0);
284 collect_argument(&extra, "stats",0);
285 collect_argument(&extra, "index",0);
286 collect_argument(&extra, "noindex",0);
287 collect_argument(&extra, "ifneeded", 0);
288 }else if( strncmp(zCmd, "setting", n)==0 ){
289 zCmd = "setting -R";
290 collect_argv(&extra, 3);
291 }else if( strncmp(zCmd, "unset", n)==0 ){
292 zCmd = "unset -R";
293 collect_argv(&extra, 3);
294 }else if( strncmp(zCmd, "fts-config", n)==0 ){
295 zCmd = "fts-config -R";
296 collect_argv(&extra, 3);
297 }else if( strncmp(zCmd, "sync", n)==0 ){
298 zCmd = "sync -autourl -R";
299 collect_argument(&extra, "share-links",0);
300 collect_argument(&extra, "verbose","v");
301 collect_argument(&extra, "unversioned","u");
302 }else if( strncmp(zCmd, "test-integrity", n)==0 ){
303 collect_argument(&extra, "db-only", "d");
304 collect_argument(&extra, "parse", 0);
305 collect_argument(&extra, "quick", "q");
306 zCmd = "test-integrity";
307 }else if( strncmp(zCmd, "test-orphans", n)==0 ){
308 zCmd = "test-orphans -R";
309 }else if( strncmp(zCmd, "test-missing", n)==0 ){
310 zCmd = "test-missing -q -R";
311 collect_argument(&extra, "notshunned",0);
312 }else if( strncmp(zCmd, "changes", n)==0 ){
313 zCmd = "changes --quiet --header --chdir";
314 useCheckouts = 1;
315 stopOnError = 0;
316 quiet = 1;
317 }else if( strncmp(zCmd, "ignore", n)==0 ){
318 int j;
319 Blob fn = BLOB_INITIALIZER;
320 Blob sql = BLOB_INITIALIZER;
321 useCheckouts = find_option("ckout","c",0)!=0;
322 verify_all_options();
@@ -338,11 +336,11 @@
338 db_end_transaction(0);
339 blob_reset(&sql);
340 blob_reset(&fn);
341 blob_reset(&extra);
342 return;
343 }else if( strncmp(zCmd, "add", n)==0 ){
344 int j;
345 Blob fn = BLOB_INITIALIZER;
346 Blob sql = BLOB_INITIALIZER;
347 verify_all_options();
348 db_begin_transaction();
@@ -375,15 +373,15 @@
375 db_end_transaction(0);
376 blob_reset(&sql);
377 blob_reset(&fn);
378 blob_reset(&extra);
379 return;
380 }else if( strncmp(zCmd, "info", n)==0 ){
381 zCmd = "info";
382 showLabel = 1;
383 quiet = 1;
384 }else if( strncmp(zCmd, "cache", n)==0 ){
385 zCmd = "cache -R";
386 showLabel = 1;
387 collect_argv(&extra, 3);
388 }else{
389 fossil_fatal("\"all\" subcommand should be one of: "
390
--- src/allrepo.c
+++ src/allrepo.c
@@ -153,11 +153,10 @@
153 ** --dry-run If given, display instead of run actions.
154 ** --showfile Show the repository or checkout being operated upon.
155 ** --stop-on-error Halt immediately if any subprocess fails.
156 */
157 void all_cmd(void){
 
158 Stmt q;
159 const char *zCmd;
160 char *zSyscmd;
161 Blob extra;
162 int useCheckouts = 0;
@@ -176,35 +175,35 @@
175 }
176
177 if( g.argc<3 ){
178 usage("SUBCOMMAND ...");
179 }
 
180 db_open_config(1, 0);
181 blob_zero(&extra);
182 zCmd = g.argv[2];
183 if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin);
184 if( fossil_strcmp(zCmd, "ui")==0
185 || fossil_strcmp(zCmd, "server")==0 ){
186 g.argv[1] = g.argv[2];
187 g.argv[2] = "/";
188 cmd_webserver();
189 return;
190 }
191 if( fossil_strcmp(zCmd, "list")==0 || fossil_strcmp(zCmd,"ls")==0 ){
192 zCmd = "list";
193 useCheckouts = find_option("ckout","c",0)!=0;
194 }else if( fossil_strcmp(zCmd, "backup")==0 ){
195 char *zDest;
196 zCmd = "backup -R";
197 collect_argument(&extra, "overwrite",0);
198 if( g.argc!=4 ) usage("backup DIRECTORY");
199 zDest = g.argv[3];
200 if( file_isdir(zDest, ExtFILE)!=1 ){
201 fossil_fatal("argument to \"fossil all backup\" must be a directory");
202 }
203 blob_appendf(&extra, " %$", zDest);
204 }else if( fossil_strcmp(zCmd, "clean")==0 ){
205 zCmd = "clean --chdir";
206 collect_argument(&extra, "allckouts",0);
207 collect_argument_value(&extra, "case-sensitive");
208 collect_argument_value(&extra, "clean");
209 collect_argument(&extra, "dirsonly",0);
@@ -217,27 +216,27 @@
216 collect_argument(&extra, "no-prompt",0);
217 collect_argument(&extra, "temp",0);
218 collect_argument(&extra, "verbose","v");
219 collect_argument(&extra, "whatif",0);
220 useCheckouts = 1;
221 }else if( fossil_strcmp(zCmd, "config")==0 ){
222 zCmd = "config -R";
223 collect_argv(&extra, 3);
224 (void)find_option("legacy",0,0);
225 (void)find_option("overwrite",0,0);
226 verify_all_options();
227 if( g.argc!=5 || fossil_strcmp(g.argv[3],"pull")!=0 ){
228 usage("configure pull AREA ?OPTIONS?");
229 }
230 }else if( fossil_strcmp(zCmd, "dbstat")==0 ){
231 zCmd = "dbstat --omit-version-info -R";
232 showLabel = 1;
233 quiet = 1;
234 collect_argument(&extra, "brief", "b");
235 collect_argument(&extra, "db-check", 0);
236 collect_argument(&extra, "db-verify", 0);
237 }else if( fossil_strcmp(zCmd, "extras")==0 ){
238 if( showFile ){
239 zCmd = "extras --chdir";
240 }else{
241 zCmd = "extras --header --chdir";
242 }
@@ -247,32 +246,31 @@
246 collect_argument_value(&extra, "ignore");
247 collect_argument(&extra, "rel-paths",0);
248 useCheckouts = 1;
249 stopOnError = 0;
250 quiet = 1;
251 }else if( fossil_strcmp(zCmd, "git")==0 ){
252 if( g.argc<4 ){
253 usage("git (export|status)");
254 }else{
255 if( fossil_strcmp(g.argv[3], "export")==0 ){
 
256 zCmd = "git export --if-mirrored -R";
257 }else if( fossil_strcmp(g.argv[3], "status")==0 ){
258 zCmd = "git status --by-all -q -R";
259 quiet = 1;
260 }else{
261 usage("git (export|status)");
262 }
263 }
264 }else if( fossil_strcmp(zCmd, "push")==0 ){
265 zCmd = "push -autourl -R";
266 collect_argument(&extra, "verbose","v");
267 }else if( fossil_strcmp(zCmd, "pull")==0 ){
268 zCmd = "pull -autourl -R";
269 collect_argument(&extra, "verbose","v");
270 collect_argument(&extra, "share-links",0);
271 }else if( fossil_strcmp(zCmd, "rebuild")==0 ){
272 zCmd = "rebuild";
273 collect_argument(&extra, "cluster",0);
274 collect_argument(&extra, "compress",0);
275 collect_argument(&extra, "compress-only",0);
276 collect_argument(&extra, "noverify",0);
@@ -283,40 +281,40 @@
281 collect_argument(&extra, "wal",0);
282 collect_argument(&extra, "stats",0);
283 collect_argument(&extra, "index",0);
284 collect_argument(&extra, "noindex",0);
285 collect_argument(&extra, "ifneeded", 0);
286 }else if( fossil_strcmp(zCmd, "setting")==0 ){
287 zCmd = "setting -R";
288 collect_argv(&extra, 3);
289 }else if( fossil_strcmp(zCmd, "unset")==0 ){
290 zCmd = "unset -R";
291 collect_argv(&extra, 3);
292 }else if( fossil_strcmp(zCmd, "fts-config")==0 ){
293 zCmd = "fts-config -R";
294 collect_argv(&extra, 3);
295 }else if( fossil_strcmp(zCmd, "sync")==0 ){
296 zCmd = "sync -autourl -R";
297 collect_argument(&extra, "share-links",0);
298 collect_argument(&extra, "verbose","v");
299 collect_argument(&extra, "unversioned","u");
300 }else if( fossil_strcmp(zCmd, "test-integrity")==0 ){
301 collect_argument(&extra, "db-only", "d");
302 collect_argument(&extra, "parse", 0);
303 collect_argument(&extra, "quick", "q");
304 zCmd = "test-integrity";
305 }else if( fossil_strcmp(zCmd, "test-orphans")==0 ){
306 zCmd = "test-orphans -R";
307 }else if( fossil_strcmp(zCmd, "test-missing")==0 ){
308 zCmd = "test-missing -q -R";
309 collect_argument(&extra, "notshunned",0);
310 }else if( fossil_strcmp(zCmd, "changes")==0 ){
311 zCmd = "changes --quiet --header --chdir";
312 useCheckouts = 1;
313 stopOnError = 0;
314 quiet = 1;
315 }else if( fossil_strcmp(zCmd, "ignore")==0 ){
316 int j;
317 Blob fn = BLOB_INITIALIZER;
318 Blob sql = BLOB_INITIALIZER;
319 useCheckouts = find_option("ckout","c",0)!=0;
320 verify_all_options();
@@ -338,11 +336,11 @@
336 db_end_transaction(0);
337 blob_reset(&sql);
338 blob_reset(&fn);
339 blob_reset(&extra);
340 return;
341 }else if( fossil_strcmp(zCmd, "add")==0 ){
342 int j;
343 Blob fn = BLOB_INITIALIZER;
344 Blob sql = BLOB_INITIALIZER;
345 verify_all_options();
346 db_begin_transaction();
@@ -375,15 +373,15 @@
373 db_end_transaction(0);
374 blob_reset(&sql);
375 blob_reset(&fn);
376 blob_reset(&extra);
377 return;
378 }else if( fossil_strcmp(zCmd, "info")==0 ){
379 zCmd = "info";
380 showLabel = 1;
381 quiet = 1;
382 }else if( fossil_strcmp(zCmd, "cache")==0 ){
383 zCmd = "cache -R";
384 showLabel = 1;
385 collect_argv(&extra, 3);
386 }else{
387 fossil_fatal("\"all\" subcommand should be one of: "
388

Keyboard Shortcuts

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