Subject: Re: [PATCH v3 18/44] refs: move transaction functions into common code

From: Michael Haggerty <[email-masked]>
Date: Tue, 13 Oct 2015 08:15:57 +0200

On 10/12/2015 11:51 PM, David Turner wrote:
> The common ref code will build up a ref transaction.  Backends will
> then commit it.  So the transaction creation and update functions should
> be in the common code.  We also need to move the ref structs into
> the common code so that alternate backends can access them.
> 
> Later, we will modify struct ref_update to support alternate backends.

This patch leaks internal implementation details into the public refs
interface. I want to make sure that code elsewhere in Git treats these
structures as opaque. That is why I suggested creating an extra module
to hold "protected" code for the reference backend "class hierarchy" [1].

For a sketch of what my suggestion would look like, see the two commits
at the tip of branch "refs-be-common" on my GitHub repo [2].

Michael

[1] http://article.gmane.org/gmane.comp.version-control.git/279049
[2] https://github.com/mhagger/git

-- 
Michael Haggerty
[email-masked]