| 706 | } |
| 707 | |
| 708 | static 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 | |
| 728 | static void remove_variant(struct rerere_id *id) |
| 729 | { |
no test coverage detected