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

2019-10-03 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, Oct 3, 2019 at 7:52 AM Junio C Hamano wrote: >> > 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. >> >> Yeah, show-current-

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

2019-10-02 Thread Duy Nguyen
On Thu, Oct 3, 2019 at 7:52 AM Junio C Hamano wrote: > > 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. > > Yeah, show-current-patch was a misguided attemp

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

2019-10-02 Thread Junio C Hamano
Denton Liu writes: > On Thu, Oct 03, 2019 at 05:03:14AM +0900, Junio C Hamano wrote: >> Denton Liu 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

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

2019-10-02 Thread Denton Liu
On Thu, Oct 03, 2019 at 05:03:14AM +0900, Junio C Hamano wrote: > Denton Liu 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 thi

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

2019-10-02 Thread Denton Liu
On Thu, Oct 03, 2019 at 04:44:55AM +0900, Junio C Hamano wrote: > Denton Liu writes: > > > Applying: dir: special case check for the possibility that pathspec is > > NULL > > error: corrupt patch at line 87 > > This refers to line 87 of the input file, not a line that begins > with "@@

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

2019-10-02 Thread Junio C Hamano
Denton Liu 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

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

2019-10-02 Thread Junio C Hamano
Denton Liu writes: > Applying: dir: special case check for the possibility that pathspec is > NULL > error: corrupt patch at line 87 This refers to line 87 of the input file, not a line that begins with "@@ -87,count...", doesn't it? If the sender hand edits a patch without correct