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

Re: [PATCH 2/2] line-log: avoid unnecessary full tree diffs

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 21, 2019, 17:29 UTC
Message-ID
<xmqqtvaas9zs.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190821110424.18184-3-szeder.dev@gmail.com>
SZEDER Gábor <szeder.dev@gmail.com> writes:
> So basically the line-level log computes a full tree diff for each
> commit-parent pair in step (1) to be used for rename detection in step
> (4) in the off chance that an interesting path is missing from the
> parent.

Good explanation. As we are not supporting swapping of two (or more) files, we only need rename processing when a path we have been inspecting disappears, at which point it is worth spending cycles to see where the path used to be in the parent commit.

> [1] Line-level log's rename following is quite similar to 'git log
>     --follow path', with the notable differences that it does handle
>     multiple paths at once as well, and that it doesn't show the
>     commit performing the rename if it's an exact rename.

Yeah, it's one of the reasons why "log --follow" is not (yet) a serious "feature" but merely a "checkbox item".

> [2] This slowness might not have been apparent initially, because back
>     when the line-level log feature was introduced rename detection
s/introduced/&,/
>     was not yet enabled by default; 12da1d1f6f (Implement line-history
>     search (git log -L), 2013-03-28) and 5404c116aa (diff: activate
>     diff.renames by default, 2016-02-25).

s/\.$/ are about 3 years apart&/ or something like that to make what follows the semicolon a full sentence?

Previous: SZEDER Gábor
Message 13 of 13 in “line-log: avoid unnecessary full tree diffs”
  1. 0/2 line-log: avoid unnecessary full tree diffsSZEDER Gábor, Aug 21, 2019
  2. 1/2 line-log: extract pathspec parsing from line ranges into a helper functionSZEDER Gábor, Aug 21, 2019
  3. 2/2 line-log: avoid unnecessary full tree diffsSZEDER Gábor, Aug 21, 2019
  4. Derrick StoleeAug 21, 2019
  5. SZEDER GáborAug 21, 2019
  6. Derrick StoleeAug 21, 2019
  7. SZEDER GáborAug 22, 2019
  8. Derrick StoleeAug 22, 2019
  9. Junio C HamanoAug 22, 2019
  10. SZEDER GáborAug 22, 2019
  11. Derrick StoleeAug 22, 2019
  12. SZEDER GáborAug 23, 2019
  13. Junio C HamanoAug 21, 2019

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.