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

Re: how to track the history of a line in a file

From
Ddavid@lang.hm <david@lang.hm>
Date
Jan 2, 2009, 22:58 UTC
Message-ID
<alpine.DEB.1.10.0901021455390.21567@asgard.lang.hm>
In-Reply-To
<3ab397d0901021349h4ebae0c1g460a0c8abd4ec072@mail.gmail.com>
On Fri, 2 Jan 2009, Jeff Whiteside wrote:
Show 14 quoted lines
>> -oldline
>> +newline
>>
>> it's a 1-1 correspondence
>>
>> if it's instead
>> -oldline1
>> -oldline2
>> +newline1
>> +newline2
>
> what a neat idea.  i'm going to start malloc'ing 10,000 lines x 120
> chars for each file i add, and edit them so that no new lines replace
> removed lines unless it's intended that they were the same line.

I don't understand your comment. that isn't nessasary to do the tracking that I'm needing (you don't have to look at every line, only some of the lines that are in the same hunk of the patch as the line(s) you are interested in)

in my situation the use case is config files. in them each line is usually edited independantly of other lines (with stuff being added, usually, but not always on the end)

David Lang
Previous: Jeff WhitesideNext: david@lang.hm
Message 5 of 17 in “how to track the history of a line in a file”
  1. david@lang.hmJan 2, 2009
  2. Jeff KingJan 2, 2009
  3. david@lang.hmJan 2, 2009
  4. Jeff WhitesideJan 2, 2009
  5. david@lang.hmJan 2, 2009
  6. david@lang.hmJan 2, 2009
  7. david@lang.hmJan 2, 2009
  8. Junio C HamanoJan 2, 2009
  9. david@lang.hmJan 3, 2009
  10. Thomas RastJan 3, 2009
  11. david@lang.hmJan 3, 2009
  12. david@lang.hmJan 2, 2009
  13. david@lang.hmJan 3, 2009
  14. Bernt HansenJan 6, 2009
  15. Miklos VajnaJan 6, 2009
  16. Bernt HansenJan 6, 2009
  17. Bernt HansenJan 6, 2009

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.