From: "Josh England" <jjengla@sandia.gov>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "David Kastrup" <dak@gnu.org>,
"Junio C Hamano" <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: tracking perms/ownership
Date: Fri, 24 Aug 2007 01:38:53 -0600 [thread overview]
Message-ID: <1187941133.6357.75.camel@beauty> (raw)
In-Reply-To: <alpine.LFD.0.999.0708232327100.25853@woody.linux-foundation.org>
On Thu, 2007-08-23 at 23:37 -0700, Linus Torvalds wrote:
>
> On Fri, 24 Aug 2007, David Kastrup wrote:
> > >
> > > So handling ownership outside of the actual filesystem, in a
> > > separate file that git tracks, actually allows you to do things that
> > > you couldn't otherwise sanely do.
> >
> > Well, about that "sane" bit: I don't see an application for tracking
> > unrestorable ownership values.
>
> Umm. Like an RPM spec file?
>
> The thing you "don't see an application" for is exactly the kind of things
> that people very much ALREADY DO.
>
> There are tons of different setups for setting up user and group ownership
> (and things like permission) in almost any project. And I can pretty much
> *guarantee* you that none of them depend on actually having ownership on
> the files themselves.
>
> In git, just for fun, do
>
> git grep defattr
>
> or even just look into the Makefile, and think about what lines like that
>
> $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'
>
> thing means, and why it has a "755" there, and why other Makefiles quite
> often have things like "-o bin" etc on such lines!
Yes. Permission bits are useful. I wouldn't want a umask clobbering
some /bin directory to 0644 or some such.
> See? Those ownership things are restorable *as*root*, but that doesn't
> mean that everybody should do development as root. In fact, I'd argue
> that any system that is set up so that you have to develop and merge
> things while being root is pretty damn broken.
If your repository is a full system image (my extreme case), developing
as root (installing packages, altering configs) is *required* if you
expect the image to boot/behave properly. Squashing ownership in this
case would undoubtedly break many things.
> Which means that any such environment *has* to encode the owndership
> *separately* from the actual filesystem ownership. Because doing it in the
> filesystem simply isn't sane.
>
> So yes, you could have an insane piece of crap that actually tracks file
> ownership in the filesystem, and requires people to be root.
This is what I've done with SVN. The mechanisms to save/restore
perms/ownership can be run as hooks before checkin and after checkout.
The performance is pretty depressing even without running those hooks
every time. I'm just hoping that using .gitattribues will perform
reasonably well.
> Or you could use a ".gitattributes" file or similar _external_ tracking
> method that allows even people who cannot actually set ownership to work
> with it.
Yes, although it would be nice if a clone or a pull tells me (running as
a user) that the ownership being set doesn't match the uid/gid in the
attribute file. Element of least surprise. For those actually
requesting the behavior, a little extra verbosity seems pretty
acceptable.
-JE
next prev parent reply other threads:[~2007-08-24 7:38 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-21 17:14 empty directories Josh England
2007-08-21 17:40 ` Sean
2007-08-22 21:25 ` Josh England
2007-08-22 23:25 ` Linus Torvalds
2007-08-22 23:55 ` David Kastrup
2007-08-23 15:24 ` Josh England
2007-08-23 21:51 ` tracking perms/ownership [was: empty directories] Josh England
2007-08-23 22:08 ` tracking perms/ownership Junio C Hamano
2007-08-23 23:30 ` Linus Torvalds
2007-08-24 6:16 ` David Kastrup
2007-08-24 6:37 ` Linus Torvalds
2007-08-24 7:38 ` Josh England [this message]
2007-08-24 7:50 ` David Kastrup
2007-08-24 17:51 ` Linus Torvalds
2007-08-24 18:15 ` Josh England
2007-08-24 18:23 ` Linus Torvalds
2007-08-24 18:56 ` Josh England
2007-08-24 20:37 ` Junio C Hamano
2007-08-24 21:26 ` Josh England
2007-08-24 19:33 ` Robin Rosenberg
2007-08-24 21:30 ` David Kastrup
2007-08-24 7:22 ` Josh England
2007-08-24 7:39 ` Junio C Hamano
2007-08-24 8:19 ` Josh England
2007-08-24 16:11 ` Josh England
2007-08-24 16:27 ` Josh England
2007-08-24 9:38 ` tracking perms/ownership [was: empty directories] Johannes Schindelin
2007-08-24 9:52 ` Jeff King
2007-08-24 15:50 ` Josh England
2007-08-24 20:58 ` Jeff King
2007-08-25 14:31 ` Johannes Schindelin
2007-08-25 14:46 ` tracking perms/ownership Junio C Hamano
2007-08-25 19:35 ` Junio C Hamano
2007-08-24 10:05 ` tracking perms/ownership [was: empty directories] Jeff King
2007-08-25 14:30 ` Johannes Schindelin
2007-08-24 17:10 ` empty directories Jason Garber
2007-08-22 23:40 ` Jakub Narebski
2007-08-22 0:06 ` Jakub Narebski
2007-08-22 4:31 ` Salikh Zakirov
2007-08-22 18:46 ` Linus Torvalds
2007-08-22 19:12 ` David Kastrup
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=1187941133.6357.75.camel@beauty \
--to=jjengla@sandia.gov \
--cc=dak@gnu.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linux-foundation.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).