From: ebiederm@xmission.com (Eric W. Biederman)
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Linus Torvalds <torvalds@osdl.org>, GIT <git@vger.kernel.org>,
Junio C Hamano <junkio@cox.net>
Subject: Re: Storing state in $GIT_DIR
Date: Fri, 26 Aug 2005 00:53:07 -0600 [thread overview]
Message-ID: <m17je9tcj0.fsf@ebiederm.dsl.xmission.com> (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:
> 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.
>
> 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.
>
> let me think about it ;)
Thinking about it going from arch to git should be just a matter
of checking sha1 hashes, possibly back to the beginning of the
arch tree.
Going from git to arch is the trickier mapping, because you
need to know the full repo--category--branch--version--patch
mapping.
Hmm. Thinking about arch from a git perspective arch tags every
commit. So the really sane thing to do (I think) is to create
a git tag object for every arch commit.
With that structure you would just need to create a git-arch-rev-list
so you can get a list of which arch branches you already have.
And then a git-arch-push and a git-arch-pull should be just a matter
of finding the common ancestor and continuing along the branch until
you reach the head. Handling all heads in an arch repository is a
little trickier but should not be too bad.
On the push side you can just treat git as an arch working directory
and push changsets into the appropriate branch. For branches that
do not have tla as the ancestor you can do the equivalent of
tla archive-mirror.
Changes can be merged on whichever side make sense.
With patch trading (Martin I think I know what you are refering to)
arch does seem to have a concept that does not map very well to git,
and this I think is a failing in git. Arch can record that just the
changes from a single changset/patch were merged. This happens all
of the time in the kernel tree when patches are merged. The
interesting case for merge algorithms is when two maintainers merge
the same patches into separate branches and then the branches are
merged. Does git have a good way of coping with that case?
On the simple side it for patch trading it might just be worth
treating them as a special git merge with just one parent in
the parents line and the real parent listed in the merge comment,
along with the original parents commit comment. But that just
might be too ugly to think about.
How does StGit handle this?
Eric
next prev parent reply other threads:[~2005-08-26 6:53 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
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 [this message]
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=m17je9tcj0.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--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).