@@ -240,4 +240,75 @@ test_expect_success 'log --graph with octopus merge with column joining its penu
240
240
EOF
241
241
'
242
242
243
+ test_expect_success ' log --graph with multiple tips' '
244
+ git checkout --orphan 6_1 &&
245
+ test_commit 6_A &&
246
+ git branch 6_2 &&
247
+ git branch 6_4 &&
248
+ test_commit 6_B &&
249
+ git branch 6_3 &&
250
+ test_commit 6_C &&
251
+ git checkout 6_2 && test_commit 6_D &&
252
+ git checkout 6_3 && test_commit 6_E &&
253
+ git checkout -b 6_5 6_1 &&
254
+ git merge --no-ff 6_2 -m 6_F &&
255
+ git checkout 6_4 && test_commit 6_G &&
256
+ git checkout 6_3 &&
257
+ git merge --no-ff 6_4 -m 6_H &&
258
+ git checkout 6_1 &&
259
+ git merge --no-ff 6_2 -m 6_I &&
260
+
261
+ check_graph 6_1 6_3 6_5 <<-\EOF
262
+ * 6_I
263
+ |\
264
+ | | * 6_H
265
+ | | |\
266
+ | | | * 6_G
267
+ | | * | 6_E
268
+ | | | | * 6_F
269
+ | |_|_|/|
270
+ |/| | |/
271
+ | | |/|
272
+ | |/| |
273
+ | * | | 6_D
274
+ | | |/
275
+ | |/|
276
+ * | | 6_C
277
+ | |/
278
+ |/|
279
+ * | 6_B
280
+ |/
281
+ * 6_A
282
+ EOF
283
+ '
284
+
285
+ test_expect_success ' log --graph with multiple tips and colors' '
286
+ test_config log.graphColors red,green,yellow,blue,magenta,cyan &&
287
+ cat >expect.colors <<-\EOF &&
288
+ * 6_I
289
+ <RED>|<RESET><GREEN>\<RESET>
290
+ <RED>|<RESET> <GREEN>|<RESET> * 6_H
291
+ <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET><BLUE>\<RESET>
292
+ <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET> * 6_G
293
+ <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET> <BLUE>|<RESET> * 6_F
294
+ <RED>|<RESET> <GREEN>|<RESET><RED>_<RESET><YELLOW>|<RESET><RED>_<RESET><BLUE>|<RESET><RED>/<RESET><GREEN>|<RESET>
295
+ <RED>|<RESET><RED>/<RESET><GREEN>|<RESET> <YELLOW>|<RESET> <BLUE>|<RESET><GREEN>/<RESET>
296
+ <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET><GREEN>/<RESET><BLUE>|<RESET>
297
+ <RED>|<RESET> <GREEN>|<RESET><GREEN>/<RESET><YELLOW>|<RESET> <BLUE>|<RESET>
298
+ <RED>|<RESET> <GREEN>|<RESET> * <BLUE>|<RESET> 6_E
299
+ <RED>|<RESET> * <CYAN>|<RESET> <BLUE>|<RESET> 6_D
300
+ <RED>|<RESET> <BLUE>|<RESET> <CYAN>|<RESET><BLUE>/<RESET>
301
+ <RED>|<RESET> <BLUE>|<RESET><BLUE>/<RESET><CYAN>|<RESET>
302
+ * <BLUE>|<RESET> <CYAN>|<RESET> 6_C
303
+ <CYAN>|<RESET> <BLUE>|<RESET><CYAN>/<RESET>
304
+ <CYAN>|<RESET><CYAN>/<RESET><BLUE>|<RESET>
305
+ * <BLUE>|<RESET> 6_B
306
+ <BLUE>|<RESET><BLUE>/<RESET>
307
+ * 6_A
308
+ EOF
309
+ git log --color=always --graph --date-order --pretty=tformat:%s 6_1 6_3 6_5 >actual.colors.raw &&
310
+ test_decode_color <actual.colors.raw | sed "s/ *\$//" >actual.colors &&
311
+ test_cmp expect.colors actual.colors
312
+ '
313
+
243
314
test_done
0 commit comments