git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David A. Wheeler" <dwheeler@dwheeler.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Paul Jackson <pj@sgi.com>, Morten Welinder <mwelinder@gmail.com>,
	mj@ucw.cz, git@vger.kernel.org
Subject: Re: Storing permissions
Date: Sun, 17 Apr 2005 02:22:10 -0400	[thread overview]
Message-ID: <42620092.9040402@dwheeler.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0504162138020.7211@ppc970.osdl.org>

Linus Torvalds wrote:
> 
> On Sat, 16 Apr 2005, Paul Jackson wrote:
> 
>>Morten wrote:
>>
>>>It makes some sense in principle, but without storing what they mean
>>>(i.e., group==?) it certainly makes no sense. 
>>
>>There's no "they" there.
>>
>>I think Martin's proposal, to which I agreed, was to store a _single_
>>bit.  If any of the execute permissions of the incoming file are set,
>>then the bit is stored ON, else it is stored OFF.  On 'checkout', if the
>>bit is ON, then the file permission is set mode 0777 (modulo umask),
>>else it is set mode 0666 (modulo umask).
> 
> 
> I think I agree.
> 
> Anybody willing to send me a patch? One issue is that if done the obvious
> way it's an incompatible change, and old tree objects won't be valid any
> more. It might be ok to just change the "compare cache" check to only care
> about a few bits, though: S_IXUSR and S_IFDIR.

There's a minor reason to write out ALL the perm bit data, but
only care about a few bits coming back in: Some people use
SCM systems as a generalized backup system, so you can back up
your system to an arbitrary known state in the past
(e.g., "Change my /etc files to the state I was at
just before I installed that &*#@ program!").
For more on this, see:
  http://www.onlamp.com/pub/a/onlamp/2005/01/06/svn_homedir.html

If you store all the bits, then you CAN restore things
more exactly the way they were.  This is imperfect, since
it doesn't cover more exotic permission
values from SELinux, xattrs, whatever.  For some, that's enough.

Yeah, I know, not the main purpose of git.  But what the heck,
I _like_ flexible infrastructures.

--- David A. Wheeler


  parent reply	other threads:[~2005-04-17  6:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-16 23:00 Storing permissions Martin Mares
2005-04-16 23:19 ` Paul Jackson
2005-04-16 23:42   ` Junio C Hamano
2005-04-17  0:03     ` Paul Jackson
2005-04-17  5:00       ` David A. Wheeler
2005-04-17  1:01 ` Morten Welinder
2005-04-17  1:30   ` Paul Jackson
2005-04-17  4:48     ` Linus Torvalds
2005-04-17  5:32       ` Paul Jackson
2005-04-17  5:37       ` Linus Torvalds
2005-04-17  6:22       ` David A. Wheeler [this message]
2005-04-17  8:13         ` Paul Jackson
2005-04-17 14:51         ` Daniel Barkalow
2005-04-17 16:10         ` Linus Torvalds
2005-04-17 16:21           ` David A. Wheeler
2005-04-17 22:15             ` Symlinks [was Re: Storing permissions] Morten Welinder
2005-12-07 14:56             ` dotfile support Zack Brown
2005-12-07 15:28               ` Andreas Ericsson
2005-12-07 16:11                 ` Zack Brown
2005-12-07 21:51                   ` Petr Baudis
2005-12-07 15:43               ` Johannes Schindelin
2005-12-07 17:43               ` Junio C Hamano
2005-12-07 18:19                 ` Zack Brown
2005-12-07 19:05                   ` Junio C Hamano
2005-12-08  0:47               ` H. Peter Anvin

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=42620092.9040402@dwheeler.com \
    --to=dwheeler@dwheeler.com \
    --cc=git@vger.kernel.org \
    --cc=mj@ucw.cz \
    --cc=mwelinder@gmail.com \
    --cc=pj@sgi.com \
    --cc=torvalds@osdl.org \
    /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).