Web lists-archives.com

Re: [PATCH 2/6] doc: align 'diff --no-index' in text with synopsis




Andreas Heiduk <asheiduk@xxxxxxxxx> writes:

>  
> -'git diff' --no-index [--options] [--] [<path>...]::
> +'git diff' [--options] [--no-index] [--] <path> <path>::
>  
>  	This form is to compare the given two paths on the
>  	filesystem.  You can omit the `--no-index` option when

It definitely is a good change to show two (and only two) <path> on
the command line as non-optional arguments.

I however find the change to mark that -"-no-index" is optional is
inviting more confusion in the form presented in this patch.  It is
optional under specific conditions, and that is not conveyed with
these two path arguments named very genericly (as opposed to making
it clear that they are paths that are not managed by Git) on the
example command line.

I have a suspicion that it would be safer to have the description
say under what condition "--no-index" becomes optional (which our
text already does), without marking it as if it is always optional
like this patch does (i.e. do not lose [] around it from this line).
I dunno.