Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/git/git
/ xstrdup
Function
xstrdup
wrapper.c:41–47 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
39
}
40
41
char *xstrdup(const char *str)
42
{
43
char *ret = strdup(str);
44
if (!ret)
45
die(
"Out of memory, strdup failed"
);
46
return ret;
47
}
48
49
static void *do_xmalloc(size_t size, int gentle)
50
{
Callers
15
git_config_from_parameters
Function · 0.85
git_config_string
Function · 0.85
configset_add_value
Function · 0.85
comment_char_callback
Function · 0.85
git_config_prepare_comment_string
Function · 0.85
repo_config_set_multivar_in_file_gently
Function · 0.85
read_worktree_config
Function · 0.85
handle_extension_v0
Function · 0.85
parse_reference_uri
Function · 0.85
check_repository_format_gently
Function · 0.85
setup_git_env_internal
Function · 0.85
setup_explicit_git_dir
Function · 0.85
Calls
1
die
Function · 0.70
Tested by
15
parse_refspec
Function · 0.68
refspec_item_init
Function · 0.68
refspec_find_match
Function · 0.68
init_pathspec_item
Function · 0.68
parse_pathspec
Function · 0.68
copy_pathspec
Function · 0.68
test_reftable_stack__add
Function · 0.68
test_reftable_stack__iterator
Function · 0.68
test_reftable_stack__tombstone
Function · 0.68
test_reftable_stack__reflog_expire
Function · 0.68
test_reftable_readwrite__log_write_read
Function · 0.68
test_reftable_record__ref_record_roundtrip
Function · 0.68