Junio C Hamano <[email protected]> writes:
> Ævar Arnfjörð Bjarmason <[email protected]> writes:
>
>> This is the first use of the %N$<fmt> style of printf format in
>> the *.[ch] files in our codebase. It's supported by POSIX[2] and
>> there's existing uses for it in po/*.po files,...
>
> For now, I'll eject this from 'pu', as I had spent way too much time
> trying to make it and other topics work there.
>
> CC remote.o
> remote.c: In function 'show_push_unqualified_ref_name_error':
> remote.c:1035:2: error: $ operand number used after format without operand
> number [-Werror=format=]
> error(_("The destination you provided is not a full refname (i.e.,\n"
> ^~~~~
> cc1: all warnings being treated as errors
> Makefile:2323: recipe for target 'remote.o' failed
> make: *** [remote.o] Error 1
I'll redo 'pu' with the following fix-up on top.
remote.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/remote.c b/remote.c
index c243e3d89e..1927c4b376 100644
--- a/remote.c
+++ b/remote.c
@@ -1035,8 +1035,8 @@ static void show_push_unqualified_ref_name_error(const
char *dst_value,
error(_("The destination you provided is not a full refname (i.e.,\n"
"starting with \"refs/\"). We tried to guess what you meant
by:\n"
"\n"
- "- Looking for a ref that matches '%s' on the remote side.\n"
- "- Checking if the <src> being pushed ('%s')\n"
+ "- Looking for a ref that matches '%1$s' on the remote side.\n"
+ "- Checking if the <src> being pushed ('%2$s')\n"
" is a ref in \"refs/{heads,tags}/\". If so we add a
corresponding\n"
" refs/{heads,tags}/ prefix on the remote side.\n"
"- Checking if the <src> being pushed ('%2$s')\n"
--
2.19.1-593-gc670b1f876