git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git archeology
@ 2018-04-21  6:19 Vladimir Gorshenin
  2018-04-21  6:29 ` SZEDER Gábor
  2018-04-21  6:43 ` Christian Couder
  0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Gorshenin @ 2018-04-21  6:19 UTC (permalink / raw)
  To: Git

Hi,

My team and I as well as millions of other developers are excited to
have such tool at hand as Git. It helps us a lot.

Now we challenged ourselves to be even more productive with Git
analyzing our usage history.

And there is a problem, which I believe is fundamental for Git (please
prove me wrong): how to find all overlapping commits, e.g. touching
the same lines of code?

I played with “Git diff” and “Git blame” but without a reliable
result. “Git diff” gives only relative number of lines and it’s not
easy to track these number through 1000+ commits. “Git blame” has nice
output but without any information about deletion.

What would you advice me to do?

Regards,
Wladd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git archeology
  2018-04-21  6:19 Git archeology Vladimir Gorshenin
@ 2018-04-21  6:29 ` SZEDER Gábor
  2018-04-24 10:31   ` Vladimir Gorshenin
  2018-04-21  6:43 ` Christian Couder
  1 sibling, 1 reply; 5+ messages in thread
From: SZEDER Gábor @ 2018-04-21  6:29 UTC (permalink / raw)
  To: Vladimir Gorshenin; +Cc: SZEDER Gábor, Git

> And there is a problem, which I believe is fundamental for Git (please
> prove me wrong): how to find all overlapping commits, e.g. touching
> the same lines of code?

You might be looking for 'git log -L'.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git archeology
  2018-04-21  6:19 Git archeology Vladimir Gorshenin
  2018-04-21  6:29 ` SZEDER Gábor
@ 2018-04-21  6:43 ` Christian Couder
  2018-04-24 10:37   ` Vladimir Gorshenin
  1 sibling, 1 reply; 5+ messages in thread
From: Christian Couder @ 2018-04-21  6:43 UTC (permalink / raw)
  To: Vladimir Gorshenin; +Cc: git

Hi,

On Sat, Apr 21, 2018 at 8:19 AM, Vladimir Gorshenin
<gorshenin.vladimir@googlemail.com> wrote:
> Hi,
>
> My team and I as well as millions of other developers are excited to
> have such tool at hand as Git. It helps us a lot.
>
> Now we challenged ourselves to be even more productive with Git
> analyzing our usage history.

What kind of analysis do you want to do? Is it the same kind of
analysis as described in the "Token-based authorship information from
Git" article (https://lwn.net/Articles/698425/) on LWN.net?

> And there is a problem, which I believe is fundamental for Git (please
> prove me wrong): how to find all overlapping commits, e.g. touching
> the same lines of code?

It is not very clear what you would consider overlapping commits or
commits touching the same lines of code. If some lines of code have
been duplicated in different files, for example, are the commits
touching the original lines relevant to what happened to the
duplicated lines? And what about lines that were moved from one file
to another or in the same file?

> I played with “Git diff” and “Git blame” but without a reliable
> result. “Git diff” gives only relative number of lines and it’s not
> easy to track these number through 1000+ commits. “Git blame” has nice
> output but without any information about deletion.

Did you try 'git log -L' as Szeder Gábor just suggested?

> What would you advice me to do?

If 'git log -L' and other git commands are not doing what you want,
you might want to take a look at cregit
(https://github.com/cregit/cregit) and maybe at other work from the
people who developed it. The above LWN.net article is about their
early work.

There are links related to this tool in:
https://git.github.io/rev_news/2017/05/17/edition-27/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git archeology
  2018-04-21  6:29 ` SZEDER Gábor
@ 2018-04-24 10:31   ` Vladimir Gorshenin
  0 siblings, 0 replies; 5+ messages in thread
From: Vladimir Gorshenin @ 2018-04-24 10:31 UTC (permalink / raw)
  To: SZEDER Gábor; +Cc: Git

Hi Szedar,

Thank you for the reply! I didn't expect it could be so instant!

I checked 'git log -L' option and it seems to the best one so far. But
nevertheless is has a pit fall: I run it like 'git log -L ,:somefile'
and get the output that needs manual scraping since each commit spans
the whole file despite only few lines were actually altered.

I would like to have an output form 'git log -L' in patch style. Could
it be done somehow?

Have a nice day,

Vladimir

2018-04-21 8:29 GMT+02:00 SZEDER Gábor <szeder.dev@gmail.com>:
>> And there is a problem, which I believe is fundamental for Git (please
>> prove me wrong): how to find all overlapping commits, e.g. touching
>> the same lines of code?
>
> You might be looking for 'git log -L'.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Git archeology
  2018-04-21  6:43 ` Christian Couder
@ 2018-04-24 10:37   ` Vladimir Gorshenin
  0 siblings, 0 replies; 5+ messages in thread
From: Vladimir Gorshenin @ 2018-04-24 10:37 UTC (permalink / raw)
  To: Christian Couder; +Cc: git

Hi Christian,

Thank you for the reply.

After I got the reply from Szedar I was so excited about git community
passion for help. And your reply made me ever more assure in it.
Once again thank your for the comprehensive answer. I appreciate
Daniel German's research and going to try token based method in my
task as well.

Have a nice day,

Vladimir

2018-04-21 8:43 GMT+02:00 Christian Couder <christian.couder@gmail.com>:
> Hi,
>
> On Sat, Apr 21, 2018 at 8:19 AM, Vladimir Gorshenin
> <gorshenin.vladimir@googlemail.com> wrote:
>> Hi,
>>
>> My team and I as well as millions of other developers are excited to
>> have such tool at hand as Git. It helps us a lot.
>>
>> Now we challenged ourselves to be even more productive with Git
>> analyzing our usage history.
>
> What kind of analysis do you want to do? Is it the same kind of
> analysis as described in the "Token-based authorship information from
> Git" article (https://lwn.net/Articles/698425/) on LWN.net?
>
>> And there is a problem, which I believe is fundamental for Git (please
>> prove me wrong): how to find all overlapping commits, e.g. touching
>> the same lines of code?
>
> It is not very clear what you would consider overlapping commits or
> commits touching the same lines of code. If some lines of code have
> been duplicated in different files, for example, are the commits
> touching the original lines relevant to what happened to the
> duplicated lines? And what about lines that were moved from one file
> to another or in the same file?
>
>> I played with “Git diff” and “Git blame” but without a reliable
>> result. “Git diff” gives only relative number of lines and it’s not
>> easy to track these number through 1000+ commits. “Git blame” has nice
>> output but without any information about deletion.
>
> Did you try 'git log -L' as Szeder Gábor just suggested?
>
>> What would you advice me to do?
>
> If 'git log -L' and other git commands are not doing what you want,
> you might want to take a look at cregit
> (https://github.com/cregit/cregit) and maybe at other work from the
> people who developed it. The above LWN.net article is about their
> early work.
>
> There are links related to this tool in:
> https://git.github.io/rev_news/2017/05/17/edition-27/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-24 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-21  6:19 Git archeology Vladimir Gorshenin
2018-04-21  6:29 ` SZEDER Gábor
2018-04-24 10:31   ` Vladimir Gorshenin
2018-04-21  6:43 ` Christian Couder
2018-04-24 10:37   ` Vladimir Gorshenin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).