]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rev-list: update a NEEDSWORK comment
authorJunio C Hamano <gitster@pobox.com>
Mon, 21 Jul 2025 22:46:42 +0000 (15:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Jul 2025 14:01:21 +0000 (07:01 -0700)
The comment is poorly phrased and it in't clear what it wanted to
say.  Strongly discourage this broken pattern to be copied and
pasted to other code paths.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rev-list.c

index 0984b607bf052d7d248083f358f2c56f53c16c55..baa9ba17d4d9709563083b8cf2dc6fdd4888e0f2 100644 (file)
@@ -650,17 +650,21 @@ int cmd_rev_list(int argc,
         *
         * Let "--missing" to conditionally set fetch_if_missing.
         */
+
        /*
-        * NEEDSWORK: These loops that attempt to find presence of
-        * options without understanding that the options they are
-        * skipping are broken (e.g., it would not know "--grep
+        * NEEDSWORK: The next loop is utterly broken.  It tries to
+        * notice an option is used, but without understanding if each
+        * option takes an argument, which fundamentally would not
+        * work.  It would not know "--grep
         * --exclude-promisor-objects" is not triggering
-        * "--exclude-promisor-objects" option).  We really need
-        * setup_revisions() to have a mechanism to allow and disallow
-        * some sets of options for different commands (like rev-list,
-        * replay, etc). Such a mechanism should do an early parsing
-        * of options and be able to manage the `--missing=...` and
-        * `--exclude-promisor-objects` options below.
+        * "--exclude-promisor-objects" option, for example.
+        *
+        * We really need setup_revisions() to have a mechanism to
+        * allow and disallow some sets of options for different
+        * commands (like rev-list, replay, etc). Such a mechanism
+        * should do an early parsing of options and be able to manage
+        * the `--missing=...` and `--exclude-promisor-objects`
+        * options below.
         */
        for (i = 1; i < argc; i++) {
                const char *arg = argv[i];