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

Re: What's cooking in git.git (Oct 2020, #03; Mon, 19)

From
Jeff King <peff@peff.net>
Date
Oct 23, 2020, 08:02 UTC
Message-ID
<20201023080202.GA4012156@coredump.intra.peff.net>
In-Reply-To
<xmqqr1put77h.fsf@gitster.c.googlers.com>
On Mon, Oct 19, 2020 at 11:13:22AM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> * en/strmap (2020-10-13) 10 commits
>  - strmap: enable allocations to come from a mem_pool
>  - strmap: add a strset sub-type
>  - strmap: add functions facilitating use as a string->int map
>  - strmap: enable faster clearing and reusing of strmaps
>  - strmap: add more utility functions
>  - strmap: new utility functions
>  - hashmap: introduce a new hashmap_partial_clear()
>  - hashmap: allow re-use after hashmap_free()
>  - hashmap: adjust spacing to fix argument alignment
>  - hashmap: add usage documentation explaining hashmap_free[_entries]()
> 
>  A speciailization of hashmap that uses a string as key has been
>  introduced.  Hopefully it will see wider use over time.
> 
>  Will merge to 'next'.

I haven't gotten a chance to look at this carefully yet, but note that the strset here sort-of conflicts with the one I added recently in builtin/shortlog.c (already in master). I think the compiler won't complain because they never show up in the same translation unit, but we should avoid having two almost-the-same types in the codebase.

I suspect my "check_and_add" function could be folded into Elijah's implementation. The other big difference is that mine uses the FLEX_ALLOC approach, and his doesn't. I haven't digested the code and discussion around that from Elijah's series yet.

-Peff
Previous: Johannes SchindelinNext: Junio C Hamano
Message 10 of 15 in “What's cooking in git.git (Oct 2020, #03; Mon, 19)”
  1. Junio C HamanoOct 19, 2020
  2. Eric SunshineOct 19, 2020
  3. Junio C HamanoOct 20, 2020
  4. Preparing to rewind 'next'Junio C Hamano, Oct 20, 2020
  5. Matheus Tavares BernardinoOct 20, 2020
  6. mr/bisect-in-c-3, was Re: What's cooking in git.git (Oct 2020, #03; Mon, 19)Johannes Schindelin, Oct 21, 2020
  7. Junio C HamanoOct 21, 2020
  8. Junio C HamanoOct 21, 2020
  9. Johannes SchindelinOct 22, 2020
  10. Jeff KingOct 23, 2020
  11. Junio C HamanoOct 23, 2020
  12. Elijah NewrenOct 23, 2020
  13. Jeff KingOct 27, 2020
  14. Jakub NarębskiOct 23, 2020
  15. Junio C HamanoOct 23, 2020

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.