Stefan Beller wrote:

> [Subject: diff-no-index: Remove unused variable.]
> --- a/diff-no-index.c
> +++ b/diff-no-index.c
> -             else if (!strcmp(argv[i], "-q")) {
> +             else if (!strcmp(argv[i], "-q"))
> -                     options |= DIFF_SILENT_ON_REMOVED;
>                       i++;
> -             }

This feature was obviously never tested with --no-index, so I agree it
makes sense to remove it.  Probably the commit message and a comment
should say so, though.  E.g.:

        diff --no-index: remove nonfunctional "-q" handling

        Before v1.5.6-rc1~41^2~2, the option parsing for diff --no-index
        and "git diff-files" shared code.  In "git diff-files", "-q" means
        to be silent about removed files.  In "git diff --no-index", in
        various versions it has been an error, an infinite loop, or a no-op.

        Simplify the code to clarify that it is now a no-op, continuing to
        accept and ignore the -q option in "git diff --no-index" to avoid
        breaking scripts.

I wouldn't mind removing support for "-q" altogether, by the way (as a
separate change).

Hope that helps,
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to