Re: [PATCH 03/10] diff.c: drop tautologous condition in emit_line_0

2016-09-16 Thread Stefan Beller
On Mon, Sep 12, 2016 at 4:53 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> diff --git a/diff.c b/diff.c >> index 156c2aa..9d2e704 100644 >> --- a/diff.c >> +++ b/diff.c >> @@ -460,8 +460,7 @@ static void emit_line_0(struct diff_options *o, const >> char *set, const char *res >> >>

Re: [PATCH 03/10] diff.c: drop tautologous condition in emit_line_0

2016-09-12 Thread Junio C Hamano
Stefan Beller writes: > diff --git a/diff.c b/diff.c > index 156c2aa..9d2e704 100644 > --- a/diff.c > +++ b/diff.c > @@ -460,8 +460,7 @@ static void emit_line_0(struct diff_options *o, const > char *set, const char *res > > if (len == 0) { > has_trailing_newline = (first ==

[PATCH 03/10] diff.c: drop tautologous condition in emit_line_0

2016-09-10 Thread Stefan Beller
From: Stefan Beller When `first` equals '\r', then it cannot equal '\n', which makes `!has_trailing_newline` always true if `first` is '\r'. Drop that check. Signed-off-by: Stefan Beller --- diff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 156c