Skip to content

fix(git): preserve merge commits in log output#2328

Open
fengjikui wants to merge 1 commit into
rtk-ai:developfrom
fengjikui:fix/git-log-merge-commits
Open

fix(git): preserve merge commits in log output#2328
fengjikui wants to merge 1 commit into
rtk-ai:developfrom
fengjikui:fix/git-log-merge-commits

Conversation

@fengjikui

Copy link
Copy Markdown

Fixes #2305.

Summary

  • stop adding --no-merges to default rtk git log invocations
  • preserve merge commits for plain log output and formatted output such as --oneline
  • factor log command setup so the default plan is covered by regression tests

Why

rtk git log previously injected --no-merges whenever the user did not pass an explicit count, which made merge commits invisible in common verification commands like rtk git log --oneline. Merge commits can be HEAD, so hiding them changes normal git log semantics and breaks merge/PR verification.

Validation

  • cargo fmt --check
  • cargo test cmds::git::git::tests::test_configure_log_command_preserves_merge_commits
  • cargo test cmds::git::git::tests
  • cargo clippy --all-targets -- -D warnings
  • cargo test (2147 passed, 8 ignored)
  • CLI smoke in a temp repo with a real merge commit: raw git log --oneline and rtk git log --oneline both listed the merge commit first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git log silently drops merge commits — breaks merge/HEAD verification (rtk git log)

1 participant