From: Samuel Tardieu <sam@rfc1149.net>
To: Heikki Orsila <heikki.orsila@iki.fi>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Make core.sharedRepository more generic
Date: Sat, 12 Apr 2008 21:15:03 +0200 [thread overview]
Message-ID: <2008-04-12-21-15-04+trackit+sam@rfc1149.net> (raw)
In-Reply-To: <20080412185105.GA14331@zakalwe.fi> (Heikki Orsila's message of "Sat\, 12 Apr 2008 21\:51\:05 +0300")
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;
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.
Sam
--
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/
next prev parent reply other threads:[~2008-04-12 19:16 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 [this message]
2008-04-12 19:46 ` Heikki Orsila
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=2008-04-12-21-15-04+trackit+sam@rfc1149.net \
--to=sam@rfc1149.net \
--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).