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 08:26:58 -0600 [thread overview]
Message-ID: <m13bowu631.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <46a038f90508260008d1013ea@mail.gmail.com> (Martin Langhoff's message of "Fri, 26 Aug 2005 19:08:47 +1200")
Martin Langhoff <martin.langhoff@gmail.com> writes:
> On 8/26/05, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> 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.
>
> Yup, though actually replaying the tree to compute the hashes is
> something I just _won't_ do ;)
I guess if you have the tla branch names it won't be necessary.
If you are careful how you do the import you can have two parallel
imports of the same data and produce exactly the same git tree.
That is largely why I care about a stable algorithm for the hashes.
>> Going from git to arch is the trickier mapping, because you
>> need to know the full repo--category--branch--version--patch
>> mapping.
>
> My plan doesn't include git->arch support... yet...
One of my interests, and if I get the time to worry about it
is to get a scm that is a sufficient superset of what other
scms do so it can serve as a bidirectional gateway.
git is fairly close to what is needed to implement that.
Hmm. I wonder if a git metadata branch in general is sufficient to
store information that does not map to git natively?
>> 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.
>
> Now I like that interesting idea. It doesn't solve all my problems,
> but is a reasonable mapping point. Will probably do it.
>
>> 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.
>
> I won't get into _that_ flamewar ;)
<pouts> No flamewar </pouts>
> My plan for merges is to detect when two branches up until what point
> branches are fully merged, and mark that in git -- because that is
> what git considers a merge. The rest will be known to the importer,
> but nothing else.
I looked at least back to the StGit announcement and it helped to
clarify my thinking. A patch is equivalent to a branch with
just one change. This makes cherry picking a single patch roughly
equivalent to describing that patch as a single commit branch
at the fork point from the common ancestor of the two branches,
and then having the single commit merged.
The fact that the original branch that was cherry picked from
can really only be represented as a an graft. Like the original
linux kernel history.
The shortcoming I see in git-applypatch is that it doesn't attempt
to find the original base of a patch and instead simply assumes it
is against the current tree.
There is a similar short coming in git-diff-tree where it reports
the commit that you are on when take the diff, but it does not
report the commit the diff is against.
......
Thinking a little more there is also a connection with reverting
patches. Cherry picking changes from a branch may also be thought of
as reverting all of the other changes from a branch and then merging
the branch.
The practical impact of all of these things is there a form that
will allow future merges to realize the same change has already
been applied so it can skip it the second time.
Inter-operating with darcs, tla, quilt, and raw diff/patch brings up
these issues.
So my practical questions are:
- What information can a current git merge algorithms and more
sophisticated merge algorithms use to avoid having conflicts when
the same changes are merged into the same branch multiple times?
- Is the git meta data sufficient to represent the history
sophisticated merge algorithms can use.
- Is the git meta data sufficient to represent the result
of sufficient meta data operations.
- Is the current representation of a reverted change sufficient
for the merge algorithms, or could they do a better job if
they new a change was revert of a previous change.
I'm just trying to think through the issues that working with patch
based systems bring up.
Eric
next prev parent reply other threads:[~2005-08-26 14:28 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
2005-08-26 7:08 ` Martin Langhoff
2005-08-26 14:26 ` Eric W. Biederman [this message]
[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=m13bowu631.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).