[PATCH 02/12] Fix event saving in git format due to wrong argument order

Linus Torvalds torvalds at linux-foundation.org
Sun Mar 9 20:40:09 PDT 2014

On Sun, Mar 9, 2014 at 7:59 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> wouldn't it be better to have consistent argument order?

Probably, yes. I ended up switching show_utf() around (only for the
git save case) for what are probably not very good reasons. I found it
easier to read for the cases I did first (iow, I thought it was more
natural with the

   "notes ", dive->notes, "\n"

order which matches the output order.

But all the other cases do the ordering as "data, prefix, suffix", so
now show_utf8() ended up being different (including different from the
XML case). I like the new order of show_utf8 better, but changing all
the other prefix/suffix users to that order would be a lot of churn.

And there was a reason I put the prefix/suffix at the end: it made
more sense when it was pairing the crazy XML syntax that I wanted to
have together. With the git syntax, you don't have the issues of
pairing up the single quotes and the "</>" crud.

So I dunno which way is better. I had reasons for both orderings.


More information about the subsurface mailing list