MCPcopy Index your code
hub / github.com/git/git / strbuf_grow

Function strbuf_grow

strbuf.c:106–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void strbuf_grow(struct strbuf *sb, size_t extra)
107{
108 int new_buf = !sb->alloc;
109 size_t new_len = st_add3(sb->len, extra, 1);
110 if (new_buf)
111 sb->buf = NULL;
112 ALLOC_GROW(sb->buf, new_len, sb->alloc);
113 if (new_buf)
114 sb->buf[0] = '\0';
115}
116
117void strbuf_trim(struct strbuf *sb)
118{

Callers 15

strbuf_add_oid_hexFunction · 0.85
path_msgFunction · 0.85
apply_dir_renameFunction · 0.85
write_treeFunction · 0.85
relative_pathFunction · 0.85
strbuf_normalize_pathFunction · 0.85
strbuf_append_ext_headerFunction · 0.85
update_oneFunction · 0.85
write_oneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected