Re: [BUG] incorrect line numbers reported in git am

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 03, 2019 at 05:03:14AM +0900, Junio C Hamano wrote:
> Denton Liu <liu.denton@xxxxxxxxx> writes:
> 
> > which is in the middle of the log message. I expect the line to be
> > reported as something in the range of 198-203,...
> 
> That comes from not knowing who is complaining and what it is
> reading.  In this case, "git apply" issues a warning because it is
> fed .git/rebase-apply/patch file, which is the output of mailinfo
> that parses header & log message out, leaves the message in a
> separate 'msg' file in the same directory and stores the rest in
> that 'patch' file.  And it is line 87 that has problems.

In this case, I would still regard this as a bug since users would
expect the line 87 to refer to their input file. I think most users
don't even realise that a .git/rebase-apply/patch file exists. (I
certainly didn't.)

In fact, running `git am --show-current-patch` shows the whole mail, not
only the 'patch' file so users would have no reason to expect the line
numbers to refer to the 'patch' file.

I think it would make sense to pass the number of lines skipped by
mailinfo to the apply step so that more accurate line numbers can be
reported to users.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux