git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ori Avtalion <ori@avtalion.name>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: git-apply that handles rejects like merge conflicts
Date: Tue, 08 Nov 2011 01:18:25 +0200	[thread overview]
Message-ID: <4EB86741.7040809@avtalion.name> (raw)
In-Reply-To: <20111107225508.GB28188@sigill.intra.peff.net>

On 11/08/2011 12:55 AM, Jeff King wrote:
> If it's an actual git diff, the same 3-way trick will yield good
> results, and it would be nice if it were easier to do that trick without
> calling "git am". But if it's not a git diff (i.e., missing the original
> blob information), then you won't be able to do that.

I'm dealing with two codebases that have branched in the past, before
any VCS was used, and now I'm tracking both separately with git. I'm
trying to  apply changes from one to the other with format-patch and
git-am/apply. So yeah, no blob info.

> In the general case, you can't represent all failed hunks with conflict
> markers, can you? I'm thinking something where we couldn't find any
> relevant context. You know the lines from the original patch from the
> hunk header, so you can drop the failed content from the patch in the
> right spot. But how do you know how big a conflict marker to make for
> the "current" side? The same number of lines as were in the hunk?
> I think you'd end up with confusing conflict markers.

Personally, I wouldn't object to having both "computable" conflicts, and
the .rej files for hunks that lack context, but I see how that would be
very confusing. :)

-Ori

  reply	other threads:[~2011-11-07 23:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 22:10 git-apply that handles rejects like merge conflicts Ori Avtalion
2011-11-07 22:55 ` Jeff King
2011-11-07 23:18   ` Ori Avtalion [this message]
2011-11-07 23:45   ` Junio C Hamano
2011-11-08  5:46     ` Jeff King
2011-11-08  6:15       ` Junio C Hamano
2011-11-08 20:50       ` Ori Avtalion
2011-11-08 21:00         ` Jeff King
2011-11-08  8:52   ` Bert Wesarg
2011-11-08 16:10     ` Jeff King

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=4EB86741.7040809@avtalion.name \
    --to=ori@avtalion.name \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).