From: Mikko Perttunen <mikko.perttunen@kapsi.fi>
To: git@vger.kernel.org
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>
Subject: Kernel bug caused by 'git apply' misapplying a patch with ambiguous chunk
Date: Thu, 02 Apr 2015 18:25:12 +0300 [thread overview]
Message-ID: <551D5F58.4010201@kapsi.fi> (raw)
Hello everyone,
we recently ran into a kernel bug caused by git misapplying this patch:
https://lkml.org/lkml/2014/7/3/896 .
The chunk '@@ -653,6 +655,7 @@' in tegra124.dtsi (the second file in the
patch) has ambiguous context (there are several almost identical PHY
nodes in the file). Git applied the chunk to the second PHY node when it
should have been applied to the first node.
You can reproduce this by checking out, for example, version 3.16 of the
Linux kernel and applying the patch from the above link and then looking at
arch/arm/boot/dts/tegra124.dtsi
and verifying that git has added the 'nvidia,has-utmi-pad-registers'
property to the second, instead of the first 'phy' node.
Of course this is probably rather hard to fix on the applying end; but
perhaps format-patch could check for ambiguous chunks and either warn
the user or increase the context size automatically, or apply could warn
about the chunk being ambiguous?
Thanks,
Mikko Perttunen
next reply other threads:[~2015-04-02 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 15:25 Mikko Perttunen [this message]
2015-04-02 15:59 ` Kernel bug caused by 'git apply' misapplying a patch with ambiguous chunk Junio C Hamano
2015-04-02 16:13 ` Mikko Perttunen
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=551D5F58.4010201@kapsi.fi \
--to=mikko.perttunen@kapsi.fi \
--cc=git@vger.kernel.org \
--cc=tomeu.vizoso@collabora.com \
--cc=tuomas.tynkkynen@iki.fi \
/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.