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

Function rebase_write_basic_state

builtin/rebase.c:515–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515static int rebase_write_basic_state(struct rebase_options *opts)
516{
517 write_file(state_dir_path("head-name", opts), "%s",
518 opts->head_name ? opts->head_name : "detached HEAD");
519 write_file(state_dir_path("onto", opts), "%s",
520 opts->onto ? oid_to_hex(&opts->onto->object.oid) : "");
521 write_file(state_dir_path("orig-head", opts), "%s",
522 oid_to_hex(&opts->orig_head->object.oid));
523 if (!(opts->flags & REBASE_NO_QUIET))
524 write_file(state_dir_path("quiet", opts), "%s", "");
525 if (opts->flags & REBASE_VERBOSE)
526 write_file(state_dir_path("verbose", opts), "%s", "");
527 if (opts->allow_rerere_autoupdate > 0)
528 write_file(state_dir_path("allow_rerere_autoupdate", opts),
529 "-%s-rerere-autoupdate",
530 opts->allow_rerere_autoupdate == RERERE_AUTOUPDATE ?
531 "" : "-no");
532 if (opts->gpg_sign_opt)
533 write_file(state_dir_path("gpg_sign_opt", opts), "%s",
534 opts->gpg_sign_opt);
535 if (opts->signoff)
536 write_file(state_dir_path("signoff", opts), "--signoff");
537
538 return 0;
539}
540
541static int cleanup_autostash(struct rebase_options *opts)
542{

Callers 1

run_amFunction · 0.85

Calls 3

write_fileFunction · 0.85
state_dir_pathFunction · 0.85
oid_to_hexFunction · 0.85

Tested by

no test coverage detected