Subject: [PATCH v2 00/38] Virtualization of the refs API

From: Michael Haggerty <[email-masked]>
Date: Sun, 4 Sep 2016 18:08:06 +0200

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:

* In "rename_ref_available(): add docstring":

  * Improve docstring as suggested by Junio.

* In "refs: create a base class "ref_store" for files_ref_store":

  * Let main_ref_store and submodule_ref_stores be initialized
    implicitly rather than initializing them explicitly to NULL.

  * Add docstrings for those two variables.

  * Eliminate a temporary variable in `files_downcast()`.

* In "resolve_gitlink_ref(): avoid memory allocation in many cases":

  * Instead of keeping track of `orig_len`, after stripping off any
    trailing slashes check whether `path[len - 1]` is NUL.

* In "refs: add methods for reflog":

  * Don't export `files_reflog_iterator_begin()` (suggested by
    Ramsay).

In addition, given that v1 was pretty old, I have rebased the patch
series against the current upstream master. (The rebase was
unproblematic.)

This patch series is also available from my GitHub fork [2] as branch
"ref-store".

Michael

[1] http://public-inbox.org/git/[email-masked]/t/
[2] https://github.com/mhagger/git

David Turner (8):
  rename_ref_available(): add docstring
  refs: add methods for reflog
  refs: add method for initial ref transaction commit
  refs: make delete_refs() virtual
  refs: add methods to init refs db
  refs: add method to rename refs
  refs: make lock generic
  refs: implement iteration over only per-worktree refs

Michael Haggerty (28):
  resolve_gitlink_ref(): eliminate temporary variable
  refs: rename struct ref_cache to files_ref_store
  refs: create a base class "ref_store" for files_ref_store
  add_packed_ref(): add a files_ref_store argument
  get_packed_ref(): add a files_ref_store argument
  resolve_missing_loose_ref(): add a files_ref_store argument
  {lock,commit,rollback}_packed_refs(): add files_ref_store arguments
  refs: reorder definitions
  resolve_packed_ref(): rename function from resolve_missing_loose_ref()
  resolve_gitlink_packed_ref(): remove function
  read_raw_ref(): take a (struct ref_store *) argument
  resolve_ref_recursively(): new function
  resolve_gitlink_ref(): implement using resolve_ref_recursively()
  resolve_gitlink_ref(): avoid memory allocation in many cases
  resolve_gitlink_ref(): rename path parameter to submodule
  refs: make read_raw_ref() virtual
  refs: make verify_refname_available() virtual
  refs: make pack_refs() virtual
  refs: make create_symref() virtual
  refs: make peel_ref() virtual
  repack_without_refs(): add a files_ref_store argument
  lock_raw_ref(): add a files_ref_store argument
  commit_ref_update(): add a files_ref_store argument
  lock_ref_for_update(): add a files_ref_store argument
  lock_ref_sha1_basic(): add a files_ref_store argument
  split_symref_update(): add a files_ref_store argument
  files_ref_iterator_begin(): take a ref_store argument
  refs: add method iterator_begin

Ronnie Sahlberg (2):
  refs: add a backend method structure
  refs: add a transaction_commit() method

 builtin/init-db.c    |  21 +-
 refs.c               | 309 +++++++++++++++++++++++++++-
 refs.h               |  13 +-
 refs/files-backend.c | 566 +++++++++++++++++++++++++++------------------------
 refs/refs-internal.h | 220 +++++++++++++++++---
 5 files changed, 812 insertions(+), 317 deletions(-)

-- 
2.9.3