On 09/07/2016 09:20 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> This is v2 of the patch series to virtualize the references API
>> (though earlier patch series similar in spirit were submitted by
>> Ronnie Sahlberg and David Turner). Thanks to Junio, Eric, and Ramsay
>> for their comments about v1 [1].
>>
>> Nobody pointed out any fundamental problems with v1, but this version
>> includes the following improvements:
>
> Curiously, many of these improvements were already in 'pu'.
I pushed some of these changes to GitHub a while ago and mentioned that
fact on the mailing list [1]; I assume you fetched from there. But I was
waiting for the dust to settle from the earlier patch series and the
2.10 release before sending them to the mailing list again.
>> * In "refs: add methods for reflog":
>>
>> * Don't export `files_reflog_iterator_begin()` (suggested by
>> Ramsay).
>
> This I can see was missing in what has been in 'pu'.
And according to your "What's cooking", you were waiting on this change
before proceeding.
FYI: I haven't done significant work on any next steps, which IMO could
go in many possible directions:
* Splitting loose and packed refs storage into two separate ref_store
subclasses that are joined together using some kind of
overlay_ref_store. This is not necessarily a blocker for the following
ideas, but the overlay_ref_store would make it easier to construct other
hybrid ref-stores, as for example the ubiquitous "most references are
stored in main repo; per-worktree refs are stored in worktree".
* Implementing reference caching as a ref_store that "writes through"
changes to a backing reference store. This is also not a blocker for
other ideas, but it would allow reference caching easily to be turned
on/off for other reference stores (or even disabled for packed/loose
reference storage during command invocations that know they won't have
to iterate over references more than once).
* A variant of loose reference storage that encodes the reference names
somehow before turning them into filenames (1) to make refnames
independent of filesystem path-name encoding issues, and (2) to
eliminate D/F conflicts, thereby allowing reflogs to be retained after a
reference is deleted.
* A reference backend based on LMDB (or any other key-value store).
* A reference backend based on Shawn Pearce's RefTree proposal or
something like it [2].
It's uncertain when I'll next have a chunk of time to work on any of these.
Michael
[1] http://public-inbox.org/git/575990fb.5000...@alum.mit.edu/
[2]
http://public-inbox.org/git/CAJo=hjvnapnaddcaawavu9c4rveqdos3ev9wtguhx4fd0v_...@mail.gmail.com/t