From: Heikki Orsila <shdl@zakalwe.fi>
To: Samuel Tardieu <sam@rfc1149.net>
Cc: Heikki Orsila <heikki.orsila@iki.fi>, git@vger.kernel.org
Subject: Re: [PATCH] Make core.sharedRepository more generic
Date: Sat, 12 Apr 2008 22:46:34 +0300 [thread overview]
Message-ID: <20080412194634.GG31039@zakalwe.fi> (raw)
In-Reply-To: <2008-04-12-21-15-04+trackit+sam@rfc1149.net>
On Sat, Apr 12, 2008 at 09:15:03PM +0200, Samuel Tardieu wrote:
> The use of named constants vs. literals seem inconsistent in your
> patch, compare
>
> | + mode = (mode & ~0777) | shared_repository;
>
> to
>
> | + mode |= (shared_repository & 0600) ? S_IXUSR : 0;
> | + mode |= (shared_repository & 0060) ? S_IXGRP : 0;
> | + mode |= (shared_repository & 0006) ? S_IXOTH : 0;
>
> I first thought that you were using literals with "shared_repository"
> and named constants with mode but the first line I quoted shows that
> this is not the case.
>
> Btw, aren't those last three lines better replaced by
>
> /* Copy read bits to execute bits */
> mode |= (shared_repository & 0444) >> 2;
Agreed on both previous points. Will submit a new patch.
> I don't see where you deal with executable files.
> Also, wouldn't it be more consistent to use a negative value to
> --shared, that is a umask-compatible one, rather than a positive value
> which needs to be tweaked for directories and executable files? You
> would only have to "&" 0666 or 0777 with "~perms" to get the right
> permissions.
>
> --shared=0007 would be equivalent to PERM_GROUP, --shared=0027 to
> group-readable-but-not-writable, and --shared=0002 to PERM_EVERYBODY.
I see the point, but I like to think it as a chmod value rather than a
umask value.
--
Heikki Orsila
heikki.orsila@iki.fi
http://www.iki.fi/shd
next prev parent reply other threads:[~2008-04-12 19:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-12 18:51 [PATCH] Make core.sharedRepository more generic Heikki Orsila
2008-04-12 18:56 ` Heikki Orsila
2008-04-12 19:15 ` Samuel Tardieu
2008-04-12 19:46 ` Heikki Orsila [this message]
2008-04-12 19:50 ` Heikki Orsila
2008-04-12 22:20 ` Samuel Tardieu
-- strict thread matches above, loose matches on Subject: below --
2008-04-15 9:13 Heikki Orsila
2008-04-16 5:22 ` Junio C Hamano
2008-04-16 8:34 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=20080412194634.GG31039@zakalwe.fi \
--to=shdl@zakalwe.fi \
--cc=git@vger.kernel.org \
--cc=heikki.orsila@iki.fi \
--cc=sam@rfc1149.net \
/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).