You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the --is-reflink mode (documented as a "stand-alone command") uses the main option parsing code, it behaves differently from what the docs suggest.
Steps to Reproduce
$ touch a
$ touch b
$ ls rmlint.sh rmlint.json
ls: cannot access 'rmlint.sh': No such file or directory
ls: cannot access 'rmlint.json': No such file or directory
$ rmlint --is-reflink a b -o summary:stdout
$ ls rmlint.sh rmlint.json
ls: cannot access 'rmlint.sh': No such file or directory
ls: cannot access 'rmlint.json': No such file or directory
$ rmlint --is-reflink a b
$ ls rmlint.sh rmlint.json
rmlint.json rmlint.sh
Actual Behavior
rmlint --is-reflink accepts the -o option, and creates useless output files unless -o is used.
Expected Behavior
I would expect rmlint --is-reflink to behave like a subcommand. It should accept only the options -v and -V as per the documentation, and should not call rm_cmd_set_outputs -> rm_cmd_set_default_outputs -> rm_fmt_add(session->formats, "sh", "rmlint.sh").
It could at least be special-cased like --dedupe is here:
Since the
--is-reflink
mode (documented as a "stand-alone command") uses the main option parsing code, it behaves differently from what the docs suggest.Steps to Reproduce
Actual Behavior
rmlint --is-reflink
accepts the-o
option, and creates useless output files unless-o
is used.Expected Behavior
I would expect
rmlint --is-reflink
to behave like a subcommand. It should accept only the options-v
and-V
as per the documentation, and should not callrm_cmd_set_outputs
->rm_cmd_set_default_outputs
->rm_fmt_add(session->formats, "sh", "rmlint.sh")
.It could at least be special-cased like
--dedupe
is here:rmlint/lib/cmdline.c
Lines 1604 to 1607 in 6abfba9
But this TODO is over three years old, maybe it's time for it to be resolved?
rmlint/lib/cmdline.c
Lines 1538 to 1549 in 6abfba9
Software Versions
rmlint 2.10.1
The text was updated successfully, but these errors were encountered: