From: Martin Langhoff <martin.langhoff@gmail.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: GIT <git@vger.kernel.org>, Junio C Hamano <junkio@cox.net>
Subject: Re: Storing state in $GIT_DIR
Date: Fri, 26 Aug 2005 13:30:46 +1200 [thread overview]
Message-ID: <46a038f905082518306e9d7d2a@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0508251053000.3317@g5.osdl.org>
Linus,
I like the solution you are suggesting, but I suspect it will create
more problems that it will solve, and while the coolness factor is
drawing me in.... we ain't gonna need it, as the xp people say.
More below...
On 8/26/05, Linus Torvalds <torvalds@osdl.org> wrote:
> Git won't care, so it will work, but things like clone/pull etc also won't
> actually ever look there, so it will only work for that one repo.
Storing things there _works_ in the sense that it will be ignored, and
that is fine with me. So I could just be lazy and have it strictly
tied to the repo. In practice, if you are tracking an external Arch
repo, you really have it scripted, and use a dedicated git repo for
that.
Not using a dedicated repo is quite... messy. If you do other things
in that particular repo, the import script may find it dirty, and mess
things up on import. And after the import, you'll probably run
git-push-script --all because it's bringing a dynamically growing
forest of heads from the arch repo. That's another reason why your
private branches should be elsewhere.
OTOH, storing the metadata in a branch will allow us to run the import
in alternating repositories. But as Junio points out, unless I can
guarantee that the metadata and the tree are in sync, I cannot
trivially resume the import cycle from a new repo.
> The git solution to this (which nobody has ever _used_, but which
> technically is wonderful) is to have a "side branch" that does not share
> any commits (or files, for that matter) in common with the "real branch",
> and which is used to track any metadata. In fact, you can obviously have
> any number of side branches.
A couple of days ago, playing with the import, I realised that the git
repo can hold unrelated projects, too, if you just commit orphan trees
as new heads. I mean - it was a bug in my script but I thought it was
cool. ;)
> The way to maintain a metadata branch is to have not only a different
> branch name (obviously), but also use a totally different index file, so
> that you can index both branches in parallell, and you don't actually need
> to check out one or the other.
Hmmm. Now that's voodoo magic! I was thinking of reading the file by
asking directly for the object by its sha, or doing a checkout in a
tmpdir. Interesting.
cheers,
martin
next prev parent reply other threads:[~2005-08-26 1:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-25 3:32 Storing state in $GIT_DIR Martin Langhoff
2005-08-25 18:16 ` Linus Torvalds
2005-08-26 1:30 ` Martin Langhoff [this message]
2005-08-26 3:54 ` Linus Torvalds
2005-08-26 4:15 ` Martin Langhoff
2005-08-26 4:31 ` Junio C Hamano
2005-08-26 5:08 ` Daniel Barkalow
2005-08-26 5:31 ` Linus Torvalds
2005-08-26 5:49 ` Junio C Hamano
2005-08-27 0:23 ` Linus Torvalds
2005-08-26 5:52 ` Junio C Hamano
2005-08-26 6:43 ` Martin Langhoff
2005-08-26 6:53 ` Eric W. Biederman
2005-08-26 7:08 ` Martin Langhoff
2005-08-26 14:26 ` Eric W. Biederman
[not found] ` <7vwtm9u5jj.fsf@assigned-by-dhcp.cox.net>
2005-08-26 1:57 ` Martin Langhoff
2005-08-26 2:03 ` [PATCH] Accept -m and friends for initial commits and merge commits Junio C Hamano
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=46a038f905082518306e9d7d2a@mail.gmail.com \
--to=martin.langhoff@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.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).