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

Re: Libify puzzle

From
Fredrik Kuivinen <freku045@student.liu.se>
Date
Mar 7, 2006, 15:40 UTC
Message-ID
<20060307154026.GA4457@c165.ib.student.liu.se>
In-Reply-To
<Pine.LNX.4.63.0603071151520.14200@wbgn013.biozentrum.uni-wuerzburg.de>
On Tue, Mar 07, 2006 at 12:00:02PM +0100, Johannes Schindelin wrote:
Show 14 quoted lines
> Hi,
> 
> I was just thinking a bit about teaching git-blame about renames, and hit 
> a problem: When rev-list stops because none of the parents has the file of 
> interest, the program should look if the parents contained a similar file 
> which got deleted. But the commit's parents were explicitely culled!
> 
> The problem seems to affect more programs when we try to libify them: What 
> used to be a pipe between two programs, can no longer just set 
> save_commit_buffer = 0 in the first stage, since the second might depend 
> on the buffer.
> 
> Would the correct solution be something like reparse_commit(commit)?
> 

I have started on the rename support for git-blame but it isn't working code yet.

My idea is to change the revision.h interface a bit. Instead having the pathname pruning hard-coded in try_to_simplify_commit as it is today we could have a pointer to a function in the rev_info structure which is called the same way as try_to_simplify_commit is called now. Then users of the revision walking interface could populate the rev_info structure with their own try_to_simplify_commit-like function. In the case of git-blame that function could then do the appropriate rename detection.

Thoughts/comments?
- Fredrik
Previous: Johannes Schindelin
Message 2 of 2 in “Libify puzzle”
  1. Johannes SchindelinMar 7, 2006
  2. Fredrik KuivinenMar 7, 2006

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.