File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ protected function doParse()
49
49
$ this ->consumeGPGSignature ();
50
50
51
51
$ this ->consumeNewLine ();
52
- $ this ->consumeNewLine ();
52
+ if ($ this ->cursor < strlen ($ this ->content )) {
53
+ $ this ->consumeNewLine ();
54
+ }
53
55
54
56
$ message = '' ;
55
57
if ($ this ->expects (' ' )) {
Original file line number Diff line number Diff line change @@ -76,4 +76,14 @@ public function testIterable($repository)
76
76
}
77
77
}
78
78
}
79
+
80
+ public function testFirstMessageEmpty ()
81
+ {
82
+ $ repository = $ this ->createEmptyRepository (false );
83
+ file_put_contents ($ repository ->getWorkingDir ().'/file ' , 'foo ' );
84
+ $ repository ->run ('add ' , ['. ' ]);
85
+ $ repository ->run ('commit ' , ['--allow-empty-message ' , '--no-edit ' ]);
86
+ $ commits = $ repository ->getLog ()->getCommits ();
87
+ $ this ->assertCount (1 , $ commits );
88
+ }
79
89
}
You can’t perform that action at this time.
0 commit comments