Thread (82 messages) flat view 82 messages, 7 authors, 2016-06-15

Re: [PATCH v2 40/43] refs: allow ref backend to be set for clone

From: Michael Haggerty <hidden>
Date: 2016-06-15 23:06:46

On 09/29/2015 12:02 AM, David Turner wrote:
Add a new option, --refs-backend-type, to allow the ref backend type to
be set on new clones.

Submodules must use the same ref backend as the parent repository, so
we also pass the --refs-backend-type option option when cloning
submodules.
If I'm reading this correctly, you propose to add a new configuration
setting,

    core.refs-backend-type

to record which reference backend the repository is using.

(By the way, please document any new config settings in
Documentation/config.txt.)

This does not provide adequate backwards compatibility. Suppose I create
a repository with a DB backend, then later try to access the repository
using an older version of Git (or JGit or libgit2 or ...) that doesn't
know about this configuration setting. It will think it is a normal
repository that only has a couple of references (HEAD, stash, etc). If I
run `git gc` using the older version of git, *poof* all of the objects
referred to by other branches will be garbage-collected.

Therefore, I don't think this can be merged without a bump to
core.repositoryformatversion. Such a bump will tell well-behaved older
Git clients keep their hands off the repository. (Of course repositories
that use the files backend can continue using
core.repositoryformatversion 0.)

I thought Peff proposed a way to do such a bump, including a way to
extend repositories one by one with new features. But that was something
that we were chatting about off-list.

I haven't reviewed the actual code in this patch yet but I wanted to get
the above comment on your radar.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help