Re: [PATCH] crlf: Add test showing double warning on commit

2016-05-15 Thread Junio C Hamano
Torsten Bögershausen writes: > Nja, (Or Nyes in English), the old handling tried to be "nice" to the user: > $ git add text # gave warning > #User forgets, does other things, git reset HEAD > $ git commit # Gave the warning one more time, to remind the user, > # what he did, and

Re: [PATCH] crlf: Add test showing double warning on commit

2016-05-14 Thread Torsten Bögershausen
On 14.05.16 20:45, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> Do we need to run diff_populate_filespec() twice when src==dst ? > > Of course we do. > > src and dst may have the same path, but are coming from different > places (src may be an indexed blob while dst may be a file i

Re: [PATCH] crlf: Add test showing double warning on commit

2016-05-14 Thread Torsten Bögershausen
On 14.05.16 20:45, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> Do we need to run diff_populate_filespec() twice when src==dst ? > > Of course we do. > > src and dst may have the same path, but are coming from different > places (src may be an indexed blob while dst may be a file i

Re: [PATCH] crlf: Add test showing double warning on commit

2016-05-14 Thread Junio C Hamano
Torsten Bögershausen writes: > Do we need to run diff_populate_filespec() twice when src==dst ? Of course we do. src and dst may have the same path, but are coming from different places (src may be an indexed blob while dst may be a file in the working tree). > If yes, we may need to introduce

Re: [PATCH] crlf: Add test showing double warning on commit

2016-05-14 Thread Torsten Bögershausen
On 14.05.16 13:17, Adam Dinwoodie wrote: > Add failing test case showing CRLF -> LF rewrite warnings being printed > multiple times when running "git commit". > The problem seems to come from this line: index 5473493..59d4106 100644 --- a/diffcore-break.c +++ b/diffcore-break.c @@ -61,9 +61,18 @@

[PATCH] crlf: Add test showing double warning on commit

2016-05-14 Thread Adam Dinwoodie
Add failing test case showing CRLF -> LF rewrite warnings being printed multiple times when running "git commit". Signed-off-by: Adam Dinwoodie --- t/t0020-crlf.sh | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh index f94120a