Hi,
The following commands, executed without any arguments, are mute:
f add
f rm
f delete
f forget
IMHO, they should show a help message instead.
Best Regards,
Johan
fossil diff --unified
Index: src/add.c
==================================================================
--- src/add.c
+++ src/add.c
@@ -290,10 +290,12 @@
const char *zIgnoreFlag; /* The --ignore option or ignore-glob setting */
Glob *pIgnore, *pClean; /* Ignore everything matching the glob patterns */
unsigned scanFlags = 0; /* Flags passed to vfile_scan() */
int forceFlag;
+ if( g.argc<3 ) usage("FILE1 ?FILE2? ...");
+
zCleanFlag = find_option("clean",0,1);
zIgnoreFlag = find_option("ignore",0,1);
forceFlag = find_option("force","f",0)!=0;
if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
@@ -453,10 +455,12 @@
int removeFiles;
int dryRunFlag;
int softFlag;
int hardFlag;
Stmt loop;
+
+ if( g.argc<3 ) usage("FILE1 ?FILE2? ...");
dryRunFlag = find_option("dry-run","n",0)!=0;
softFlag = find_option("soft",0,0)!=0;
hardFlag = find_option("hard",0,0)!=0;
Index: src/add.c
==================================================================
--- src/add.c
+++ src/add.c
@@ -290,10 +290,12 @@
const char *zIgnoreFlag; /* The --ignore option or ignore-glob setting */
Glob *pIgnore, *pClean; /* Ignore everything matching the glob patterns */
unsigned scanFlags = 0; /* Flags passed to vfile_scan() */
int forceFlag;
+ if( g.argc<3 ) usage("FILE1 ?FILE2? ...");
+
zCleanFlag = find_option("clean",0,1);
zIgnoreFlag = find_option("ignore",0,1);
forceFlag = find_option("force","f",0)!=0;
if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
@@ -453,10 +455,12 @@
int removeFiles;
int dryRunFlag;
int softFlag;
int hardFlag;
Stmt loop;
+
+ if( g.argc<3 ) usage("FILE1 ?FILE2? ...");
dryRunFlag = find_option("dry-run","n",0)!=0;
softFlag = find_option("soft",0,0)!=0;
hardFlag = find_option("hard",0,0)!=0;
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users