Cc: Junio C Hamano <gitster@...>, Johannes Schindelin <Johannes.Schindelin@...>, martin f krafft <madduck@...>, <git@...>, Thomas Harning Jr. <harningt@...>, Francis Moreau <francis.moro@...>, Nicolas Vilz <niv@...>, David <david@...>
I'm still a little unclear on how much work this program would then have
to do. it's problably my lack of understanding that's makeing this sound
much scarier.
so what would this program be given?
it sounds like it would be called once for the entire tree checkout
would it be handed just the start and end commits and query git for
everything else it needs?
it sounds like there is more then this, you refer to git fully crafting
the new index.
so would this program be accessing an old and new index and do the
comparison between the two?
or would git feed it a list of what's changed and then have it query git
to find the details of the changes.
right, we don't want conflict markers on mode bits or other ACL type
things, that way lies madness ;)
the permissions and ACL's can be queried directly from the filesystem, so
I don't see any security problems with writing the permission file to the
filesystem.
changing the permissions would be done by changing the files themselves
(when you are running as root on a filesystem that supports the changes,
otherwise it would need to fall back to writing the file and getting the
changes there, but that should be able to be a local config option)
I don't like the idea of having a file that doesn't appear on the local
filesystem at any point, it just makes troubleshooting too hard.
right, and the same thing if the filesystem doesn't support something in
the permission file.
if so this means that the permission changing program definantly needs to
operate on the diff of the permisison file, not on the absolute file. this
complicates things slightly, but it shouldn't be too bad.
changing topic slightly.
I know git has pre-commit hooks, but I've never needed to use them.
at what point can you hook in?
can you define a hook that runs when you do a git-add? or only when you do
a git-commit?
the reason I'm asking is to try and figure out when and how to create the
permissions file. when I was thinking in terms of dealing with the
permissions as a single bog block it wasn't that bad to say that at
git-commit time you have to scan every file and check it's permissions to
record them into the file, but with the push for the optimizations that
you're talking about this is no longer reasonable and it really should be
done when the file is added to the index.
on a related note, if this is implemented as a per-write hook then it
makes a lot of sense to have the permission file be per-directory, but if
we do a per-checkout hook like you are suggesting then the permission file
may make more sense as a single file in the top-level directory.
thoughts?
David Lang
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html