Hi,
`git commit' fails on a newly added file with the following
*
* You have some suspicious patch lines:
*
* In Documentation/core-api/gfp_mask-from-fs-io.rst
* unresolved merge conflict (line 27)
Documentation/core-api/gfp_mask-from-fs-io.rst:27:=======
$ git status --porcelain
A Documentation/core-api/gfp_mask-from-fs-io.rst
$ git --version
git version 2.17.0
from debian.
Btw. the suspicious line is
$ sed -n '27p' Documentation/core-api/gfp_mask-from-fs-io.rst
=======
I believe this is a bug because a new file cannot have a conflict by
definition and also there are no <<<<< in the file so there is no
unresolved conflict there. So I guess the heuristic should be more
clever.
Thanks!
--
Michal Hocko
SUSE Labs
On Thu, May 24, 2018 at 01:36:57PM +0200, Michal Hocko wrote:
`git commit' fails on a newly added file with the following
*
* You have some suspicious patch lines:
*
* In Documentation/core-api/gfp_mask-from-fs-io.rst
* unresolved merge conflict (line 27)
Documentation/core-api/gfp_mask-from-fs-io.rst:27:=======
This message isn't generated by git itself, but rather by a pre-commit
hook. You can skip the hook by running "git commit --no-verify".
As for the false positive in the hook logic, I can't say more without
having seen the hook source. :) Do you know where you got it from?
(Googling for "suspicious patch lines" turns up some hits, but with
varying provenance).
-Peff
On Thu 24-05-18 13:11:20, Jeff King wrote:
On Thu, May 24, 2018 at 01:36:57PM +0200, Michal Hocko wrote:
quoted
`git commit' fails on a newly added file with the following
*
* You have some suspicious patch lines:
*
* In Documentation/core-api/gfp_mask-from-fs-io.rst
* unresolved merge conflict (line 27)
Documentation/core-api/gfp_mask-from-fs-io.rst:27:=======
This message isn't generated by git itself, but rather by a pre-commit
hook. You can skip the hook by running "git commit --no-verify".
As for the false positive in the hook logic, I can't say more without
having seen the hook source. :) Do you know where you got it from?
(Googling for "suspicious patch lines" turns up some hits, but with
varying provenance).
Ohh, I see. I must have installed this one loooong time ago. Attached
for reference. I will just drop it. Sorry about tht noise.
--
Michal Hocko
SUSE Labs