public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Nick Desaulniers <ndesaulniers@google•com>
Cc: git@vger•kernel.org
Subject: Re: fuzzy patch application
Date: Fri, 10 Feb 2017 11:38:19 -0800	[thread overview]
Message-ID: <xmqq37flltuc.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAKwvOdn9j=_Ob=xq4ucN6Ar1G537zNiU9ox4iF6o1qO7kPY41A@mail.gmail.com> (Nick Desaulniers's message of "Fri, 10 Feb 2017 11:20:59 -0800")

Nick Desaulniers <ndesaulniers@google•com> writes:

> I frequently need to backport patches from the Linux kernel to older
> kernel versions (Android Security)....
> ...
> My question is, why does `patch` seem to do a better job at applying
> patches than `git am`?  It's almost like the `git` tools don't try to fuzz
> the offsets.

You diagnosed correctly.  We do allow offsets but by default no fuzz
and that is a deliberate design decision made in very early days.
You can pass option to reduce context, but that is not the default.

  reply	other threads:[~2017-02-10 19:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 19:20 fuzzy patch application Nick Desaulniers
2017-02-10 19:38 ` Junio C Hamano [this message]
2017-02-10 20:57 ` Jeff King
2017-02-10 21:37   ` Stefan Beller
2017-02-10 21:48     ` Jeff King
2017-02-10 22:31       ` Junio C Hamano
2017-02-10 22:53         ` Junio C Hamano
2017-02-10 22:56           ` Nick Desaulniers
2017-02-11  3:09             ` 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=xmqq37flltuc.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=ndesaulniers@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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