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

Re: [PATCH] fast-export: factor out print_oid()

From
Jeff King <peff@peff.net>
Date
Aug 13, 2020, 17:25 UTC
Message-ID
<20200813172545.GB1597339@coredump.intra.peff.net>
In-Reply-To
<3ddf0a14-77ac-7546-e03a-704432305bdb@web.de>
On Thu, Aug 13, 2020 at 07:17:20PM +0200, René Scharfe wrote:
Show 7 quoted lines
> -- >8 --
> Subject: [PATCH v2] fast-export: deduplicate anonymization handling
> 
> Move the code for converting an object_id to a hexadecimal string and
> for handling of the default (not anonymizing) case from its callers to
> anonymize_oid() and consequently rename it to anonymize_oid_if_needed().
> This reduces code duplication.

I think this is a bad direction unless you're going to do it for all of the other anonymize_*() functions, as well, for consistency. And there it gets tricky because the caller is able to use the anonymizing knowledge in more places.

I actually liked your original version better.
-Peff
Previous: René ScharfeNext: René Scharfe
Message 6 of 10 in “fast-export: factor out print_oid()”
  1. fast-export: factor out print_oid()René Scharfe, Aug 13, 2020
  2. Jeff KingAug 13, 2020
  3. René ScharfeAug 13, 2020
  4. Taylor BlauAug 13, 2020
  5. René ScharfeAug 13, 2020
  6. Jeff KingAug 13, 2020
  7. René ScharfeAug 15, 2020
  8. Jeff KingAug 17, 2020
  9. Junio C HamanoAug 17, 2020
  10. Junio C HamanoAug 13, 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.