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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]