Skip to content

Commit 664b1fd

Browse files
Added unit test to reproduce the issue
1 parent ecd8e12 commit 664b1fd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

gitdiff/parser_test.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,42 @@ a wild fragment appears?
301301
`,
302302
Err: true,
303303
},
304+
"mergeHeaderFollowedByNormalHeader": {
305+
Input: `commit f6ded7a51cf917bdb44097066fab608c0facde5b
306+
Merge: b2cf1cd0de 0254477421
307+
Author: BoloniniD <[email protected]>
308+
Date: Thu Apr 7 01:07:38 2022 +0300
309+
310+
Merge branch 'BLAKE3' of github.com:BoloniniD/ClickHouse into BLAKE3
311+
312+
commit 645e156af6b362145fad82d714f8e70a5b5a55a8
313+
Author: Meena Renganathan <[email protected]>
314+
Date: Wed Apr 6 14:50:10 2022 -0700
315+
316+
Updated the boringssl-cmake to match the latest broingssl module update
317+
318+
diff --git a/.gitmodules b/.gitmodules
319+
index 6c9e66f9cb..9cee5f697e 100644
320+
--- a/.gitmodules
321+
+++ b/.gitmodules
322+
@@ -207 +206,0 @@
323+
- branch = MergeWithUpstream
324+
`,
325+
Output: &File{
326+
OldName: ".gitmodules",
327+
NewName: ".gitmodules",
328+
OldMode: os.FileMode(0100644),
329+
OldOIDPrefix: "6c9e66f9cb",
330+
NewOIDPrefix: "9cee5f697e",
331+
},
332+
Preamble: `commit 645e156af6b362145fad82d714f8e70a5b5a55a8
333+
Author: Meena Renganathan <[email protected]>
334+
Date: Wed Apr 6 14:50:10 2022 -0700
335+
336+
Updated the boringssl-cmake to match the latest broingssl module update
337+
338+
`,
339+
},
304340
}
305341

306342
for name, test := range tests {

0 commit comments

Comments
 (0)