threads / patch / 3898

patchAllow empty lines in info/grafts

Subject: [PATCH] Allow empty lines in info/grafts

## tl;dr

2 messages between Apr 17, 2006 and Apr 17, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Yann Dirson· Apr 17, 2006, 11:41 UTC · lore

In addition to the existing comment support, that just allows the user to use a convention that works pretty much everywhere else.

Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to commit.c +1 −1
diff --git a/commit.c b/commit.c
index 05c4c92..2717dd8 100644
--- a/commit.c
+++ b/commit.c
@@ -160,7 +160,7 @@ struct commit_graft *read_graft_line(cha
 
 	if (buf[len-1] == '\n')
 		buf[--len] = 0;
-	if (buf[0] == '#')
+	if (buf[0] == '#' || buf[0] == '\0')
 		return NULL;
 	if ((len + 1) % 41) {
 	bad_graft_data:

← back to recent threads