git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git rev-list -S ?

From
Thomas Rast <trast@student.ethz.ch>
Date
Mar 21, 2012, 11:14 UTC
Message-ID
<874ntixl1x.fsf@thomas.inf.ethz.ch>
In-Reply-To
<20120320220032.GA29233@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> On Tue, Mar 20, 2012 at 01:53:14PM -0700, Junio C Hamano wrote:
>
>> |    $ git log -S'it drives an external
>> |   an external' master Documentation/RelNotes
>> 
>> is a way to find commits that introduced and then removed the block of
>> text to files in the named directory, starting at the tip of 'master'.
>> 
>> Most of the "ultimate tracking tool" dream has already been realized in
>> "git blame" except one major part.  Once you find where the blame lies,
>> the tool _could_ help the user to find where these blamed lines came from
>> more than it currently does.
> 
> Related to this is the line-level history browser project. The idea was
> basically to get a log-like view (i.e., reverse chronological commits)
> of a chunk of code, tracing the ancestry of a particular chunk of lines.
>
> This was done by Bo Yang as a GSoC project in 2010, but the code still
> hasn't been merged. As I recall, it mostly works, but there are perhaps
> some corner cases or ugly parts of the code still to be re-worked.
> Thomas Rast was cleaning it up some, and could say more on the current

This is all correct. It mostly works, which is the main impediment to further work :-) You can try it by merging

  git://github.com/trast/git.git line-log-cleanup
It segfaults if you attempt to track more than one range, however.

I have started some rewriting, which tries to phrase it more in terms of simple operations on sets of lines, and pushed that as

  git://github.com/trast/git.git line-log-WIP

This was successful in that the newly written code is easier to read and completely broken.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jeff King
Message 5 of 5 in “git rev-list -S ?”
  1. Holger HellmuthMar 20, 2012
  2. Christopher TiwaldMar 20, 2012
  3. Junio C HamanoMar 20, 2012
  4. Jeff KingMar 20, 2012
  5. Thomas RastMar 21, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.