From: Junio C Hamano <junkio@cox.net>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Linus Torvalds <torvalds@osdl.org>, GIT <git@vger.kernel.org>
Subject: Re: Storing state in $GIT_DIR
Date: Thu, 25 Aug 2005 21:31:42 -0700 [thread overview]
Message-ID: <7v3boxl3o1.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <46a038f90508252115415acc04@mail.gmail.com> (Martin Langhoff's message of "Fri, 26 Aug 2005 16:15:37 +1200")
Martin Langhoff <martin.langhoff@gmail.com> writes:
>> In other words, if you just have a "last commit" pointer in your
>> meta-data, then git is _by_definition_ in sync. There's never anything to
>> get out of sync, because objects aren't going to change.
>
> Hmmm. That repo is in sync, but there are no guarantees that they will
> travel together to a different repo. In fact, the push/pull
> infrastructure wants to push/pull one head at a time.
Wrong as of last week ;-), and definitely wrong since this morning.
> And if they are not in sync, I have no way of knowing. Hmpf. I lie:
> the arch metadata could keep track of what it expects the last head
> commits to be, and complain bitterly if something smells rotten.
What Linus suggests is doable by using an object that can hold
a pointer to at least one commit---you used that to record the
head commit of the corresponding git branch that the arch
metainfo represents.
You only pull arch metainfo branch; the objects associated with
the corresponding git branch head will be pulled together when
you pull it. You do not have to tell git to pull git-part of
the commit chain. There is no need to worry about version skew
when you use git this way.
Now, among the existing object types, there are only two kinds
of objects you can use for this. If the only thing you need to
record is some textual information with one pointer to git
branch head, then you can use tag that points at the git head,
and store everything else as the tag comment. This is doable
but unwieldy.
You could abuse a commit object as well; you store commit
objects (such as the corresponding git branch head) as parent
commits, and put everything else in a tree that is associated
with that commit.
next prev parent reply other threads:[~2005-08-26 4:32 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
2005-08-26 3:54 ` Linus Torvalds
2005-08-26 4:15 ` Martin Langhoff
2005-08-26 4:31 ` Junio C Hamano [this message]
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=7v3boxl3o1.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=martin.langhoff@gmail.com \
--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).