# [PATCH] Allow empty lines in info/grafts

2 messages from 2006-04-17 to 2006-04-17. Participants: Yann Dirson, Junio C Hamano.
Thread: https://gitlist.dev/t/3898

## Yann Dirson, 2006-04-17 11:41

Subject: [PATCH] Allow empty lines in info/grafts
Message-ID: <20060417114149.28696.59020.stgit@gandelf.nowhere.earth>
URL: https://gitlist.dev/e/20060417114149.28696.59020.stgit%40gandelf.nowhere.earth

```

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(-)

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:

```

## Junio C Hamano, 2006-04-17 21:42

Subject: Re: [PATCH] Allow empty lines in info/grafts
Message-ID: <7vbquzlw0b.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vbquzlw0b.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060417114149.28696.59020.stgit@gandelf.nowhere.earth>

```
Thanks; will apply.

```
