All of lore.kernel.org
 help / color / mirror / Atom feed
* undocumented core.sharedRepository=2 set by git init --shared=world
@ 2015-07-06 19:25 Joey Hess
  2015-07-07  6:44 ` Torsten Bögershausen
  2015-07-07  8:14 ` Johannes Schindelin
  0 siblings, 2 replies; 6+ messages in thread
From: Joey Hess @ 2015-07-06 19:25 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

joey@darkstar:~/tmp>git init --shared=world testrepo
Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/
joey@darkstar:~/tmp>grep shared testrepo/.git/config 
	sharedrepository = 2

This magic value of 2 seems to be undocumented, as is the magic value of 1
that's equvilant to "group".

I think it would be better to have git init put in "world" or "group" and not
these magic values. Anyway, I suppose they ought to be documented too.

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: undocumented core.sharedRepository=2 set by git init --shared=world
  2015-07-06 19:25 undocumented core.sharedRepository=2 set by git init --shared=world Joey Hess
@ 2015-07-07  6:44 ` Torsten Bögershausen
  2015-07-07  8:14 ` Johannes Schindelin
  1 sibling, 0 replies; 6+ messages in thread
From: Torsten Bögershausen @ 2015-07-07  6:44 UTC (permalink / raw)
  To: Joey Hess, git

On 2015-07-06 21.25, Joey Hess wrote:
> joey@darkstar:~/tmp>git init --shared=world testrepo
> Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/
> joey@darkstar:~/tmp>grep shared testrepo/.git/config 
> 	sharedrepository = 2
> 
> This magic value of 2 seems to be undocumented, as is the magic value of 1
> that's equvilant to "group".
> 
> I think it would be better to have git init put in "world" or "group" and not
> these magic values. 
Thanks for the report.
Changing the behavior of Git may cause problems with
- older versions of Git
- Other implementations of Git, like JGit, libgit2, ...

Did you check what these implementations do ?

Anyway, I suppose they ought to be documented too.
> 
Yes.
Do you want to send a patch ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: undocumented core.sharedRepository=2 set by git init --shared=world
  2015-07-06 19:25 undocumented core.sharedRepository=2 set by git init --shared=world Joey Hess
  2015-07-07  6:44 ` Torsten Bögershausen
@ 2015-07-07  8:14 ` Johannes Schindelin
  2015-07-07  9:10   ` John Keeping
  1 sibling, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2015-07-07  8:14 UTC (permalink / raw)
  To: Joey Hess; +Cc: git

Hi Joey,

On 2015-07-06 21:25, Joey Hess wrote:
> joey@darkstar:~/tmp>git init --shared=world testrepo
> Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/
> joey@darkstar:~/tmp>grep shared testrepo/.git/config 
> 	sharedrepository = 2
> 
> This magic value of 2 seems to be undocumented, as is the magic value of 1
> that's equvilant to "group".
> 
> I think it would be better to have git init put in "world" or "group" and not
> these magic values. Anyway, I suppose they ought to be documented too.

The rationale can be found here: https://github.com/git/git/blob/v2.4.5/builtin/init-db.c#L413-L418

		/* We do not spell "group" and such, so that
		 * the configuration can be read by older version
		 * of git. Note, we use octal numbers for new share modes,
		 * and compatibility values for PERM_GROUP and
		 * PERM_EVERYBODY.
		 */

I am sympathetic to your wish, of course, and I am sure that you understand why we cannot simply break other people's setups to satisfy it.

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: undocumented core.sharedRepository=2 set by git init --shared=world
  2015-07-07  8:14 ` Johannes Schindelin
@ 2015-07-07  9:10   ` John Keeping
  2015-07-07 11:32     ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: John Keeping @ 2015-07-07  9:10 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Joey Hess, git

On Tue, Jul 07, 2015 at 10:14:28AM +0200, Johannes Schindelin wrote:
> Hi Joey,
> 
> On 2015-07-06 21:25, Joey Hess wrote:
> > joey@darkstar:~/tmp>git init --shared=world testrepo
> > Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/
> > joey@darkstar:~/tmp>grep shared testrepo/.git/config 
> > 	sharedrepository = 2
> > 
> > This magic value of 2 seems to be undocumented, as is the magic value of 1
> > that's equvilant to "group".
> > 
> > I think it would be better to have git init put in "world" or "group" and not
> > these magic values. Anyway, I suppose they ought to be documented too.
> 
> The rationale can be found here:
> https://github.com/git/git/blob/v2.4.5/builtin/init-db.c#L413-L418
> 
> 		/* We do not spell "group" and such, so that
> 		 * the configuration can be read by older version
> 		 * of git. Note, we use octal numbers for new share modes,
> 		 * and compatibility values for PERM_GROUP and
> 		 * PERM_EVERYBODY.
> 		 */
> 
> I am sympathetic to your wish, of course, and I am sure that you
> understand why we cannot simply break other people's setups to satisfy
> it.

That comment was added in 94df250 (shared repository: optionally allow
reading to "others"., 2006-06-09) which was in 1.4.1.  I suspect that is
now sufficiently old that it no longer matters.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: undocumented core.sharedRepository=2 set by git init --shared=world
  2015-07-07  9:10   ` John Keeping
@ 2015-07-07 11:32     ` Johannes Schindelin
  2015-07-07 11:52       ` John Keeping
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2015-07-07 11:32 UTC (permalink / raw)
  To: John Keeping; +Cc: Joey Hess, git

Hi John,

On 2015-07-07 11:10, John Keeping wrote:
> On Tue, Jul 07, 2015 at 10:14:28AM +0200, Johannes Schindelin wrote:
>> Hi Joey,
>>
>> On 2015-07-06 21:25, Joey Hess wrote:
>> > joey@darkstar:~/tmp>git init --shared=world testrepo
>> > Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/
>> > joey@darkstar:~/tmp>grep shared testrepo/.git/config
>> > 	sharedrepository = 2
>> >
>> > This magic value of 2 seems to be undocumented, as is the magic value of 1
>> > that's equvilant to "group".
>> >
>> > I think it would be better to have git init put in "world" or "group" and not
>> > these magic values. Anyway, I suppose they ought to be documented too.
>>
>> The rationale can be found here:
>> https://github.com/git/git/blob/v2.4.5/builtin/init-db.c#L413-L418
>>
>> 		/* We do not spell "group" and such, so that
>> 		 * the configuration can be read by older version
>> 		 * of git. Note, we use octal numbers for new share modes,
>> 		 * and compatibility values for PERM_GROUP and
>> 		 * PERM_EVERYBODY.
>> 		 */
>>
>> I am sympathetic to your wish, of course, and I am sure that you
>> understand why we cannot simply break other people's setups to satisfy
>> it.
> 
> That comment was added in 94df250 (shared repository: optionally allow
> reading to "others"., 2006-06-09) which was in 1.4.1.  I suspect that is
> now sufficiently old that it no longer matters.

I understand your point of view. With my maintainer hat on I have to say, though, that things like that require a major version change. Users tend to appreciate such a careful maintenance.

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: undocumented core.sharedRepository=2 set by git init --shared=world
  2015-07-07 11:32     ` Johannes Schindelin
@ 2015-07-07 11:52       ` John Keeping
  0 siblings, 0 replies; 6+ messages in thread
From: John Keeping @ 2015-07-07 11:52 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Joey Hess, git

On Tue, Jul 07, 2015 at 01:32:13PM +0200, Johannes Schindelin wrote:
> Hi John,
> 
> On 2015-07-07 11:10, John Keeping wrote:
> > On Tue, Jul 07, 2015 at 10:14:28AM +0200, Johannes Schindelin wrote:
> >> Hi Joey,
> >>
> >> On 2015-07-06 21:25, Joey Hess wrote:
> >> > joey@darkstar:~/tmp>git init --shared=world testrepo
> >> > Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/
> >> > joey@darkstar:~/tmp>grep shared testrepo/.git/config
> >> > 	sharedrepository = 2
> >> >
> >> > This magic value of 2 seems to be undocumented, as is the magic value of 1
> >> > that's equvilant to "group".
> >> >
> >> > I think it would be better to have git init put in "world" or "group" and not
> >> > these magic values. Anyway, I suppose they ought to be documented too.
> >>
> >> The rationale can be found here:
> >> https://github.com/git/git/blob/v2.4.5/builtin/init-db.c#L413-L418
> >>
> >> 		/* We do not spell "group" and such, so that
> >> 		 * the configuration can be read by older version
> >> 		 * of git. Note, we use octal numbers for new share modes,
> >> 		 * and compatibility values for PERM_GROUP and
> >> 		 * PERM_EVERYBODY.
> >> 		 */
> >>
> >> I am sympathetic to your wish, of course, and I am sure that you
> >> understand why we cannot simply break other people's setups to satisfy
> >> it.
> > 
> > That comment was added in 94df250 (shared repository: optionally allow
> > reading to "others"., 2006-06-09) which was in 1.4.1.  I suspect that is
> > now sufficiently old that it no longer matters.
> 
> I understand your point of view. With my maintainer hat on I have to
> say, though, that things like that require a major version change.
> Users tend to appreciate such a careful maintenance.

However, there has been a major version since the new syntax was
introduced (in the same commit mentioned above), so this only affects
users who initialize a repository with (say) 2.6.0 or later and then try
to use 1.4.0 or earlier to operate on it.

That means using two versions of Git released more than 9 years apart to
operate on the same repository.  IMHO even careful maintenance can
declare that an unsupported configuration.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-07 11:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-06 19:25 undocumented core.sharedRepository=2 set by git init --shared=world Joey Hess
2015-07-07  6:44 ` Torsten Bögershausen
2015-07-07  8:14 ` Johannes Schindelin
2015-07-07  9:10   ` John Keeping
2015-07-07 11:32     ` Johannes Schindelin
2015-07-07 11:52       ` John Keeping

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.