On 14/01/11 00:39, Luke Kenneth Casson Leighton wrote: > On Sun, Jan 9, 2011 at 5:48 PM, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote: >> On Sun, Jan 9, 2011 at 8:55 PM, Luke Kenneth Casson Leighton >> <luke.leighton@xxxxxxxxx> wrote: >>> you still have to come up with a mapping from "chains" to "pieces". >>> in the bittorrent protocol the mapping is done *entirely* implicitly >>> and algorithmically. >> Given a commit SHA-1, the mapping can be done algorithmically because >> the graph from the commit tip is fixed. Perhaps not mapping all at >> once, but as you have more pieces in the graph, you can map more. > you're _sure_ about this? what happens when new commits get added, > and change that graph? are you _certain_ that you can write an > algorithm which is capable of generating exactly the same mapping, > even as more commits are added to the repository being mirrored, or, > does that situation not matter? For a given set of start and end points, and a given sort algorithm, walking the commit tree can yield deterministic results. You need to first make sure topological sanity prevails, then order by commit date where there are ties. git rev-list --date-order does this. There is the possibility of commits with the same commit date, so if you need to be really particular you can tie break on those, too. Did you look at any of the previous research I linked to before? Sam -- 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