git-2.22.0/rerere.c
/*
 * During a conflict resolution, after "rerere" recorded the
 * preimages, abandon them if the user did not resolve them or
 * record their resolutions.  And drop $GIT_DIR/MERGE_RR.
 *
 * NEEDSWORK: shouldn't we be calling this from "reset --hard"?
 */
During a conflict resolution, after "rerere" recorded the
preimages, abandon them if the user did not resolve them or
record their resolutions.


During a conflict resolution after " rerere " recorded the preimages abandon them if the user did not resolve them or record their resolutions .
void rerere_clear(struct repository *r, struct string_list *merge_rr)
{
	int i;
	if (setup_rerere(r, merge_rr, 0) < 0)
		return;
	for (i = 0; i < merge_rr->nr; i++) {
		struct rerere_id *id = merge_rr->items[i].util;
		if (!has_rerere_resolution(id)) {
			unlink_rr_item(id);
			rmdir(rerere_path(id, NULL));
		}
	}
	unlink_or_warn(git_path_merge_rr(r));
	rollback_lock_file(&write_lock);
}
void rerere_clear ( struct repository * r , struct string_list * merge_rr ) { int i ; if ( setup_rerere ( r , merge_rr , 0 ) < 0 ) return ; for ( i = 0 ; i < merge_rr -> nr ; i ++ ) { struct rerere_id * id = merge_rr -> items [ i ] . util ; if ( ! has_rerere_resolution ( id ) ) { unlink_rr_item ( id ) ; rmdir ( rerere_path ( id , NULL ) ) ; } } unlink_or_warn ( git_path_merge_rr ( r ) ) ; rollback_lock_file ( & write_lock ) ; }
During a conflict resolution, after "rerere" recorded the
 preimages, abandon them if the user did not resolve them or
 record their resolutions.
During a conflict resolution after " rerere " recorded the preimages abandon them if the user did not resolve them or record their resolutions .