BTS

Message2163

Author ft
Recipients mika
Date 2009-04-07.13:32:35
Content
Michael Prokop <bts@bts.grml.org>:
> * Frank Terbeck <bts@bts.grml.org> [20090407 13:56]:
[...]
> >   b) I don't see how -z is any clearer than -n in shell tests.
> 
> It's not the -z/-n itself but the else:
> 
> if foo ; then
>    $short_part
> else
>    $long_part
> fi
> 
> instead of:
> 
> if foo ; then
>    $long_part
> else
>    $short_part
> fi

Well, is this worth putting into a policy, that's rather a requirement
for code to be accepted? I think stuff like this turns out correctly
most of the time.

Furthermore, I'd prefer to contradict the above if that makes the code
more logical and the test easier to read. (A simple example would be,
when one test is trivial and another is hard to get right, but only
the hard one creates the desired version).

What I did for now is to put a "when-in-rome-do-it-as-the-romans-do"
comment (1f92c80958cd90d9a0f419ea97828fff4d850ad8).

> >   c) We don't use mercurial anymore. Examples need to be about git.
> 
> ACK :)

[x] done in: 9820b9337b8814283f7ef8cfab85c0201daa1c3f

So, what's left is the "incomplete" part.
That'll probably stay that way for a while. We should probably discuss
what we want in there, possibly on the grml-devel mailing list.

My work-in-progress (which contains the commit hashes used herein) is
in ft/policy-wip, at:
http://git.grml.org/?p=grml-policy.git;a=shortlog;h=refs/heads/ft/policy-wip

Regards, Frank
History
Date User Action Args
2009-04-07 13:32:37ftsetrecipients: + mika
2009-04-07 13:32:37ftlinkissue660 messages
2009-04-07 13:32:35ftcreate