git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Fall back to three-way merge when applying a patch.
Date: Thu, 06 Oct 2005 11:07:11 -0600	[thread overview]
Message-ID: <m1slvek20w.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0510060756060.31407@g5.osdl.org> (Linus Torvalds's message of "Thu, 6 Oct 2005 07:59:36 -0700 (PDT)")

Linus Torvalds <torvalds@osdl.org> writes:

> On Thu, 6 Oct 2005, Eric W. Biederman wrote:
>> 
>> After thinking about it I don't think you need to look through the
>> history to use it for a merge3 operation.   As I recall merge3 only
>> looks at the base and the two derived versions of the file.  If we
>> have the sha1 of the original in the git repository I think all we
>> need to compute is the diff between that sha1 the current version
>> file.  And then apply the merge3 algorithm to combine the two sets of
>> changes.
>
> Ahh, that I can definitely agree with. In fact, it makes perfect sense.
>
> However, it assumes that everybody is a git user, which isn't actually 
> true. 

Agreed.  The question is the subset of everyone large enough to
make it a useful technique.  Given that a standalone diff utility can
be taught how to generate the extra information, and a standalone
patch could use it to verify you are at least patching the version
of the file the patch was intended for I suspect the subset of
everyone is large enough to be interesting.

> Also, I'm wondering whether the advantages outweigh the 
> disadvantages: it would make the diff uglier. We'd have to add that SHA1 
> there somewhere (either on the "diff" line itself, or as anothe rextended 
> git line like the "rename from/to" lines - a "original <sha1>" line).

I don't think an extra line in the header is going to be much of a problem.
Just more header noise.  

Eric

  reply	other threads:[~2005-10-06 17:09 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1slvek20w.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.
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).