MCPcopy Create free account
hub / github.com/git/git / strbuf_detach

Function strbuf_detach

strbuf.c:85–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85char *strbuf_detach(struct strbuf *sb, size_t *sz)
86{
87 char *res;
88 strbuf_grow(sb, 0);
89 res = sb->buf;
90 if (sz)
91 *sz = sb->len;
92 strbuf_init(sb, 0);
93 return res;
94}
95
96void strbuf_attach(struct strbuf *sb, void *buf, size_t len, size_t alloc)
97{

Callers 15

midx_bitmap_filenameFunction · 0.85
run_gpg_verifyFunction · 0.85
setup_original_cwdFunction · 0.85
write_entryFunction · 0.85
path_msgFunction · 0.85
apply_dir_renameFunction · 0.85
repo_git_pathFunction · 0.85
mkpathdupFunction · 0.85
repo_worktree_pathFunction · 0.85
repo_submodule_pathFunction · 0.85
repo_common_pathFunction · 0.85

Calls 2

strbuf_growFunction · 0.85
strbuf_initFunction · 0.85

Tested by 3

init_pathspec_itemFunction · 0.68
collect_expectFunction · 0.68