1
0
mirror of https://github.com/git/git.git synced 2024-10-21 01:08:11 +02:00
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
..
add.c
am.c
annotate.c
apply.c
archive.c
bisect--helper.c Merge branch 'cb/bisect-helper-parser-fix' 2020-06-08 18:06:32 -07:00
blame.c
branch.c
bundle.c
cat-file.c
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'bc/filter-process' 2020-06-08 18:06:30 -07:00
clean.c
clone.c Merge branch 'js/reflog-anonymize-for-clone-and-fetch' 2020-06-17 21:54:01 -07:00
column.c
commit-graph.c
commit-tree.c
commit.c
config.c
count-objects.c
credential.c
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c
difftool.c
env--helper.c
fast-export.c fast-export: tighten anonymize_mem() interface to handle only strings 2020-06-23 19:56:26 -07:00
fetch-pack.c stateless-connect: send response end packet 2020-05-24 16:26:00 -07:00
fetch.c Merge branch 'js/reflog-anonymize-for-clone-and-fetch' 2020-06-17 21:54:01 -07:00
fmt-merge-msg.c
for-each-ref.c
fsck.c Merge branch 'ds/multi-pack-verify' 2020-05-24 19:39:39 -07:00
gc.c
get-tar-commit-id.c
grep.c
hash-object.c
help.c
index-pack.c
init-db.c
interpret-trailers.c
log.c
ls-files.c
ls-remote.c
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'an/merge-single-strategy-optim' 2020-06-02 13:35:01 -07:00
mktag.c
mktree.c
multi-pack-index.c
mv.c
name-rev.c
notes.c
pack-objects.c
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
pull.c
push.c
range-diff.c
read-tree.c
rebase.c
receive-pack.c
reflog.c
remote-ext.c
remote-fd.c
remote.c
repack.c
replace.c
rerere.c
reset.c
rev-list.c
rev-parse.c
revert.c
rm.c
send-pack.c
shortlog.c
show-branch.c
show-index.c
show-ref.c
sparse-checkout.c sparse-checkout: avoid staging deletions of all files 2020-06-05 08:05:50 -07:00
stash.c
stripspace.c
submodule--helper.c
symbolic-ref.c
tag.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
upload-pack.c
var.c
verify-commit.c
verify-pack.c
verify-tag.c
worktree.c Merge branch 'es/worktree-duplicate-paths' 2020-06-22 15:55:03 -07:00
write-tree.c