git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Do not output whitespace on blank lines
@ 2016-05-29 15:36 Dave Nicolson
  2016-05-29 15:36 ` [PATCH 2/2] Fix tests Dave Nicolson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dave Nicolson @ 2016-05-29 15:36 UTC (permalink / raw)
  To: git

---
 diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diff.c b/diff.c
index d3734d3..459b36a 100644
--- a/diff.c
+++ b/diff.c
@@ -471,7 +471,7 @@ static void emit_line_0(struct diff_options *o, const char *set, const char *res
 		has_trailing_carriage_return = (len > 0 && line[len-1] == '\r');
 		if (has_trailing_carriage_return)
 			len--;
-		nofirst = 0;
+		nofirst = len == 0 && (char)first == ' ' ? 1 : 0;
 	}
 
 	if (len || !nofirst) {

--
https://github.com/git/git/pull/245

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-30  0:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-29 15:36 [PATCH 1/2] Do not output whitespace on blank lines Dave Nicolson
2016-05-29 15:36 ` [PATCH 2/2] Fix tests Dave Nicolson
2016-05-29 17:06 ` [PATCH 1/2] Do not output whitespace on blank lines Thomas Gummerer
2016-05-29 17:25 ` René Scharfe
2016-05-30  0:30   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).