git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [bug-patch] rejecting patches that have an offset

From
Eric Blake <eblake@redhat.com>
Date
Aug 16, 2011, 23:10 UTC
Message-ID
<4E4AF8F4.60709@redhat.com>
In-Reply-To
<1313534889.5598.21.camel@schurl.linbit>
On 08/16/2011 04:48 PM, Andreas Gruenbacher wrote:
Show 9 quoted lines
> Eric,
>
> On Mon, 2011-08-15 at 17:16 -0600, Eric Blake wrote:
>> It would have saved me a lot of time if both 'patch' and 'git apply'
>> could be taught a mode of operation where they explicitly reject a patch
>> that cannot be applied without relying on an offset.
>
> that sounds reasonable.  Can you send a patch or at least add a bug on
> Savannah?
Bug opened: https://savannah.gnu.org/bugs/index.php?34031
Show 10 quoted lines
>
>> It might also be nice if patch could learn the algorithm that appears to
>> match the git behavior, where when there are multiple points with
>> identical context (viewing just the context in isolation), but where
>> those locations differ in function location (as learned by the @@ header
>> line in the patch file), then the preferred offset is the one in the
>> named function, even if that is not the closes context match to the line
>> number given in the patch file.
>
> Sounds interesting; a patch for that would be great as well.
Bug opened: https://savannah.gnu.org/bugs/index.php?34032
-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org
Previous: Andreas GruenbacherNext: Eric Blake
Message 4 of 5 in “rejecting patches that have an offset”
  1. Eric BlakeAug 15, 2011
  2. Junio C HamanoAug 16, 2011
  3. Andreas GruenbacherAug 16, 2011
  4. Eric BlakeAug 16, 2011
  5. Eric BlakeAug 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.