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)
528528 * but we didn't actually show the commit.
529529 */
530530 rev -> max_count ++ ;
531- if (!rev -> reflog_info ) {
531+ if (!rev -> reflog_info && ! rev -> remerge_diff ) {
532532 /*
533533 * 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.
535539 */
536540 free_commit_buffer (the_repository -> parsed_objects ,
537541 commit );
Original file line number Diff line number Diff line change @@ -352,4 +352,11 @@ test_expect_success 'remerge-diff turns off history simplification' '
352352 test_cmp expect actual
353353'
354354
355+ test_expect_success ' remerge-diff with --reverse' '
356+ git log -1 --remerge-diff --oneline ab_resolution^ >expect &&
357+ git log -1 --remerge-diff --oneline ab_resolution >>expect &&
358+ git log -2 --remerge-diff --oneline ab_resolution --reverse >actual &&
359+ test_cmp expect actual
360+ '
361+
355362test_done
You can’t perform that action at this time.
0 commit comments