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

Function strbuf_strip_suffix

strbuf.h:564–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562void strbuf_stripspace(struct strbuf *buf, const char *comment_prefix);
563
564static inline int strbuf_strip_suffix(struct strbuf *sb, const char *suffix)
565{
566 if (strip_suffix_mem(sb->buf, &sb->len, suffix)) {
567 strbuf_setlen(sb, sb->len);
568 return 1;
569 } else
570 return 0;
571}
572
573/**
574 * Split str (of length slen) at the specified terminator character.

Callers 15

create_promisor_fileFunction · 0.85
update_common_dirFunction · 0.85
pack_geometry_initFunction · 0.85
remove_redundant_packsFunction · 0.85
packfile_store_load_packFunction · 0.85
get_main_worktreeFunction · 0.85
get_linked_worktreeFunction · 0.85
is_main_worktree_pathFunction · 0.85
repair_worktree_at_pathFunction · 0.85
midx_needs_updateFunction · 0.85

Calls 2

strip_suffix_memFunction · 0.85
strbuf_setlenFunction · 0.85

Tested by 2

cmd__pack_mtimesFunction · 0.68
bitmap_writeFunction · 0.68