SZEDER Gábor <szeder@xxxxxxxxxx> writes: > ... But I'm not sure I > can rely on that when gc'ing. Looking at the timestamp of "thisimage" would probaboly be more sensible than "preimage" alone, _if_ "thisimage" still exists. It is rewritten every time this particular conflict is observed; this is not necessarily when the recorded resolution is _used_, but it may be close enough in practice. You probably would want to rename the helper as "last_checked_at", though. After rerere does its work, however, "thisimage" does not have to stay around (the user can remove it, or we could enhance "gc" to do so). > + if (has_rerere_resolution(e->d_name)) { > + then = rerere_last_used_at(e->d_name); > + if (!then) > + continue; Here you already know that you have resolution (i.e. "postimage"), but your new function cannot stat a corresponding "thisimage", so you err on the safer side---but that means you may keep pre/post image pairs forever if somebody removes otherwise unused "thisimage" from a distant past. Perhaps we should apply cutoff_noresolve to the entry here? One possibility is to look at the timestamp of the directory itself instead. Then we can safely gc otherwise-unused "thisimage" file when rerere is not in use. I wonder if directory m_time timestamps are usable for this purpose on non-POSIX platforms? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html