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

Function state_dir_path

builtin/rebase.c:423–436  ·  view source on GitHub ↗

Returns the filename prefixed by the state_dir */

Source from the content-addressed store, hash-verified

421
422/* Returns the filename prefixed by the state_dir */
423static const char *state_dir_path(const char *filename, struct rebase_options *opts)
424{
425 static struct strbuf path = STRBUF_INIT;
426 static size_t prefix_len;
427
428 if (!prefix_len) {
429 strbuf_addf(&path, "%s/", opts->state_dir);
430 prefix_len = path.len;
431 }
432
433 strbuf_setlen(&path, prefix_len);
434 strbuf_addstr(&path, filename);
435 return path.buf;
436}
437
438/* Initialize the rebase options from the state directory. */
439static int read_basic_state(struct rebase_options *opts)

Callers 6

read_basic_stateFunction · 0.85
rebase_write_basic_stateFunction · 0.85
cleanup_autostashFunction · 0.85
finish_rebaseFunction · 0.85
run_specific_rebaseFunction · 0.85
cmd_rebaseFunction · 0.85

Calls 3

strbuf_addfFunction · 0.85
strbuf_setlenFunction · 0.85
strbuf_addstrFunction · 0.85

Tested by

no test coverage detected