From: ebiederm@xmission.com (Eric W. Biederman)
To: Junio C Hamano <junkio@cox.net>
Cc: Linus Torvalds <torvalds@osdl.org>, git@vger.kernel.org
Subject: Re: [PATCH] Fall back to three-way merge when applying a patch.
Date: Wed, 05 Oct 2005 19:59:34 -0600 [thread overview]
Message-ID: <m1mzln9zi1.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <7vslvfcy0g.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Wed, 05 Oct 2005 17:03:27 -0700")
Junio C Hamano <junkio@cox.net> writes:
> Linus Torvalds <torvalds@osdl.org> writes:
>
>> ... Although I would actually prefer to be able to try against
>> a specific named release (not "all named tags" first).
>
> That makes sense, given that you know better than the tool can
> possibly guess, especially from the performance point of view.
>
> What's interesting is that from the correctness point of view,
> it should not make that much of a difference which base tree
> happens to be picked -- if the base tree is wildly different
> from your current HEAD, most of that wild difference will be
> carried over intact to the result of patch application for paths
> and parts of the files the patch does not touch. Three-way
> merge notices that and your "changes" from the base tree win.
There is another workable strategy. Modify git-diff-xxx to report
the sha1 of the tree, or the sha1's of the files the patch applies to.
And make that information available to git-apply. I don't how often
it would help but it has the possibility of letting the tools know
exactly what the patch applied against.
A rational for why this would work is that is that a kernel repository
is large, and unless objects/alternatives can be made to work across
servers there will be people who can use git for development but can't
host a repository that can be pulled from. Especially for a small
patch.
Using sha1's for context before merging should be able to give you a
whole lot more machine verifiable context with just a little bit of work.
Eric
next prev parent reply other threads:[~2005-10-06 2:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 0:46 [PATCH] Fall back to three-way merge when applying a patch Junio C Hamano
2005-10-05 4:56 ` Linus Torvalds
2005-10-05 6:58 ` Junio C Hamano
2005-10-05 14:30 ` Linus Torvalds
2005-10-06 0:03 ` Junio C Hamano
2005-10-06 1:59 ` Eric W. Biederman [this message]
2005-10-06 2:18 ` Linus Torvalds
2005-10-06 4:17 ` Junio C Hamano
2005-10-06 5:25 ` Eric W. Biederman
2005-10-06 14:35 ` Linus Torvalds
2005-10-06 14:52 ` Eric W. Biederman
2005-10-06 14:59 ` Linus Torvalds
2005-10-06 17:07 ` Eric W. Biederman
2005-10-07 2:33 ` [PATCH] Show original and resulting blob object info in diff output Junio C Hamano
2005-10-07 4:47 ` Linus Torvalds
2005-10-07 5:16 ` Junio C Hamano
2005-10-06 7:33 ` [PATCH] Fall back to three-way merge when applying a patch 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1mzln9zi1.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).