From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Remi LESPINET <remi.lespinet@ensimag.grenoble-inp.fr>,
git@vger.kernel.org
Subject: Re: [RFC] solving a bug with hunks starting at line 1 in git apply
Date: Mon, 01 Jun 2015 20:47:56 +0200 [thread overview]
Message-ID: <vpqiob7z2n7.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqqpp5f5l7v.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Mon, 01 Jun 2015 11:37:08 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>>> @@ -1,1 +1,2 @@
>>> +5
>>> 10
>>> @@ -1,3 +2,3 @@
>>> 10
>>> +15
>>> -20
>>> 30
>>
>> With this one, I get:
>>
>> $ git apply < p2.diff
>> error: patch failed: pre.txt:1
>> error: pre.txt: patch does not apply
>> $ patch < p2.diff
>> patching file pre.txt
>>
>> => no fuzzy matching for patch, git apply should actually work.
>
> I am not sure what you are trying to do with that patch that tries
> to touch the same line twice. Is this the same old laziness coming
> back to bite us, the one that we attempted to work around with
> 933e44d3 ("add -p": work-around an old laziness that does not
> coalesce hunks, 2011-04-06)?
Indeed, "git apply" works with --allow-overlap in this case. But this is
not sufficient to fix "git add -p" which already uses it. So, there's
something else.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2015-06-01 18:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 17:07 [RFC] solving a bug with hunks starting at line 1 in git apply Remi LESPINET
2015-06-01 17:16 ` Junio C Hamano
2015-06-01 17:30 ` Junio C Hamano
2015-06-01 18:00 ` Matthieu Moy
2015-06-01 18:37 ` Junio C Hamano
2015-06-01 18:47 ` Matthieu Moy [this message]
2015-06-01 18:53 ` Junio C Hamano
2015-06-01 21:37 ` Remi Lespinet
2015-06-01 18:20 ` Matthieu Moy
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=vpqiob7z2n7.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=remi.lespinet@ensimag.grenoble-inp.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.