Subject: Re: [PATCH v1 3/3] revision: comment `--no-standard-notes` as deprecated

From: Junio C Hamano <[email-masked]>
Date: Mon, 12 Jun 2023 15:21:34 -0700

Kristoffer Haugsbakk <[email-masked]> writes:

> We still use `--standard-notes` but this option has no use and is no
> longer documented anywhere.
>
> Signed-off-by: Kristoffer Haugsbakk <[email-masked]>
> ---
>  revision.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/revision.c b/revision.c
> index a0ab7fb784..24219c741a 100644
> --- a/revision.c
> +++ b/revision.c
> @@ -2529,6 +2529,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
>  		enable_default_display_notes(&revs->notes_opt,
>  					     &revs->show_notes);
>  		revs->notes_opt.use_default_notes = -1;
> +		/* Deprecated */
>  	} else if (!strcmp(arg, "--no-standard-notes")) {
>  		revs->notes_opt.use_default_notes = 0;
>  	} else if (!strcmp(arg, "--oneline")) {

With the placement of this new comment, it is unclear which one
between "--standard-notes" and "--no-standard-notes" is getting
deprecated (actually, the comment is placed inside the block for the
former, so it may be more natural to interpret that the comment
marks the former as deprecated).

	} else if (!strcmp(arg, "--no-standard-notes")) {
+		/* Deprecated */
		revs->notes_opt.use_default_notes = 0;
	}

I am not commenting if it makes sense to declare that the option is
deprecated here---I'll leave it to others to argue for/against it.
The usual reasoning to add/maintain "--no-foo" is so that we can get
"cmd --foo --no-foo" to naturally work, but it does not apply here?