Re: [PATCH v2 1/1] maintenance: use systemd timers on Linux
From: Junio C Hamano <hidden>
Date: 2021-05-10 06:25:13
Eric Sunshine [off-list ref] writes:
quoted
I think others have strong opinion on not using "%1$s", and prefer simple "%s" and using "exec_path" twice instead.I brought it up only because I hadn't seen it in Git sources, and wasn't sure if we'd want to start using it. Aside from Ævar, who seemed reasonably in favor of it, nobody else chimed in, so it could go either way, I suppose.
If this were a piece of code that _everybody_ would use on _all_ the supported platforms, I would suggest declaring that this is a weather-balloon to see if some platforms have trouble using it. But unfortunately this is not such a piece of code. Dependence on systemd should strictly be opt-in. So my preference is - here, just do it in the dumb and simple way - somewhere else, find code that is compiled and run for everybody on all platforms that feeds two same arguments to printf format, and update it to use "%1$x" twice, mark it clearly as a weather balloon, and document it (see how what 512f41cf did is documented in Documentation/CodingGuidelines and mimick, but tone it down as we haven't declared it safe to use (yet). It is likely that we need rearrangement of argument order for po/ files anyway, but a misimplementation might not handle using the same placeholder twice, and that is why I'd like to be a bit extra careful.