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

Re: [PATCH 7/7] merge: add --rename-notes

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2016, 17:17 UTC
Message-ID
<xmqq60ylwn2x.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACsJy8D3-i4UpavWZz0QU6oJE3AK06ugjPPTMOtqUA+Sa7==qQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> The problem with indexing notes tree by blob is how the user will
> manage it.

I do not think they have to be incompatible goals. Allowing the user to specify "at this commit, this path was moved to that path" may be a good thing. But at the same time, using a better data structure at runtime is also important.

Unless I am reading your "cache" code wrong, it is always reading a flat list of unsorted "<blob> to <blob>" entries describing everything that happened in the entire history of the project into core, and then forcing the low-level code to find the entries relevant to the change in the commit it is looking at at runtime.

The way the "cache" code stores and forces the runtime to use the data makes it proportional to the size of the history of the project (here I am assuming uniform "rename density" across history, the longer the history of a project, the more renames there would be) to find the manually defined renames just to show a single change, no?

What was disappointing is that the way the rename notes is used during 'log -M' traversal is an example of a good design. When showing a single commit, the cost the code pays to get to the data for a single commit out of the rename notes tree does not grow proportional to the size of the history.

Previous: Duy Nguyen
Message 20 of 20 in “Diff rename, manual correction, round 2”
  1. 0/7 Diff rename, manual correction, round 2Nguyễn Thái Ngọc Duy, Jan 20, 2016
  2. 1/7 diff-no-index: do not take a redundant prefix argumentNguyễn Thái Ngọc Duy, Jan 20, 2016
  3. 2/7 diff.c: take "prefix" argument in diff_opt_parse()Nguyễn Thái Ngọc Duy, Jan 20, 2016
  4. Junio C HamanoJan 20, 2016
  5. Jeff KingJan 20, 2016
  6. Junio C HamanoJan 20, 2016
  7. Duy NguyenJan 21, 2016
  8. Junio C HamanoJan 21, 2016
  9. 3/7 diff: add --rename-fileNguyễn Thái Ngọc Duy, Jan 20, 2016
  10. Junio C HamanoJan 20, 2016
  11. Junio C HamanoJan 20, 2016
  12. 4/7 log: add --rename-notes to correct renames per commitNguyễn Thái Ngọc Duy, Jan 20, 2016
  13. Junio C HamanoJan 20, 2016
  14. Duy NguyenJan 22, 2016
  15. 5/7 merge: add --rename-fileNguyễn Thái Ngọc Duy, Jan 20, 2016
  16. 6/7 diffcore-rename: allow to say "rename this blob to that blob"Nguyễn Thái Ngọc Duy, Jan 20, 2016
  17. 7/7 merge: add --rename-notesNguyễn Thái Ngọc Duy, Jan 20, 2016
  18. Junio C HamanoJan 21, 2016
  19. Duy NguyenJan 22, 2016
  20. Junio C HamanoJan 22, 2016

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.