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

Function strbuf_realpath

abspath.c:216–221  ·  view source on GitHub ↗

* Return the real path (i.e., absolute path, with symlinks resolved * and extra slashes removed) equivalent to the specified path. (If * you want an absolute path but don't mind links, use * absolute_path().) Places the resolved realpath in the provided strbuf. * * The directory part of path (i.e., everything up to the last * dir_sep) must denote a valid, existing directory, but the last

Source from the content-addressed store, hash-verified

214 * NULL on errors (without generating any output).
215 */
216char *strbuf_realpath(struct strbuf *resolved, const char *path,
217 int die_on_error)
218{
219 return strbuf_realpath_1(resolved, path,
220 die_on_error ? REALPATH_DIE_ON_ERROR : 0);
221}
222
223/*
224 * Just like strbuf_realpath, but allows an arbitrary number of path

Callers 15

include_by_gitdirFunction · 0.85
abspath_part_inside_repoFunction · 0.85
is_inside_git_dirFunction · 0.85
is_inside_work_treeFunction · 0.85
setup_original_cwdFunction · 0.85
read_gitfile_gentlyFunction · 0.85
set_git_dirFunction · 0.85
set_git_work_treeFunction · 0.85
git_get_exec_path_procfsFunction · 0.85
find_worktree_by_pathFunction · 0.85

Calls 1

strbuf_realpath_1Function · 0.85

Tested by 1

cmd__path_utilsFunction · 0.68