Den mån 27 nov. 2023 kl 20:29 skrev Daniel Sahlberg <
daniel.l.sahlb...@gmail.com>:
[...]

> I looked into apr/misc/unix/getopt.c to see if there was any way of making
> "-" a legal argument but I couldn't find anything. Thus I'm suggesting
> making the help text a little bit more clear:
>
> [[[
> Index: subversion/svnmucc/svnmucc.c
> ===================================================================
> --- subversion/svnmucc/svnmucc.c        (revision 1914148)
> +++ subversion/svnmucc/svnmucc.c        (working copy)
> @@ -286,7 +286,9 @@
>        "  mv SRC-URL DST-URL     : move SRC-URL to DST-URL\n"
>        "  rm URL                 : delete URL\n"
>        "  put SRC-FILE URL       : add or modify file URL with contents
> copied from\n"
> -      "                           SRC-FILE (use \"-\" to read from
> standard input)\n"
> +      "                           SRC-FILE (use \"-\" to read from
> standard input,\n"
> +      "                           but only if preceeded by -- and in
> which case no\n"
> +      "                           options can follow. \"-\" only makes
> sense once)\n"
>        "  propset NAME VALUE URL : set property NAME on URL to VALUE\n"
>        "  propsetf NAME FILE URL : set property NAME on URL to value read
> from FILE\n"
>        "  propdel NAME URL       : delete property NAME from URL\n"
> ]]]
>
> The "\"-\" only makes sense once" is because stdin can't be rewinded and
> thus can't be put into more than once file. If several put actions (with -
> as SRC-FILE) are used, the second file will be empty.
>
> Does this make sense (in particular to our native english speakers)?
>

Nathan suggested a slightly simpler way of wording the help message in [1].
I've committed that exact help text in r1914222 and nominated for backport
in 1914223.

Kind regards,
Daniel

[1] https://lists.apache.org/thread/xrvwfdgqmjzqhv3q5sv1jhbcry8cdsly

Reply via email to