git/builtin
Jeff King 7f40759496 fast-export: tighten anonymize_mem() interface to handle only strings
While the anonymize_mem() interface _can_ store arbitrary byte
sequences, none of the callers uses this feature (as of the previous
commit). We'd like to keep it that way, as we'll be exposing the
string-like nature of the anonymization routines to the user. So let's
tighten up the interface a bit:

  - don't treat "len" as an out-parameter from anonymize_mem(); this
    ensures callers treat the pointer result as a NUL-terminated string

  - likewise, don't treat "len" as an out-parameter from generator
    functions

  - swap out "void *" for "char *" as appropriate to signal that we
    don't handle arbitrary memory

  - rename the function to anonymize_str()

This will also open up some optimization opportunities in a future
patch.

Note that we can't drop the "len" parameter entirely. Some callers do
pass in partial strings (e.g., "foo/bar", len=3) to avoid copying, and
we need to handle those still.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-06-23 19:56:26 -07:00
..
2020-04-28 10:47:10 -07:00
2020-05-05 14:54:27 -07:00
2019-11-11 11:46:29 +09:00
2020-04-28 10:47:10 -07:00
2020-06-08 18:06:30 -07:00
2020-05-05 14:54:27 -07:00
2020-05-13 12:19:19 -07:00
2020-03-24 15:04:43 -07:00
2020-05-24 19:39:39 -07:00
2020-05-05 14:54:27 -07:00
2020-05-01 13:39:59 -07:00
2020-05-05 14:54:27 -07:00
2019-05-13 14:22:54 +09:00
2020-04-28 10:47:10 -07:00
2020-03-24 15:04:44 -07:00
2020-05-13 12:19:18 -07:00
2020-05-05 14:54:27 -07:00
2020-05-13 12:19:19 -07:00
2020-04-28 10:47:10 -07:00
2020-05-13 12:19:18 -07:00
2020-04-28 10:47:10 -07:00
2020-05-13 12:19:18 -07:00
2020-04-28 10:47:10 -07:00
2020-04-28 10:47:10 -07:00
2019-06-19 08:19:21 -07:00