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

Re: [PATCH 6/6 (v4)] support for path name caching in rev-cache

From
Nicolas Pitre <nico@cam.org>
Date
Aug 21, 2009, 00:05 UTC
Message-ID
<alpine.LFD.2.00.0908201958010.6044@xanadu.home>
In-Reply-To
<c77435a80908201622o7d69681ftda0ca63c5a915f4b@mail.gmail.com>
On Fri, 21 Aug 2009, Nick Edelen wrote:
Show 29 quoted lines
> Ok we actually have a small problem, semi-related to the object
> listing.  By default rev-list will list everything not seen in each
> tree, whereas rev-cache will only list object introduced in a given
> commit.  This becomes problematic if you have two different files with
> the same content in the same tree: rev-cache will show the name of the
> youngest file; vanilla rev-list will list the name soonest encountered
> in the tree (which can even change if, e.g., a subdir is renamed so as
> to be list in a different order).
> 
> In fact, even if they're not in the same tree we could have a similar
> problem.  Commits are stored topologically in cache slices, so output
> is always in topo order.  If the same object is introduced in parallel
> branches under different names, the outputted name with `rev-list
> --all --objects` (vanilla) could be different from `rev-list --all
> --objects` (cached) could be different from `rev-list --all
> --topo-order --objects`.
> 
> This isn't feasably changable in rev-cache, as a) the cached position
> (and hence final output order) is effectively unrelated to tree
> structure, and b) commits _have_ to be ordered topologically for
> rev-cache to function.
> 
> The descrepency strikes me as something of a non-issue with
> pack-objects' deltafication, as the object will fit with either of its
> names.  It will mean that the (already sorta finicky) object names
> won't have garuanteed consistency between cached/non-cached calls to
> rev-list.  This is something of a corner case and dosn't strike me as
> a huge issue, but I figured I should consult you all before presuming
> things about git's interface.

The name is actually used only as a clue to delta similar objects together. So this is indeed a non issue, as long as the discrepency is well understood and, more importantly, properly documented. The above is certainly a good start.

Nicolas
Previous: Nick EdelenNext: Johannes Schindelin
Message 7 of 13 in “support for path name caching in rev-cache”
  1. 6/6 support for path name caching in rev-cacheNick Edelen, Aug 17, 2009
  2. Nicolas PitreAug 18, 2009
  3. Nick EdelenAug 18, 2009
  4. Nicolas PitreAug 19, 2009
  5. Nick EdelenAug 20, 2009
  6. Nick EdelenAug 20, 2009
  7. Nicolas PitreAug 21, 2009
  8. Johannes SchindelinAug 18, 2009
  9. Nick EdelenAug 18, 2009
  10. Nick EdelenAug 21, 2009
  11. Nick EdelenSep 7, 2009
  12. Nick EdelenOct 2, 2009
  13. Nick EdelenOct 19, 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.