{"thread":{"id":"23962","subject":"[GSoC 2010] The 2nd week","startedAt":"2010-06-01T06:41:01Z","lastAt":"2010-06-01T06:41:01Z","messageCount":1,"participants":["Bo Yang"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142651","messageId":"AANLkTinelswhPBZJNBDo8VesCxBgRlEZezwcY9dWyaF4@mail.gmail.com","threadId":"23962","inReplyTo":null,"subject":"[GSoC 2010] The 2nd week","fromName":"Bo Yang","fromEmail":"struggleyb.nku@gmail.com","sentAt":"2010-06-01T06:41:01Z","receivedAt":"2010-06-01T06:41:01Z","isPatch":false,"sender":{"key":"struggleyb.nku@gmail.com","avatar":"https://avatars.githubusercontent.com/u/233030?v=4"},"body":"Hi,\n\n   I have deal with many graduated works personally in my college, so\nit is a busy week for me and this update comes a little later.  Of\ncourse, I get progress on git development. Generally:\n1. follow the issues of '--graph improvement' series;\n2. try to find out a way to deal with the range split/combine problem.\n\nAnd I think it is worth to mention how we will deal with the line\nranges when we follow the history, my mentor Thomas give the idea to\nuse a topo-order traverse, and I get a detail solution from that.\n\nThe line level browser will start at certain commit and its line\nranges, the ranges will not split/combine when we just encounter\nlinear history. But when it comes the merge commit, one branch will\ntake part of the ranges and other branches will take others. That\nmeans the ranges will split here and will combine again after we reach\nthe common ancestor of all branches. Since, we will not know what a\ncommit's interesting ranges until all its children branches' commit's\nranges combine, so we need to walk the commits in topo-order and to\nget the parents' commits' interesting ranges when we reach a commit.\nThis will make sure, when we reach some commit, its ranges is combined\nand valid. Generally,\n1. Sort all the commits in topo-order and put the sorted list in [list];\n2. Pull one commit from [list], split the ranges according parents of\ncurrent commit, output the diff between current commit and each\nparent;\n3. Loop 2 until exhaust the [list];\n\nOf course, the commit touch no interesting ranges will be ignored.\n\nThe point here is we will traverse the commit graph twice to achieve\nthis, I think it is the only way to do this and if there is some\nsmarter way to do this, please point me out, thanks!\n\n-- \nRegards!\nBo\n----------------------------\nMy blog: http://blog.morebits.org\nWhy Git: http://www.whygitisbetterthanx.com/\n"}]}