help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Seeing which commits modified a range of lines?


From: Tom
Subject: Re: Seeing which commits modified a range of lines?
Date: Wed, 5 Nov 2014 20:27:46 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
> Oh, yes, I've been dreaming of it ever since I started using GNU Arch.
> IIUC the only tool which does provide the needed info is Git where
> you have "git log -L<begline>,<endline>:<file>".
> 

Out of the box, yes, but the point of vc is to make the life of the
user easier and hide complexities. So this functionality could be 
implmented behind the scenes.

For example, VC tools provide annotate (blame) which can tell
the last change for lines in a file. So this can be called for
a file and then the last changes for the interesting lines 
are known.

Then blame can be called for these previous versions of the file
(indicated by the changes) to find out the last changes before
that, etc. so the  implementation can walk backwards the revisions
for each line collecting the commit infos and then finally 
presenting them to the user.

So it seems the information is available via annotate (blame),
because this is provided by the VC tools, so it may not be hard
to implement in a new vc command.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]