Re: [PATCH v3 18/44] refs: move transaction functions into common code
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Oct 13, 2015, 06:15 UTC
- Message-ID
- <561CA19D.4050404@alum.mit.edu>
- In-Reply-To
- <1444686725-27660-19-git-send-email-dturner@twopensource.com>
On 10/12/2015 11:51 PM, David Turner wrote:
Show 6 quoted lines
> 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 mhagger@alum.mit.edu