On Wed, 16 Jan 2013 18:28:24 +0100, Stephan Beal <[email protected]>
wrote:
On Wed, Jan 16, 2013 at 5:48 PM, j. van den hoff
<[email protected]>wrote:
is this a bug or a feature? I do hope the former since it's really bad
behaviour when driving `fossil' with a script.
It's an "as designed bug." The argument handling is based on the argument
count, and an empty argument is counted (the shell gives us an empty
string
in that case).
We could arguably tweak the base args parsing (which happens at a much
earlier stage) to ignore empty tokens, but i'm not sure that's a good
idea.
e.g. it would prohibit (commit -m '') and would cause very unwanted
side-effects with (commit -m '' foo.bar).
Alternately, we could improve the handling for this specific command, but
be aware that this is only one of many commands which are likely affected
by similar corner cases.
The relevant code is here:
http://fossil-scm.org/index.html/artifact/2560da3ea2ed20a85769cd44f1c83f672b2db2c0?ln=1587-1614
thanks for clarification. I understand that empty arguments can make sense
in some cases
(whether empty commits really do, we don't quite agree, obviously...) but
I nevertheless don't understand
what
fossil timeline ''
is actually meaning. the empty string is taken as what? the `when' (plus
`baseline|date'?) argument? why is it
showing timeline before *CURRENT* in this case?
and apart from that, as I said, the current behaviour is prone to confuse
other users, too, I'd say and it
is really somewhat ugly regarding handling it gracefully
from within a script (if a variable argument string is constructed and
migh - in cases - turn out to be
the empty string, cause with the given behaviour I would have to test for
this and handle differently).
so maybe this should still be decided on a per-command base (and an empty
value to an option is also
a different thing (or at least could be handled differently) then an empty
string as argument, right?).
j.
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users