Skip to content

Commit f31abb4

Browse files
committed
rev-list: update a NEEDSWORK comment
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 <[email protected]>
1 parent 16bd9f2 commit f31abb4

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

builtin/rev-list.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -650,17 +650,21 @@ int cmd_rev_list(int argc,
650650
*
651651
* Let "--missing" to conditionally set fetch_if_missing.
652652
*/
653+
653654
/*
654-
* NEEDSWORK: These loops that attempt to find presence of
655-
* options without understanding that the options they are
656-
* skipping are broken (e.g., it would not know "--grep
655+
* NEEDSWORK: The next loop is utterly broken. It tries to
656+
* notice an option is used, but without understanding if each
657+
* option takes an argument, which fundamentally would not
658+
* work. It would not know "--grep
657659
* --exclude-promisor-objects" is not triggering
658-
* "--exclude-promisor-objects" option). We really need
659-
* setup_revisions() to have a mechanism to allow and disallow
660-
* some sets of options for different commands (like rev-list,
661-
* replay, etc). Such a mechanism should do an early parsing
662-
* of options and be able to manage the `--missing=...` and
663-
* `--exclude-promisor-objects` options below.
660+
* "--exclude-promisor-objects" option, for example.
661+
*
662+
* We really need setup_revisions() to have a mechanism to
663+
* allow and disallow some sets of options for different
664+
* commands (like rev-list, replay, etc). Such a mechanism
665+
* should do an early parsing of options and be able to manage
666+
* the `--missing=...` and `--exclude-promisor-objects`
667+
* options below.
664668
*/
665669
for (i = 1; i < argc; i++) {
666670
const char *arg = argv[i];

0 commit comments

Comments
 (0)