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

Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes

From
Jeff King <peff@peff.net>
Date
Aug 7, 2016, 23:14 UTC
Message-ID
<20160807231410.7cwclya7yykcg2cy@sigill.intra.peff.net>
In-Reply-To
<alpine.DEB.2.20.1608071051540.5786@virtualbox>
On Sun, Aug 07, 2016 at 10:53:34AM +0200, Johannes Schindelin wrote:
Show 10 quoted lines
> On Sat, 6 Aug 2016, René Scharfe wrote:
> 
> > Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs
> > instead of taking detours through find_unique_abbrev() and its static
> > buffer.  This is shorter and a bit more efficient.
> 
> And less error-prone.
> 
> It is also a thing I need to change in my upcoming rebase--helper patches:
> I had not known about this function.

Great. I added it several months ago to avoid some hairy allocation code, so I am glad to see it finding new uses (both this patch and potential new ones).

-Peff
Previous: Johannes Schindelin
Message 3 of 3 in “use strbuf_add_unique_abbrev() for adding short hashes”
  1. use strbuf_add_unique_abbrev() for adding short hashesRené Scharfe, Aug 6, 2016
  2. Johannes SchindelinAug 7, 2016
  3. Jeff KingAug 7, 2016

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.