git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 4/4] rev-list: allow missing tips with --missing=[print|allow*]

From
Christian Couder <christian.couder@gmail.com>
Date
Feb 14, 2024, 14:39 UTC
Message-ID
<CAP8UFD1mNJn-aQnx9m8HNeEB8etuYaJoZB2zBXUPQVMcJhTUCg@mail.gmail.com>
In-Reply-To
<xmqqeddmonq0.fsf@gitster.g>
On Thu, Feb 8, 2024 at 6:44 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Christian Couder <christian.couder@gmail.com> writes:
Show 25 quoted lines
> > diff --git a/builtin/rev-list.c b/builtin/rev-list.c
> > index b3f4783858..ec9556f135 100644
> > --- a/builtin/rev-list.c
> > +++ b/builtin/rev-list.c
> > @@ -545,6 +545,15 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
> >        *
> >        * Let "--missing" to conditionally set fetch_if_missing.
> >        */
> > +     /*
> > +      * NEEDSWORK: These dump loops to look for some options early
> > +      * are ugly. We really need setup_revisions() to have a
>
> I would drop the "dump" and "ugly" from here.  It OK to make value
> judgement with such words in casual conversations on a proposed
> patch, but when we make a request to future developers to fix our
> mess, we should be more objective and stick to the techincal facts,
> so that they have better understanding on why we think this area
> needs more work.
>
> Perhaps something like:
>
>     These loops that attempt to find presence of options without
>     understanding what the options they are skipping are broken
>     (e.g., it would not know "--grep --exclude-promisor-objects" is
>     not triggering "--exclude-promisor-objects" option).
I have used what you suggest in V3, except for s/what/that/.
Show 25 quoted lines
> Everything after "We really need" is good (modulo possible grammos),
> I think.  Thanks for writing it.
>
> > +      * mechanism to allow and disallow some sets of options for
> > +      * different commands (like rev-list, replay, etc). Such
> > +      * mechanism should do an early parsing of option and be able
> > +      * to manage the `--exclude-promisor-objects` and `--missing=...`
> > +      * options below.
> > +      */
> >       for (i = 1; i < argc; i++) {
> >               const char *arg = argv[i];
> >               if (!strcmp(arg, "--exclude-promisor-objects")) {
> > @@ -753,8 +762,12 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
> >
> >       if (arg_print_omitted)
> >               oidset_init(&omitted_objects, DEFAULT_OIDSET_SIZE);
> > -     if (arg_missing_action == MA_PRINT)
> > +     if (arg_missing_action == MA_PRINT) {
> >               oidset_init(&missing_objects, DEFAULT_OIDSET_SIZE);
> > +             /* Already add missing tips */
> > +             oidset_insert_from_set(&missing_objects, &revs.missing_commits);
> > +             oidset_clear(&revs.missing_commits);
> > +     }
>
> It is unclear what "already" here refers to, at least to me.

I removed it and changed the comment to just "/* Add missing tips */" in the V3 I just sent.

Thanks.
Previous: Junio C HamanoNext: Linus Arver
Message 16 of 30 in “rev-list: allow missing tips with --missing”
  1. 0/4 rev-list: allow missing tips with --missingChristian Couder, Feb 8, 2024
  2. 1/4 revision: clarify a 'return NULL' in get_reference()Christian Couder, Feb 8, 2024
  3. 2/4 oidset: refactor oidset_insert_from_set()Christian Couder, Feb 8, 2024
  4. Junio C HamanoFeb 8, 2024
  5. Linus ArverFeb 13, 2024
  6. Christian CouderFeb 14, 2024
  7. Linus ArverFeb 16, 2024
  8. Christian CouderFeb 16, 2024
  9. Linus ArverFeb 16, 2024
  10. 3/4 t6022: fix 'test' style and 'even though' typoChristian Couder, Feb 8, 2024
  11. 4/4 rev-list: allow missing tips with --missing=[print|allow*]Christian Couder, Feb 8, 2024
  12. Junio C HamanoFeb 8, 2024
  13. Linus ArverFeb 13, 2024
  14. Christian CouderFeb 14, 2024
  15. Junio C HamanoFeb 14, 2024
  16. Christian CouderFeb 14, 2024
  17. Linus ArverFeb 13, 2024
  18. Christian CouderFeb 14, 2024
  19. Linus ArverFeb 16, 2024
  20. Junio C HamanoFeb 8, 2024
  21. Christian CouderFeb 14, 2024
  22. 0/5 rev-list: allow missing tips with --missingChristian Couder, Feb 14, 2024
  23. 1/5 t9210: do not rely on lazy fetching to failChristian Couder, Feb 14, 2024
  24. 2/5 revision: clarify a 'return NULL' in get_reference()Christian Couder, Feb 14, 2024
  25. 3/5 oidset: refactor oidset_insert_from_set()Christian Couder, Feb 14, 2024
  26. 4/5 t6022: fix 'test' style and 'even though' typoChristian Couder, Feb 14, 2024
  27. 5/5 rev-list: allow missing tips with --missing=[print|allow*]Christian Couder, Feb 14, 2024
  28. Linus ArverFeb 16, 2024
  29. revision: fix --missing=[print|allow*] for annotated tagsChristian Couder, Feb 28, 2024
  30. Junio C HamanoFeb 28, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.