Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-06 Thread Shawn Pearce
On Wed, Jan 6, 2016 at 4:52 AM, Duy Nguyen wrote: > On Wed, Dec 23, 2015 at 8:34 PM, Michael Haggerty > wrote: >> On 12/03/2015 01:35 AM, David Turner wrote: >>> diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt >>> index 8174d27..9ea6753 100644 >>> --- a/Documentation/git-ini

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-06 Thread Duy Nguyen
On Wed, Dec 23, 2015 at 8:34 PM, Michael Haggerty wrote: > On 12/03/2015 01:35 AM, David Turner wrote: >> diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt >> index 8174d27..9ea6753 100644 >> --- a/Documentation/git-init.txt >> +++ b/Documentation/git-init.txt >> @@ -12,7 +12,7

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-06 Thread Michael Haggerty
On 01/05/2016 07:03 PM, Junio C Hamano wrote: > David Turner writes: > >> I'm working on the rest now, but wanted to comment on this first. I >> went ahead and made this change, but I'm not sure I like it. In the >> git codebase, the concept will continue to be called "backend"; there >> are al

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-05 Thread David Turner
On Tue, 2016-01-05 at 10:03 -0800, Junio C Hamano wrote: > David Turner writes: > > > I'm working on the rest now, but wanted to comment on this first. > > I > > went ahead and made this change, but I'm not sure I like it. In > > the > > git codebase, the concept will continue to be called "ba

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-05 Thread Junio C Hamano
David Turner writes: > I'm working on the rest now, but wanted to comment on this first. I > went ahead and made this change, but I'm not sure I like it. In the > git codebase, the concept will continue to be called "backend"; there > are already-accepted patches using that terminology. Having

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-05 Thread David Turner
On Wed, 2015-12-23 at 14:34 +0100, Michael Haggerty wrote: > On 12/03/2015 01:35 AM, David Turner wrote: > > git init learns a new argument --refs-backend-type. Presently, > > only > > "files" is supported, but later we will add other backends. > > > > When this argument is used, the repository's

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-23 Thread Jeff King
On Wed, Dec 23, 2015 at 10:52:41AM +0100, Michael Haggerty wrote: > On 12/05/2015 08:44 AM, Jeff King wrote: > > [...] > > I think the config option needs to be extensions.refsBackendType, too, > > per the logic in 00a09d5 (introduce "extensions" form of > > core.repositoryformatversion, 2015-06-2

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-23 Thread Michael Haggerty
On 12/03/2015 01:35 AM, David Turner wrote: > git init learns a new argument --refs-backend-type. Presently, only > "files" is supported, but later we will add other backends. > > When this argument is used, the repository's core.refsBackendType > configuration value is set, and the refs backend'

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-23 Thread Michael Haggerty
On 12/05/2015 08:44 AM, Jeff King wrote: > [...] > I think the config option needs to be extensions.refsBackendType, too, > per the logic in 00a09d5 (introduce "extensions" form of > core.repositoryformatversion, 2015-06-23). And I guess it needs to bump > core.repositoryformatversion to "1". I th

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-10 Thread David Turner
On Thu, 2015-12-10 at 13:02 -0500, Jeff King wrote: > On Wed, Dec 02, 2015 at 07:35:18PM -0500, David Turner wrote: > > > @@ -510,9 +511,36 @@ int validate_headref(const char *path) > > unsigned char sha1[20]; > > int fd; > > ssize_t len; > > + struct refdb_config_data refdb_data = {

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-10 Thread Jeff King
On Wed, Dec 02, 2015 at 07:35:18PM -0500, David Turner wrote: > @@ -510,9 +511,36 @@ int validate_headref(const char *path) > unsigned char sha1[20]; > int fd; > ssize_t len; > + struct refdb_config_data refdb_data = {NULL, NULL}; > + > + if (lstat(path, &st) < 0) { > +

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-07 Thread David Turner
On Sat, 2015-12-05 at 02:44 -0500, Jeff King wrote: > On Sat, Dec 05, 2015 at 07:30:13AM +0100, Duy Nguyen wrote: > > > On Thu, Dec 3, 2015 at 1:35 AM, David Turner > > wrote: > > > git init learns a new argument --refs-backend-type. Presently, only > > > "files" is supported, but later we will

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-04 Thread Jeff King
On Sat, Dec 05, 2015 at 07:30:13AM +0100, Duy Nguyen wrote: > On Thu, Dec 3, 2015 at 1:35 AM, David Turner wrote: > > git init learns a new argument --refs-backend-type. Presently, only > > "files" is supported, but later we will add other backends. > > > > When this argument is used, the reposi

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-04 Thread Duy Nguyen
On Thu, Dec 3, 2015 at 1:35 AM, David Turner wrote: > git init learns a new argument --refs-backend-type. Presently, only > "files" is supported, but later we will add other backends. > > When this argument is used, the repository's core.refsBackendType > configuration value is set, and the refs

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-04 Thread Junio C Hamano
David Turner writes: > diff --git a/setup.c b/setup.c > index d343725..de6b8ac 100644 > --- a/setup.c > +++ b/setup.c > @@ -1,5 +1,6 @@ > #include "cache.h" > #include "dir.h" > +#include "refs.h" > #include "string-list.h" > > static int inside_git_dir = -1; > @@ -263,6 +264,15 @@ int get_