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

Function absolute_path

abspath.c:252–258  ·  view source on GitHub ↗

* Use this to get an absolute path from a relative one. If you want * to resolve links, you should use strbuf_realpath. */

Source from the content-addressed store, hash-verified

250 * to resolve links, you should use strbuf_realpath.
251 */
252const char *absolute_path(const char *path)
253{
254 static struct strbuf sb = STRBUF_INIT;
255 strbuf_reset(&sb);
256 strbuf_add_absolute_path(&sb, path);
257 return sb.buf;
258}
259
260char *absolute_pathdup(const char *path)
261{

Callers 15

prefix_pathFunction · 0.85
init_pathspec_itemFunction · 0.85
xmkstemp_modeFunction · 0.85
is_current_worktreeFunction · 0.85
unable_to_lock_messageFunction · 0.85
tmp_objdir_createFunction · 0.85
list_hooks_add_defaultFunction · 0.85
cmd__path_utilsFunction · 0.85
push_to_checkoutFunction · 0.85
update_worktreeFunction · 0.85
do_apply_stashFunction · 0.85

Calls 1

strbuf_add_absolute_pathFunction · 0.85

Tested by 2

init_pathspec_itemFunction · 0.68
cmd__path_utilsFunction · 0.68