diff mbox series

[25/25] diff.c: mention completion above add_diff_options

Message ID 93b6233f0dd89d36c0eec7a4768f8b7d22db755b.1686428485.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series completion: add missing diff options | expand

Commit Message

Philippe Blain June 10, 2023, 8:21 p.m. UTC
From: Philippe Blain <levraiphilippeblain@gmail.com>

Add a comment on top of add_diff_options, where common diff options are
listed, mentioning __git_diff_common_options in the completion script,
in the hope that contributors update it when they add new diff flags.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
 diff.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Eric Sunshine June 11, 2023, 2:36 a.m. UTC | #1
On Sat, Jun 10, 2023 at 4:24 PM Philippe Blain via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> Add a comment on top of add_diff_options, where common diff options are
> listed, mentioning __git_diff_common_options in the completion script,
> in the hope that contributors update it when they add new diff flags.
>
> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
> ---
> diff --git a/diff.c b/diff.c
> @@ -5491,6 +5491,9 @@ static int diff_opt_rotate_to(const struct option *opt, const char *arg, int uns
>         return 0;
>  }
>
> +/* Consider adding new flags to __git_diff_common_options
> + * in contrib/completion/git-completion.bash
> + */

Style:

    /*
     * This is a multi-line
     * comment.
     */
diff mbox series

Patch

diff --git a/diff.c b/diff.c
index 3c88c37908d..fda7bc91f85 100644
--- a/diff.c
+++ b/diff.c
@@ -5491,6 +5491,9 @@  static int diff_opt_rotate_to(const struct option *opt, const char *arg, int uns
 	return 0;
 }
 
+/* Consider adding new flags to __git_diff_common_options
+ * in contrib/completion/git-completion.bash
+ */
 struct option *add_diff_options(const struct option *opts,
 				struct diff_options *options)
 {