Henrik Ahlgren <pa...@seestieto.com> writes:

> Signed-off-by: Henrik Ahlgren <pa...@seestieto.com>
> ---
>  Documentation/RelNotes/2.11.0.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/RelNotes/2.11.0.txt 
> b/Documentation/RelNotes/2.11.0.txt
> index 3590620..1d3a07d 100644
> --- a/Documentation/RelNotes/2.11.0.txt
> +++ b/Documentation/RelNotes/2.11.0.txt
> @@ -5,7 +5,7 @@ Backward compatibility notes.
>  
>   * An empty string used as a pathspec element has always meant
>     'everything matches', but it is too easy to write a script that
> -   finds a path to remove in $path and run 'git rm "$paht"', which
> +   finds a path to remove in $path and run 'git rm "$path"', which
>     ends up removing everything.  This release starts warning about the
>     use of an empty string that is used for 'everything matches' and
>     asks users to use a more explicit '.' for that instead.

What you spotted is certainly a typo, but it is a deliberate one
that must not be fixed like this.  "..., but it is too easy to ..."
is illustrating a scenario in which an empty string is accidentally
given to "git rm" as a pathspec by mistake, and the example it uses
is for the user to prepare a path to be removed in variable $path,
and referring to it as its typoed $paht by mistake.  Fixing that typo
in this paragraph defeats the whole point of the example.

But the fact that you spotted the typo (which is good; we want the
deliberate typo in the example to be clearly visible) and thought
that the writer of the paragraph must have meant a non-typoed
version there (which is bad) indicates that the paragraph needs
improvement to save readers from making the same mis-reading as you
did.

If the original text were like the following, would it have been
clear enough that prevented you from sending your patch?

 * An empty string used as a pathspec element has always meant
   'everything matches', but it is too easy to write a script that
   finds a path to remove in $path and run 'git rm "$paht"' by 
   mistake (when the user meant to give "$path"), which ends up
   removing everything.  This release starts warning about the
   use of an empty string that is used for 'everything matches' and
   asks users to use a more explicit '.' for that instead.

Thanks.

Reply via email to