From: Junio C Hamano <gitster@pobox.com>
To: Heikki Orsila <heikki.orsila@iki.fi>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add two core.sharedRepository options: group-readable and world-readable
Date: Fri, 11 Apr 2008 17:53:36 -0700 [thread overview]
Message-ID: <7vfxtrnban.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080411140916.GA30667@zakalwe.fi> (Heikki Orsila's message of "Fri, 11 Apr 2008 17:09:16 +0300")
Heikki Orsila <heikki.orsila@iki.fi> writes:
> diff --git a/cache.h b/cache.h
> index 2a1e7ec..4af6d62 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -474,10 +474,14 @@ static inline void hashclr(unsigned char *hash)
>
> int git_mkstemp(char *path, size_t n, const char *template);
>
> +/* Warning: enum sharedrepo item order should not be changed since it will
> + * break backwards compatibility. */
That's not a "Warning" (which tends to mean "you can violate this if you
know what you are doing"), but should be stronger than that. Something
like (also notice the multi-line comment style --- the first line ends
with "/*\n"):
/*
* NOTE NOTE NOTE!!
*
* Do not reorder this list; numerically written core.sharedrepository
* in config files have always been valid, and you would break existing
* repositories if you move these around.
*/
> enum sharedrepo {
> PERM_UMASK = 0,
> PERM_GROUP,
> - PERM_EVERYBODY
> + PERM_EVERYBODY,
> + PERM_GROUP_READABLE,
> + PERM_WORLD_READABLE,
> };
But I have to wonder if this patch is necessary.
Neither am I convinced if this set is sufficient.
+ /*
* PERM_GROUP_READABLE: g+r
+ * PERM_GROUP: g+rw
+ * PERM_WORLD_READABLE: g+r, o+r
+ * PERM_EVERYBODY: g+rw, o+r
+ */
For example, you may want to enforce "ug+rw,o=" in a repository. How
would you do that?
Perhaps if you really wanted to have such a fine grained control, you
would be better off defining core.sharedrepository as a set/unset pair?
core.sharedrepository = 0660,007 ;# ug+rw,o-rwx
Or even stronger "set to this bit pattern"?
core.sharedrepository = 0660 ;# ug=rw,o=
(I think you would need to flip executable bit for directories if you go
this route).
next prev parent reply other threads:[~2008-04-12 0:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-11 14:09 [PATCH] Add two core.sharedRepository options: group-readable and world-readable Heikki Orsila
2008-04-12 0:53 ` Junio C Hamano [this message]
2008-04-12 3:00 ` Heikki Orsila
2008-04-12 4:48 ` Junio C Hamano
2008-04-12 9:17 ` Björn Steinbrink
2008-04-12 10:03 ` Junio C Hamano
2008-04-12 18:52 ` Heikki Orsila
2008-04-12 12:01 ` Heikki Orsila
2008-04-12 12:05 ` Heikki Orsila
-- strict thread matches above, loose matches on Subject: below --
2008-04-11 14:41 Heikki Orsila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vfxtrnban.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=heikki.orsila@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).