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

Re: [PATCH 2/8] evolve: Implement oid_array_contains_nondestructive

From
SXStefan Xenos <sxenos@google.com>
Date
Jan 27, 2019, 19:08 UTC
Message-ID
<CAPL8Ziuce2D4iLzkAguzjVvLq8iZXxE_UwxtU7TVKB0D7bG-dA@mail.gmail.com>
In-Reply-To
<CAGZ79kYiE+VhQw4GMs_VM6kK5yXAQ8An0o4fCVSZ3gr2+rHwiA@mail.gmail.com>
On Tue, Jan 22, 2019 at 11:51 AM Stefan Beller <sbeller@google.com> wrote:
Show 9 quoted lines
>
> On Mon, Jan 21, 2019 at 2:32 PM <sxenos@google.com> wrote:
> >
>
> > evolve: Implement oid_array_contains_nondestructive
>
> I'd think I would word this
>
>     sha1-array: implement oid_array_contains_nondestructive
Good point. Done.
Show 17 quoted lines
> as for this patch it is not relevant what we we'll be using it for
> later, but rather that it touches the oidset class?
>
> > From: Stefan Xenos <sxenos@gmail.com>
> >
> > Implement a "contains_nondestructive" function for oid_array that won't
> > sort the array if it is unsorted. This can be used to test containment in
> > the rare situations where the array order matters.
> >
> > The function has intentionally been given a name that is more cumbersome
> > than the "lookup" function, which is what most callers will will want
> > in most situations.
>
> What about naming it oid_array_linear_lookup instead?
> That would still have the common "lookup" in the name and
> the "linear" should be enough to scare away the casual
> user. The non-destructive sounds scary.

It probably shouldn't contain the word "lookup" since the lookup method returns an index and this new method returns true/false. I changed it to oid_array_readonly_contains.

> Missing sign off
Thanks!
Previous: Stefan BellerNext: sxenos@google.com
Message 4 of 10 in “technical doc: add a design doc for the evolve command”
  1. 1/8 technical doc: add a design doc for the evolve commandsxenos@google.com, Jan 21, 2019
  2. 2/8 evolve: Implement oid_array_contains_nondestructivesxenos@google.com, Jan 21, 2019
  3. Stefan BellerJan 22, 2019
  4. Stefan XenosJan 27, 2019
  5. 3/8 evlove: Add the metas namespace to ref-filtersxenos@google.com, Jan 21, 2019
  6. 4/8 evolve: Add support for parsing metacommitssxenos@google.com, Jan 21, 2019
  7. 5/8 evolve: Add the change-table structuresxenos@google.com, Jan 21, 2019
  8. 6/8 evolve: Add support for writing metacommitssxenos@google.com, Jan 21, 2019
  9. 7/8 evolve: Implement the git change update commandsxenos@google.com, Jan 21, 2019
  10. 8/8 evolve: Add the git change list commandsxenos@google.com, Jan 21, 2019

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.