Re: metastore

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <david@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Daniel Barkalow <barkalow@...>, martin f krafft <madduck@...>, <git@...>, Thomas Harning Jr. <harningt@...>, Francis Moreau <francis.moro@...>, Nicolas Vilz <niv@...>, David <david@...>
Subject: Re: metastore
Date: Sunday, September 16, 2007 - 4:06 am

david@lang.hm writes:


I'd rather not implement it at such a low level where a true
"checkout" happens.  For one thing, I am afraid that the special
casing will affect the normal codepath too much and would make
it into a maintenance nightmare.  But more importantly, if you
are switching between commits (this includes switching branches,
checking out a different commit to a detached HEAD, or
pulling/merging updates your HEAD and updates your work tree),
and the contents of a path does not change between the original
commit and the switched-to commit, you may still have to
"checkout" the external information for that path if your
"permission information file" are different between these two
commits.  To the underlying checkout aka "two tree merge"
operation, that kind of change is invisible and it should stay
so for performance reasons, not to harm the normal operation.
IOW, I do not want the core level to even know about the
existence of "permission information file", even the code that
implements it is well isolated, ifdefed out or made conditional
based on some config variable.

I however think your idea to have extra "permission information
file" is very interesting.  What would be more palatable, than
mucking with the core level git, would be to have an external
command that takes two tree object names that tells it what the
old and new trees our work tree is switching between, and have
that command to:

 - inspect the diff-tree output to find out what were checked
   out and might need their permission information tweaked;

 - inspect the differences between the "permission information
   file" in these trees to find out what were _not_ checked out,
   but still need their permission information tweaked.

 - tweak whatever external information you are interested in
   expressing in your "permission information file" in the work
   tree for the paths it discovered in the above two steps.
   This step may involve actions specific to projects and call
   hook scripts with <path, info from "permission information
   file" for that path> tuples to carry out the actual tweaking.

If we go that route, I am not deeply opposed to add code to
Porcelains to call that new command after they "checkout" a new
commit at the very end of their processing (namely, git-commit,
git-merge, git-am, and git-rebase).

Yes, I am very well aware that somebody already mentioned "there
is a window between the true checkout and permission tweaking".
If you need to touch the core level in order to close that
window, I am not interested.


Asking a pony for many times does not necessary make it the
right for you to have the pony.  The sane way to implement this
is in your Makefile, as Randal and other people with more
experience have already pointed out, and I happen to agree with
them.

My gut feeling is that the approach to use an external hook that
reads your "permission information file" could be done with
negligible impact to the normal operation of git.  I suspect
that the "new command" I suggested above that would run after
"checkout" actions would perform what people need to do in their
Makefiles' "install" rules (if they have the work tree vs target
tree distinction), or "post-checkout" rules (if they want to use
the work tree in-place), and not having to write/reinvent a
Makefile target for this in every project would hopefully make
it easier to use.  That is the only reason I am writing this
message on this topic.


That is a different question.  Is having an extention to help
people who want to manage perm bits a worthy goal?  Perhaps, but
it depends.  Is it worthy enough goal to complicate the really
core parts of the code and add huge maintenance burden?
Absolutely not.  Can it be made in such a way that it does not
have much impact to the core parts?  We need to see how it is
done.
-
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Track /etc directory using Git, Francis Moreau, (Thu Sep 13, 8:11 am)
Re: Track /etc directory using Git, martin f krafft, (Thu Sep 13, 8:31 am)
Re: Track /etc directory using Git, Francis Moreau, (Fri Sep 14, 4:08 am)
Re: Track /etc directory using Git, martin f krafft, (Fri Sep 14, 5:15 am)
Re: Track /etc directory using Git, Thomas Harning Jr., (Fri Sep 14, 1:31 pm)
metastore (was: Track /etc directory using Git), martin f krafft, (Sat Sep 15, 9:26 am)
Re: metastore (was: Track /etc directory using Git), Johannes Schindelin, (Sat Sep 15, 10:10 am)
Re: metastore (was: Track /etc directory using Git), martin f krafft, (Sat Sep 15, 10:54 am)
Re: metastore (was: Track /etc directory using Git), Daniel Barkalow, (Sat Sep 15, 3:56 pm)
Re: metastore (was: Track /etc directory using Git), martin f krafft, (Sun Sep 16, 2:08 am)
Re: metastore (was: Track /etc directory using Git), martin f krafft, (Tue Oct 2, 3:53 pm)
Re: metastore (was: Track /etc directory using Git), Daniel Barkalow, (Tue Oct 2, 5:02 pm)
Re: metastore, David Kastrup, (Tue Oct 2, 4:04 pm)
Re: metastore, David , (Tue Oct 2, 5:15 pm)
Re: metastore, Julian Phillips, (Tue Oct 2, 7:32 pm)
Re: metastore, , (Tue Oct 2, 8:52 pm)
Re: metastore, Johannes Schindelin, (Tue Oct 2, 8:52 pm)
Re: metastore, martin f krafft, (Tue Oct 2, 5:44 pm)
Re: metastore, , (Tue Oct 2, 4:18 pm)
Re: metastore, martin f krafft, (Tue Oct 2, 4:23 pm)
Re: metastore, , (Tue Oct 2, 4:29 pm)
Re: metastore, martin f krafft, (Tue Oct 2, 4:39 pm)
Re: metastore, , (Tue Oct 2, 4:54 pm)
Re: metastore, martin f krafft, (Tue Oct 2, 5:42 pm)
Re: metastore (was: Track /etc directory using Git), Johannes Schindelin, (Sat Sep 15, 6:14 pm)
Re: metastore (was: Track /etc directory using Git), martin f krafft, (Sun Sep 16, 2:14 am)
Re: metastore (was: Track /etc directory using Git), Jan Hudec, (Sun Sep 16, 11:51 am)
Re: metastore (was: Track /etc directory using Git), martin f krafft, (Mon Sep 17, 9:31 am)
Re: metastore (was: Track /etc directory using Git), Jan Hudec, (Sun Sep 16, 11:59 am)
Re: metastore, Junio C Hamano, (Sun Sep 16, 4:06 am)
Re: metastore, , (Sun Sep 16, 5:45 pm)
Re: metastore, Junio C Hamano, (Sun Sep 16, 6:11 pm)
Re: metastore, , (Sun Sep 16, 6:52 pm)
Re: metastore, Junio C Hamano, (Sun Sep 16, 8:58 pm)
Re: metastore, , (Sun Sep 16, 10:31 pm)
Re: metastore, Junio C Hamano, (Mon Sep 17, 12:23 am)
Re: metastore, Daniel Barkalow, (Mon Sep 17, 1:42 pm)
Re: metastore, Junio C Hamano, (Mon Sep 17, 3:19 pm)
Re: metastore, , (Mon Sep 17, 12:35 am)
Re: metastore, Junio C Hamano, (Mon Sep 17, 2:06 am)
Re: metastore, Daniel Barkalow, (Sun Sep 16, 11:51 am)
Re: metastore, , (Sun Sep 16, 5:12 pm)
Re: metastore, Daniel Barkalow, (Sun Sep 16, 6:02 pm)
Re: metastore, , (Sun Sep 16, 6:37 pm)
Re: metastore, martin f krafft, (Mon Sep 17, 9:30 am)
Re: metastore, , (Mon Sep 17, 1:17 pm)
Re: metastore, Josh England, (Mon Sep 17, 3:46 pm)
Re: metastore, Junio C Hamano, (Sun Sep 16, 5:28 pm)
Re: metastore, , (Sun Sep 16, 5:53 pm)
Re: metastore, Daniel Barkalow, (Sun Sep 16, 5:45 pm)
Re: metastore, David Kastrup, (Sun Sep 16, 4:30 am)
Re: metastore, , (Sun Sep 16, 4:19 pm)
Re: metastore (was: Track /etc directory using Git), Johannes Schindelin, (Sat Sep 15, 10:48 pm)
Re: metastore (was: Track /etc directory using Git), Grzegorz Kulewski, (Sat Sep 15, 12:22 pm)
Re: metastore, Randal L. Schwartz, (Sat Sep 15, 7:33 pm)
Re: metastore, Francis Moreau, (Mon Sep 17, 9:04 am)
Re: metastore, Randal L. Schwartz, (Mon Sep 17, 11:32 am)
Re: metastore, , (Sat Sep 15, 8:37 pm)
Re: metastore, Randal L. Schwartz, (Sat Sep 15, 9:10 pm)
Re: metastore, , (Sat Sep 15, 9:49 pm)
Re: metastore (was: Track /etc directory using Git), Johannes Schindelin, (Sat Sep 15, 1:43 pm)
Re: metastore, David Kastrup, (Sat Sep 15, 10:16 am)
Re: Track /etc directory using Git, Nicolas Vilz, (Fri Sep 14, 5:26 pm)
Re: Track /etc directory using Git, Pierre Habouzit, (Sat Sep 15, 10:29 am)
Re: Track /etc directory using Git, martin f krafft, (Sat Sep 15, 11:24 am)
Re: Track /etc directory using Git, Pierre Habouzit, (Sat Sep 15, 11:27 am)
Re: Track /etc directory using Git, martin f krafft, (Sat Sep 15, 11:42 am)
Re: Track /etc directory using Git, Miklos Vajna, (Thu Sep 13, 8:20 am)
Re: Track /etc directory using Git, Francis Moreau, (Fri Sep 14, 4:20 am)
Re: Track /etc directory using Git, martin f krafft, (Sat Sep 15, 12:32 pm)
Re: Track /etc directory using Git, David Kastrup, (Sat Sep 15, 12:57 pm)