A few weeks ago I was trying to read up on the new -x option to clean.
I had started by typing "fossil clean -x" then decided I wanted help, so
I wound up entering "fossil clean -x -help", with this result:

$ fossil clean -x -help
3-way-merge    co             http           scrub          user
artifact       configuration  leaves         search         whatis
cache          dbstat         md5sum         server         wiki
cgi            deconstruct    new            sha1sum        zip
checkout       descendants    reconstruct    tarball
ci             forget         redo           ticket
close          fts-config     rename         unset

My command was interpreted as "fossil help clean -x" which is the same
as "fossil help -x".

On the andygoth-help-option branch, I fixed the -help handler to be
careful not to pass along any -options when it can find one argument
that is not an option, like so:

$ ./fossil clean -x -help
Usage: ./fossil clean ?OPTIONS? ?PATH ...?
Delete all "extra" files in the source tree.  "Extra" files are
files that are not officially part of the checkout. This operation
cannot be undone. If one or more PATH arguments appear, then only
the files named, or files contained with directories named, will be
removed.

If it can't find any non-option arguments (i.e. arguments starting with
at least one "-" character), the prior implementation is used:

$ ./fossil -x -help
3-way-merge    co             http           scrub          user
artifact       configuration  leaves         search         whatis
cache          dbstat         md5sum         server         wiki
cgi            deconstruct    new            sha1sum        zip
checkout       descendants    reconstruct    tarball
ci             forget         redo           ticket
close          fts-config     rename         unset

Any questions or comments?  Please review.  I'll merge to trunk if no
one objects in the next few days.

-- 
Andy Goth | <andrew.m.goth/at/gmail/dot/com>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to