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

Re: [PATCH] Improve parent blame to detect renames by using the previous information

From
Jonas Fonseca <fonseca@diku.dk>
Date
Jun 10, 2010, 02:23 UTC
Message-ID
<AANLkTilpMcHi4ZrrEmG4hi3TVo1IK4C-skq8cRADvAPf@mail.gmail.com>
In-Reply-To
<20100606223545.GA11424@coredump.intra.peff.net>
On Sun, Jun 6, 2010 at 18:35, Jeff King <peff@peff.net> wrote:
Show 23 quoted lines
> On Sat, Jun 05, 2010 at 03:56:05PM -0400, Jonas Fonseca wrote:
>
> So I think it does the right thing, and I see you also included my fix:
>
>> +     char from[SIZEOF_REF + SIZEOF_STR];
>> +     char to[SIZEOF_REF + SIZEOF_STR];
>>       const char *diff_tree_argv[] = {
>> -             "git", "diff-tree", "-U0", blame->commit->id,
>> -                     "--", blame->commit->filename, NULL
>> +             "git", "diff", "--no-textconv", "--no-extdiff", "--no-color",
>> +                     "-U0", from, to, "--", NULL
>>       };
>>       struct io io;
>>       int parent_lineno = -1;
>>       int blamed_lineno = -1;
>>       char *line;
>>
>> +     snprintf(from, sizeof(from), "%s:%s", opt_ref, opt_file);
>> +     snprintf(to, sizeof(to), "%s:%s", blame->commit->id,
>> +              blame->commit->filename);
>> +
>
> to handle the line-jumping properly.

Yes, I accidently squashed everything together in the patch I sent. Before pushing the final version I move this part to a separate commit with you as the author and made it use string_format.

-- 
Jonas Fonseca
Previous: Jonas Fonseca
Message 9 of 9 in “fix off-by-one on parent selection”
  1. fix off-by-one on parent selectionJeff King, May 10, 2010
  2. Jonas FonsecaMay 22, 2010
  3. Jeff KingMay 23, 2010
  4. Jeff KingMay 23, 2010
  5. Improve parent blame to detect renames by using the previous informationJonas Fonseca, Jun 5, 2010
  6. Jonas FonsecaJun 5, 2010
  7. Jeff KingJun 6, 2010
  8. Jonas FonsecaJun 9, 2010
  9. Jonas FonsecaJun 10, 2010

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.