On Sat, Mar 19, 2011 at 05:35:37PM -0700, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > but I'm not quite sure if this is the right place. Is it the > > responsibility of the checkout-orphan-warning code to clean up after > > itself, or is it the responsibility of a revision walker to clean up > > before itself? > > Usually it is the former; the latter is generally impossible (unless it is > willing to clear everything), but the former knows where it started > traversal from. For the case of 2 traversals, I suspect that clearing everything between is not so different from clearing from the tips, since most everything parsed was probably from the first traversal. But as we lib-ify more, we may end up with more and more traversals in a single program, so it's probably better to go the more efficient route from the beginning. So how about this? [1/3]: checkout: add basic tests for detached-orphan warning [2/3]: checkout: clear commit marks after detached-orphan check [3/3]: checkout: tweak detached-orphan warning format 3/3 is only somewhat related, but I had been meaning to do it anyway. We can break it off into a separate topic if there's a lot of discussion around the 2nd patch. -Peff -- 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