File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -528,10 +528,14 @@ static int cmd_log_walk_no_free(struct rev_info *rev)
528
528
* but we didn't actually show the commit.
529
529
*/
530
530
rev -> max_count ++ ;
531
- if (!rev -> reflog_info ) {
531
+ if (!rev -> reflog_info && ! rev -> remerge_diff ) {
532
532
/*
533
533
* We may show a given commit multiple times when
534
- * walking the reflogs.
534
+ * walking the reflogs. Therefore we still need it.
535
+ *
536
+ * Likewise, we potentially still need the parents
537
+ * of * already shown commits to determine merge
538
+ * bases when showing remerge diffs.
535
539
*/
536
540
free_commit_buffer (the_repository -> parsed_objects ,
537
541
commit );
Original file line number Diff line number Diff line change @@ -353,4 +353,11 @@ test_expect_success 'remerge-diff turns off history simplification' '
353
353
test_cmp expect actual
354
354
'
355
355
356
+ test_expect_success ' remerge-diff with --reverse' '
357
+ git log -1 --remerge-diff --oneline ab_resolution^ >expect &&
358
+ git log -1 --remerge-diff --oneline ab_resolution >>expect &&
359
+ git log -2 --remerge-diff --oneline ab_resolution --reverse >actual &&
360
+ test_cmp expect actual
361
+ '
362
+
356
363
test_done
You can’t perform that action at this time.
0 commit comments