{"thread":{"id":"48340","subject":"Git archeology","startedAt":"2018-04-21T06:19:17Z","lastAt":"2018-04-24T10:37:53Z","messageCount":5,"participants":["Vladimir Gorshenin","SZEDER Gábor","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"345310","messageId":"CAEbJ=SN0h_eO+0CJQGEnEafhzgAYdgXByUqb_vsC1rgGw7jNAw@mail.gmail.com","threadId":"48340","inReplyTo":null,"subject":"Git archeology","fromName":"Vladimir Gorshenin","fromEmail":"gorshenin.vladimir@googlemail.com","sentAt":"2018-04-21T06:19:12Z","receivedAt":"2018-04-21T06:19:17Z","isPatch":false,"sender":{"key":"gorshenin.vladimir@googlemail.com","avatar":null},"body":"Hi,\n\nMy team and I as well as millions of other developers are excited to\nhave such tool at hand as Git. It helps us a lot.\n\nNow we challenged ourselves to be even more productive with Git\nanalyzing our usage history.\n\nAnd there is a problem, which I believe is fundamental for Git (please\nprove me wrong): how to find all overlapping commits, e.g. touching\nthe same lines of code?\n\nI played with “Git diff” and “Git blame” but without a reliable\nresult. “Git diff” gives only relative number of lines and it’s not\neasy to track these number through 1000+ commits. “Git blame” has nice\noutput but without any information about deletion.\n\nWhat would you advice me to do?\n\nRegards,\nWladd\n"},{"id":"345312","messageId":"20180421062923.4467-1-szeder.dev@gmail.com","threadId":"48340","inReplyTo":"CAEbJ=SN0h_eO+0CJQGEnEafhzgAYdgXByUqb_vsC1rgGw7jNAw@mail.gmail.com","subject":"Re: Git archeology","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-04-21T06:29:23Z","receivedAt":"2018-04-21T06:29:35Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"> And there is a problem, which I believe is fundamental for Git (please\n> prove me wrong): how to find all overlapping commits, e.g. touching\n> the same lines of code?\n\nYou might be looking for 'git log -L'.\n\n"},{"id":"345313","messageId":"CAP8UFD1H9vUVkx2rCJ03954jZp==Wj+O06hO1YYPQcVHbSV_Zw@mail.gmail.com","threadId":"48340","inReplyTo":"CAEbJ=SN0h_eO+0CJQGEnEafhzgAYdgXByUqb_vsC1rgGw7jNAw@mail.gmail.com","subject":"Re: Git archeology","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2018-04-21T06:43:20Z","receivedAt":"2018-04-21T06:43:24Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nOn Sat, Apr 21, 2018 at 8:19 AM, Vladimir Gorshenin\n<gorshenin.vladimir@googlemail.com> wrote:\n> Hi,\n>\n> My team and I as well as millions of other developers are excited to\n> have such tool at hand as Git. It helps us a lot.\n>\n> Now we challenged ourselves to be even more productive with Git\n> analyzing our usage history.\n\nWhat kind of analysis do you want to do? Is it the same kind of\nanalysis as described in the \"Token-based authorship information from\nGit\" article (https://lwn.net/Articles/698425/) on LWN.net?\n\n> And there is a problem, which I believe is fundamental for Git (please\n> prove me wrong): how to find all overlapping commits, e.g. touching\n> the same lines of code?\n\nIt is not very clear what you would consider overlapping commits or\ncommits touching the same lines of code. If some lines of code have\nbeen duplicated in different files, for example, are the commits\ntouching the original lines relevant to what happened to the\nduplicated lines? And what about lines that were moved from one file\nto another or in the same file?\n\n> I played with “Git diff” and “Git blame” but without a reliable\n> result. “Git diff” gives only relative number of lines and it’s not\n> easy to track these number through 1000+ commits. “Git blame” has nice\n> output but without any information about deletion.\n\nDid you try 'git log -L' as Szeder Gábor just suggested?\n\n> What would you advice me to do?\n\nIf 'git log -L' and other git commands are not doing what you want,\nyou might want to take a look at cregit\n(https://github.com/cregit/cregit) and maybe at other work from the\npeople who developed it. The above LWN.net article is about their\nearly work.\n\nThere are links related to this tool in:\nhttps://git.github.io/rev_news/2017/05/17/edition-27/\n"},{"id":"345638","messageId":"CAEbJ=SOkfHHrmbUXP_niRP4S0HSENqXriGWNFoYX2XpdvWzZww@mail.gmail.com","threadId":"48340","inReplyTo":"20180421062923.4467-1-szeder.dev@gmail.com","subject":"Re: Git archeology","fromName":"Vladimir Gorshenin","fromEmail":"gorshenin.vladimir@googlemail.com","sentAt":"2018-04-24T10:31:47Z","receivedAt":"2018-04-24T10:31:54Z","isPatch":false,"sender":{"key":"gorshenin.vladimir@googlemail.com","avatar":null},"body":"Hi Szedar,\n\nThank you for the reply! I didn't expect it could be so instant!\n\nI checked 'git log -L' option and it seems to the best one so far. But\nnevertheless is has a pit fall: I run it like 'git log -L ,:somefile'\nand get the output that needs manual scraping since each commit spans\nthe whole file despite only few lines were actually altered.\n\nI would like to have an output form 'git log -L' in patch style. Could\nit be done somehow?\n\nHave a nice day,\n\nVladimir\n\n2018-04-21 8:29 GMT+02:00 SZEDER Gábor <szeder.dev@gmail.com>:\n>> And there is a problem, which I believe is fundamental for Git (please\n>> prove me wrong): how to find all overlapping commits, e.g. touching\n>> the same lines of code?\n>\n> You might be looking for 'git log -L'.\n>\n"},{"id":"345639","messageId":"CAEbJ=SMh0801GV6Yfibbj2ynL9sJQFpbi6N_q7UMXu-xayXoqw@mail.gmail.com","threadId":"48340","inReplyTo":"CAP8UFD1H9vUVkx2rCJ03954jZp==Wj+O06hO1YYPQcVHbSV_Zw@mail.gmail.com","subject":"Re: Git archeology","fromName":"Vladimir Gorshenin","fromEmail":"gorshenin.vladimir@googlemail.com","sentAt":"2018-04-24T10:37:42Z","receivedAt":"2018-04-24T10:37:53Z","isPatch":false,"sender":{"key":"gorshenin.vladimir@googlemail.com","avatar":null},"body":"Hi Christian,\n\nThank you for the reply.\n\nAfter I got the reply from Szedar I was so excited about git community\npassion for help. And your reply made me ever more assure in it.\nOnce again thank your for the comprehensive answer. I appreciate\nDaniel German's research and going to try token based method in my\ntask as well.\n\nHave a nice day,\n\nVladimir\n\n2018-04-21 8:43 GMT+02:00 Christian Couder <christian.couder@gmail.com>:\n> Hi,\n>\n> On Sat, Apr 21, 2018 at 8:19 AM, Vladimir Gorshenin\n> <gorshenin.vladimir@googlemail.com> wrote:\n>> Hi,\n>>\n>> My team and I as well as millions of other developers are excited to\n>> have such tool at hand as Git. It helps us a lot.\n>>\n>> Now we challenged ourselves to be even more productive with Git\n>> analyzing our usage history.\n>\n> What kind of analysis do you want to do? Is it the same kind of\n> analysis as described in the \"Token-based authorship information from\n> Git\" article (https://lwn.net/Articles/698425/) on LWN.net?\n>\n>> And there is a problem, which I believe is fundamental for Git (please\n>> prove me wrong): how to find all overlapping commits, e.g. touching\n>> the same lines of code?\n>\n> It is not very clear what you would consider overlapping commits or\n> commits touching the same lines of code. If some lines of code have\n> been duplicated in different files, for example, are the commits\n> touching the original lines relevant to what happened to the\n> duplicated lines? And what about lines that were moved from one file\n> to another or in the same file?\n>\n>> I played with “Git diff” and “Git blame” but without a reliable\n>> result. “Git diff” gives only relative number of lines and it’s not\n>> easy to track these number through 1000+ commits. “Git blame” has nice\n>> output but without any information about deletion.\n>\n> Did you try 'git log -L' as Szeder Gábor just suggested?\n>\n>> What would you advice me to do?\n>\n> If 'git log -L' and other git commands are not doing what you want,\n> you might want to take a look at cregit\n> (https://github.com/cregit/cregit) and maybe at other work from the\n> people who developed it. The above LWN.net article is about their\n> early work.\n>\n> There are links related to this tool in:\n> https://git.github.io/rev_news/2017/05/17/edition-27/\n"}]}