MCPcopy Create free account
hub / github.com/git/git / update_paths

Function update_paths

rerere.c:708–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708static void update_paths(struct repository *r, struct string_list *update)
709{
710 struct lock_file index_lock = LOCK_INIT;
711 int i;
712
713 repo_hold_locked_index(r, &index_lock, LOCK_DIE_ON_ERROR);
714
715 for (i = 0; i < update->nr; i++) {
716 struct string_list_item *item = &update->items[i];
717 if (add_file_to_index(r->index, item->string, 0))
718 exit(128);
719 fprintf_ln(stderr, _("Staged '%s' using previous resolution."),
720 item->string);
721 }
722
723 if (write_locked_index(r->index, &index_lock,
724 COMMIT_LOCK | SKIP_IF_UNCHANGED))
725 die(_("unable to write new index file"));
726}
727
728static void remove_variant(struct rerere_id *id)
729{

Callers 1

do_plain_rerereFunction · 0.85

Calls 5

repo_hold_locked_indexFunction · 0.85
add_file_to_indexFunction · 0.85
fprintf_lnFunction · 0.85
write_locked_indexFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected