* [idea] separate .git dir and the working tree
@ 2011-02-05 2:53 redstun
2011-02-05 3:23 ` Mike Gant
0 siblings, 1 reply; 12+ messages in thread
From: redstun @ 2011-02-05 2:53 UTC (permalink / raw)
To: git
First please shout if this is a known feature :-)
I think separating the .git directory from its working tree could
increase the safety of the data to one more level higher.
We might have a git variable set to specify (a shared place) where to
put the .git directories (or the data inside it), then use
"/path/to/working/tree" as (or the seed to calculate) a hash key to
map from the (.git directory in the) shared place to the working tree
directory.
Or we may have just a few data (that can be re-created) stored in the
.git directory along with the working tree, and most of the revision
history stored in the shared place.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-05 2:53 [idea] separate .git dir and the working tree redstun
@ 2011-02-05 3:23 ` Mike Gant
2011-02-05 13:27 ` Jonathan Nieder
0 siblings, 1 reply; 12+ messages in thread
From: Mike Gant @ 2011-02-05 3:23 UTC (permalink / raw)
To: git
On Sat, Feb 05, 2011 at 10:53:58AM +0800, redstun wrote:
> First please shout if this is a known feature :-)
>
> I think separating the .git directory from its working tree could
> increase the safety of the data to one more level higher.
>
> We might have a git variable set to specify (a shared place) where to
> put the .git directories (or the data inside it), then use
> "/path/to/working/tree" as (or the seed to calculate) a hash key to
> map from the (.git directory in the) shared place to the working tree
> directory.
>
> Or we may have just a few data (that can be re-created) stored in the
> .git directory along with the working tree, and most of the revision
> history stored in the shared place.
GIT_DIR and GIT_WORK_TREE might be what you are looking for. Explanation
of usage in 'man git'
HTH
Mike
> --
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-05 3:23 ` Mike Gant
@ 2011-02-05 13:27 ` Jonathan Nieder
2011-02-05 14:24 ` redstun
2011-02-06 0:20 ` Mike Gant
0 siblings, 2 replies; 12+ messages in thread
From: Jonathan Nieder @ 2011-02-05 13:27 UTC (permalink / raw)
To: git; +Cc: redstun, Mike Gant
(restoring cc list; please do not cull cc's)
Mike Gant wrote:
> On Sat, Feb 05, 2011 at 10:53:58AM +0800, redstun wrote:
>> I think separating the .git directory from its working tree could
>> increase the safety of the data to one more level higher.
[...]
> GIT_DIR and GIT_WORK_TREE might be what you are looking for. Explanation
> of usage in 'man git'
The .git directory is allowed to be a symlink. Or a file like so
gitdir: /path/to/git/repo
for symlink-challenged operating systems. See gitrepository-layout(7)
for details.
Cheers,
Jonathan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-05 13:27 ` Jonathan Nieder
@ 2011-02-05 14:24 ` redstun
2011-02-05 18:04 ` Jonathan Nieder
2011-02-06 0:20 ` Mike Gant
1 sibling, 1 reply; 12+ messages in thread
From: redstun @ 2011-02-05 14:24 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Mike Gant
Making .git a symbol link is nice.
Regarding the GIT_DIR variable, looks like it needs to be paired with
the GIT_WORK_TREE variable, does this mean that I can only have one
local git repository?
what I wanted is, I may have multiple git working tree in my $HOME, like:
$HOME/proj1
$HOME/proj2,
I then wanted their .git directories respectively located at
/safe/disk/.git_proj1
/safe/disk/.git_proj2
How can I get this? I tried to read the doc but didn't have much luck.
Thanks
On Sat, Feb 5, 2011 at 9:27 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> (restoring cc list; please do not cull cc's)
>
> Mike Gant wrote:
>> On Sat, Feb 05, 2011 at 10:53:58AM +0800, redstun wrote:
>
>>> I think separating the .git directory from its working tree could
>>> increase the safety of the data to one more level higher.
> [...]
>> GIT_DIR and GIT_WORK_TREE might be what you are looking for. Explanation
>> of usage in 'man git'
>
> The .git directory is allowed to be a symlink. Or a file like so
>
> gitdir: /path/to/git/repo
>
> for symlink-challenged operating systems. See gitrepository-layout(7)
> for details.
>
> Cheers,
> Jonathan
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-05 14:24 ` redstun
@ 2011-02-05 18:04 ` Jonathan Nieder
0 siblings, 0 replies; 12+ messages in thread
From: Jonathan Nieder @ 2011-02-05 18:04 UTC (permalink / raw)
To: redstun; +Cc: git, Mike Gant
redstun wrote:
> what I wanted is, I may have multiple git working tree in my $HOME, like:
> $HOME/proj1
> $HOME/proj2,
>
> I then wanted their .git directories respectively located at
> /safe/disk/.git_proj1
> /safe/disk/.git_proj2
>
> How can I get this? I tried to read the doc but didn't have much luck.
By making .git in $HOME/proj1 a symlink to /safe/disk/.git_proj1 and
making $HOME/proj2/.git a symlink to /safe/disk/.git_proj2.
GIT_DIR should be left unset for this to work.
The GIT_DIR variable is for more complicated use cases in which you
do not want a .git directory, file, or symlink in the worktree at all.
One uses it as follows:
GIT_DIR=/somewhere/else/.git git <command> ...
The top level of the work tree is inferred to be the current working
directory and git metadata is taken from somewhere else.
Sometimes a person does not only want to work in the top level of the
working tree. To tell git where the top level is, use the
GIT_WORK_TREE variable:
(
GIT_DIR=/somewhere/else/.git; export GIT_DIR
GIT_WORK_TREE=$(pwd); export GIT_WORK_TREE
cd sub/directory
git <command>...
cd ../other/directory
git <other command>...
)
These are not variables for your .profile, since as you mentioned, a
person typically will work with one git repo and worktree sometimes,
another git repo and work tree another time.
Hope that helps,
Jonathan
Side note: I don't think you mentioned wanting it, but for reference,
there is a nice tool for sharing objects between multiple worktrees in
contrib/worktree. It comes with some sharp edges, as described in [1].
[1] http://thread.gmane.org/gmane.comp.version-control.git/150559
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-05 13:27 ` Jonathan Nieder
2011-02-05 14:24 ` redstun
@ 2011-02-06 0:20 ` Mike Gant
2011-02-06 0:40 ` Mike Gant
1 sibling, 1 reply; 12+ messages in thread
From: Mike Gant @ 2011-02-06 0:20 UTC (permalink / raw)
To: git; +Cc: Jonathan Nieder, redstun
On Sat, Feb 05, 2011 at 07:27:08AM -0600, Jonathan Nieder wrote:
> (restoring cc list; please do not cull cc's)
My apologies, but I didn't see a cc list in the original. Please
explain.
-Mike
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-06 0:20 ` Mike Gant
@ 2011-02-06 0:40 ` Mike Gant
2011-02-06 1:00 ` Jared Hance
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Mike Gant @ 2011-02-06 0:40 UTC (permalink / raw)
To: git; +Cc: redstun, Jonathan Nieder
On Sat, Feb 05, 2011 at 05:20:09PM -0700, Mike Gant wrote:
> On Sat, Feb 05, 2011 at 07:27:08AM -0600, Jonathan Nieder wrote:
> > (restoring cc list; please do not cull cc's)
>
> My apologies, but I didn't see a cc list in the original. Please
> explain.
>
> -Mike
Never mind, I think I understand.
So does anyone use Mutt? And do they know a recipe to move the sender
address to the cc list? If not, I'll figure it out.
Thanks,
-Mike
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-06 0:40 ` Mike Gant
@ 2011-02-06 1:00 ` Jared Hance
2011-02-06 10:49 ` Konstantin Khomoutov
2011-02-06 10:55 ` [idea] " Nicolas Sebrecht
2011-05-23 14:40 ` [idea] " Michael Witten
2 siblings, 1 reply; 12+ messages in thread
From: Jared Hance @ 2011-02-06 1:00 UTC (permalink / raw)
To: Mike Gant; +Cc: git, redstun, Jonathan Nieder
On Sat, 2011-02-05 at 17:40 -0700, Mike Gant wrote:
> On Sat, Feb 05, 2011 at 05:20:09PM -0700, Mike Gant wrote:
> > On Sat, Feb 05, 2011 at 07:27:08AM -0600, Jonathan Nieder wrote:
> > > (restoring cc list; please do not cull cc's)
> >
> > My apologies, but I didn't see a cc list in the original. Please
> > explain.
> >
> > -Mike
>
> Never mind, I think I understand.
>
> So does anyone use Mutt? And do they know a recipe to move the sender
> address to the cc list? If not, I'll figure it out.
>
> Thanks,
> -Mike
> --
> 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
When I used Mutt, if I remember correctly, L did the job (list reply).
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-06 1:00 ` Jared Hance
@ 2011-02-06 10:49 ` Konstantin Khomoutov
0 siblings, 0 replies; 12+ messages in thread
From: Konstantin Khomoutov @ 2011-02-06 10:49 UTC (permalink / raw)
To: Jared Hance; +Cc: Mike Gant, git, redstun, Jonathan Nieder
On Sat, Feb 05, 2011 at 08:00:15PM -0500, Jared Hance wrote:
> > > My apologies, but I didn't see a cc list in the original. Please
> > > explain.
> > Never mind, I think I understand.
> > So does anyone use Mutt? And do they know a recipe to move the sender
> > address to the cc list? If not, I'll figure it out.
> When I used Mutt, if I remember correctly, L did the job (list reply).
Also "g" is "group reply" -- it simply replies to all e-mails mentioned
in the mail which is being replied to.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [idea] Re: separate .git dir and the working tree
2011-02-06 0:40 ` Mike Gant
2011-02-06 1:00 ` Jared Hance
@ 2011-02-06 10:55 ` Nicolas Sebrecht
2011-02-07 4:57 ` Mike Gant
2011-05-23 14:40 ` [idea] " Michael Witten
2 siblings, 1 reply; 12+ messages in thread
From: Nicolas Sebrecht @ 2011-02-06 10:55 UTC (permalink / raw)
To: git, redstun, Jonathan Nieder; +Cc: Nicolas Sebrecht
The 05/02/11, Mike Gant wrote:
> So does anyone use Mutt? And do they know a recipe to move the sender
> address to the cc list? If not, I'll figure it out.
g (group answer).
--
Nicolas Sebrecht
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] Re: separate .git dir and the working tree
2011-02-06 10:55 ` [idea] " Nicolas Sebrecht
@ 2011-02-07 4:57 ` Mike Gant
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gant @ 2011-02-07 4:57 UTC (permalink / raw)
To: Nicolas Sebrecht, git; +Cc: redstun, Jonathan Nieder
On Sun, Feb 06, 2011 at 11:55:10AM +0100, Nicolas Sebrecht wrote:
> The 05/02/11, Mike Gant wrote:
>
> > So does anyone use Mutt? And do they know a recipe to move the sender
> > address to the cc list? If not, I'll figure it out.
>
> g (group answer).
>
Thanks. I knew about L (list reply) and g (group reply). L only replies
to the list address, git@vger.kernel.org, in this case. Certainly, g is
the closest behavior as long as it is acceptable to have the sender name
in the To: header along with the list address (as in this response).
On the other hand, if it is only acceptable to have the list address in
the To: header and all others in the cc list then I don't know of any
command to do that.
-Mike
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [idea] separate .git dir and the working tree
2011-02-06 0:40 ` Mike Gant
2011-02-06 1:00 ` Jared Hance
2011-02-06 10:55 ` [idea] " Nicolas Sebrecht
@ 2011-05-23 14:40 ` Michael Witten
2 siblings, 0 replies; 12+ messages in thread
From: Michael Witten @ 2011-05-23 14:40 UTC (permalink / raw)
To: Mike Gant; +Cc: redstun, Jonathan Nieder, git
On Sun, Feb 6, 2011 at 00:40, Mike Gant <mike@gantsfort.com> wrote:
> So does anyone use Mutt? And do they know a recipe to move the sender
> address to the cc list? If not, I'll figure it out.
Your `To:' header should list the sender (usually what's listed in the
`From:' header); the `Cc:' header should list everything else
(including the mailing list(s) in question).
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-05-23 14:41 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-05 2:53 [idea] separate .git dir and the working tree redstun
2011-02-05 3:23 ` Mike Gant
2011-02-05 13:27 ` Jonathan Nieder
2011-02-05 14:24 ` redstun
2011-02-05 18:04 ` Jonathan Nieder
2011-02-06 0:20 ` Mike Gant
2011-02-06 0:40 ` Mike Gant
2011-02-06 1:00 ` Jared Hance
2011-02-06 10:49 ` Konstantin Khomoutov
2011-02-06 10:55 ` [idea] " Nicolas Sebrecht
2011-02-07 4:57 ` Mike Gant
2011-05-23 14:40 ` [idea] " Michael Witten
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.