From: Marius Storm-Olsen <marius@trolltech.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Git Mailing List <git@vger.kernel.org>,
msysGit <msysgit@googlegroups.com>
Subject: Re: '.git file' alternative, native (cross-platform) workdir support.
Date: Fri, 29 Feb 2008 22:32:30 +0100 [thread overview]
Message-ID: <47C879EE.2000808@trolltech.com> (raw)
In-Reply-To: <7vabljcyzh.fsf@gitster.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 3056 bytes --]
Junio C Hamano wrote:
> The primary reason we may want to do the ".git file" thing is to
> sanely support switching between branches (or checking out a
> different revision, which amounts to the same thing) when one has a
> submodule and the other one either does not have that submodule
> anywhere or have it in a different location in its tree.
...
> One way to solve this would be to add .git/submodules/paulus.git
> repository inside the controlling reopsitory of the toplevel project,
> and point that with the ".git file" installed at gitk-git/.git, when
> we are on HEAD. We can lose gitk-git directory and everything below
> it when switching away from the revision, but when we come back, we
> can recreate gitk-git directory, point gitk-git/.git back to
> .git/submodules/paulus.git kept in the toplevel repository, and check
> the appropriate commit out there.
>
> After switching to an old revision that did not have the submodule,
> further switching to a branch that has the submodule at modules/gitk
> would be the same deal. Instead of creating gitk-git directory and
> installing the ".git file" there (which is what we did when we came
> back to the original HEAD), create modules/gitk and install the ".git
> file" there, to point at the same .git/submodules/paulus.git/.
Ahh, ok, this makes sense. *Then* you need to point all of .git to a
specific location. But, in this case you're not interested in keeping
n-different states, as we are in a multiple workdir situation. So, it's
a much easier case.
The question is, is this also the appropriate basis for solving the
multiple workdir case? If so, we need to come up with a scheme that lets
us keep n number of states inside one single .git structure. Is this
reasonable? It's not like it's too hard, just a bit messy.
The reason I ask is to evaluate if I should cleanup the patch I did for
the native workdir support that started out this thread, or just lay it
dead for the '.git file' solution which still would need a lot of work
before it's finished. (Though, as I said before, my redirection way
could certainly migrate into a '.git file' solution over time)
I basically just need a certain amount of knowledgeable people to either
say 'drop it' or 'roll with it'.. I'm ambivalent, though I want workdirs
on Windows yesterday. :-)
So, I guess I have Dscho's -1, and my own +1 = 0 :-p
> We should be able to do this today without ".git file" using
> symlinks. It's just a Porcelain hackery, so I'll leave it to
> interested parties as an exercise.
Symlinks wouldn't really work, unless you force people to always keep
their full .git next to the workdir. So, multiple workdirs with
submodules would then fail, as would FS without symlink support (duh).
This seems to be the issue with the current '.git file' implementation
as well. If the repo is not located next to the workdir, it will fail.
Or am I reading the code incorrectly? And what happens with recursive
submodules?
--
.marius
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]
prev parent reply other threads:[~2008-02-29 21:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-29 12:27 '.git file' alternative, native (cross-platform) workdir support Marius Storm-Olsen
2008-02-29 12:54 ` Johannes Schindelin
2008-02-29 13:24 ` Marius Storm-Olsen
2008-02-29 14:14 ` Jakub Narebski
2008-02-29 14:25 ` Johannes Schindelin
2008-02-29 14:51 ` Marius Storm-Olsen
2008-02-29 20:02 ` Junio C Hamano
2008-02-29 21:32 ` Marius Storm-Olsen [this message]
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=47C879EE.2000808@trolltech.com \
--to=marius@trolltech.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=msysgit@googlegroups.com \
/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).