Re: [PATCH 03/40] whitespace: remediate t1006-cat-file.sh
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 6, 2011, 17:56 UTC
- Message-ID
- <7vmxfm1l1r.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20110806092856.GB7645@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> Yes, this indent with spaces violates our coding style policy. However,
> the 4-space indentation does, too (and the space between function name
> and parentheses). The "right" way is according to our policy is:
>
> maybe_remove_timestamp() {
> if test -z "$2"; then
> echo_without_newline "$1"Hmm, I have always thought that our shell scripts preferred the above to be spelled this way instead:
maybe_remove_timestamp () {
if test -z "$2"
then
echo_without_newline "$1"> So I have to wonder if this automated indentation is really worthwhile.
That I agree with.
> I dunno. I'm not against a one-time cleanup,...
I actually am slightly against it. One-time whole-tree clean-up can never happen without downside as _some_ parts of the tree always have patches to conflict with it in flight. One-time decision to clearly spell out the rules and cleaning the tree over time, fixing parts that are not actively touched one at a time, is probably feasible, though.