git-2.22.0/rerere.c
/*
 * Scan the index and find paths that have conflicts that rerere can
 * handle, i.e. the ones that has both stages #2 and #3.
 *
 * NEEDSWORK: we do not record or replay a previous "resolve by
 * deletion" for a delete-modify conflict, as that is inherently risky
 * without knowing what modification is being discarded.  The only
 * safe case, i.e. both side doing the deletion and modification that
 * are identical to the previous round, might want to be handled,
 * though.
 */
Scan the index and find paths that have conflicts that rerere can
handle, i.e. the ones that has both stages #2 and #3.

we do not record or replay a previous "resolve by
deletion" for a delete-modify conflict, as that is inherently risky
without knowing what modification is being discarded.  The only
safe case, i.e. both side doing the deletion and modification that
are identical to the previous round, might want to be handled,
though.
Scan the index and find paths that have conflicts that rerere can handle i . e . the ones that has both stages #2 and #3 . we do not record or replay a previous " resolve by deletion " for a delete - modify conflict as that is inherently risky without knowing what modification is being discarded . The only safe case i . e . both side doing the deletion and modification that are identical to the previous round might want to be handled though .
static int find_conflict(struct repository *r, struct string_list *conflict)
{
	int i;
	if (repo_read_index(r) < 0)
		return error(_("index file corrupt"));
	for (i = 0; i < r->index->cache_nr;) {
		int conflict_type;
		const struct cache_entry *e = r->index->cache[i];
		i = check_one_conflict(r->index, i, &conflict_type);
		if (conflict_type == THREE_STAGED)
			string_list_insert(conflict, (const char *)e->name);
	}
	return 0;
}
static int find_conflict ( struct repository * r , struct string_list * conflict ) { int i ; if ( repo_read_index ( r ) < 0 ) return error ( _ ( " " ) ) ; for ( i = 0 ; i < r -> index -> cache_nr ; ) { int conflict_type ; const struct cache_entry * e = r -> index -> cache [ i ] ; i = check_one_conflict ( r -> index , i , & conflict_type ) ; if ( conflict_type == THREE_STAGED ) string_list_insert ( conflict , ( const char * ) e -> name ) ; } return 0 ; }
Scan the index and find paths that have conflicts that rerere can
 handle, i.e.
Scan the index and find paths that have conflicts that rerere can handle i . e .