]> git.ipfire.org Git - thirdparty/git.git/commitdiff
diff.c: mention completion above add_diff_options
authorPhilippe Blain <levraiphilippeblain@gmail.com>
Mon, 26 Jun 2023 16:24:48 +0000 (16:24 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Jun 2023 16:40:14 +0000 (09:40 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c

diff --git a/diff.c b/diff.c
index 3c88c37908d6b13665ff7cd88abd46141485c891..64c93c0f0e2f63e64a538637c0c95cba39414eed 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -5491,6 +5491,10 @@ 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)
 {