Skip to content

fix(git): allow disabling --no-merges via config#1182

Closed
1llum1n4t1s wants to merge 1 commit into
rtk-ai:developfrom
1llum1n4t1s:fix/issue-1113-git-log-merge-commits
Closed

fix(git): allow disabling --no-merges via config#1182
1llum1n4t1s wants to merge 1 commit into
rtk-ai:developfrom
1llum1n4t1s:fix/issue-1113-git-log-merge-commits

Conversation

@1llum1n4t1s
Copy link
Copy Markdown

Summary

  • Add [git] no_merges config option to ~/.config/rtk/config.toml (default: true for backward compatibility)
  • When set to false, rtk git log no longer injects --no-merges, so merge commits appear in the output
  • Skip --no-merges injection when user explicitly passes --no-merges to avoid duplicate flags

Usage

# ~/.config/rtk/config.toml
[git]
no_merges = false   # include merge commits in git log

Test plan

  • test_git_config_default_no_merges_true — default is backward-compatible
  • test_git_config_no_merges_false — TOML deserialization works
  • test_git_config_absent_defaults_to_true — missing [git] section defaults correctly
  • cargo fmt && cargo clippy --all-targets && cargo test --all — 1356 tests pass, 0 failures

Closes #1113

🤖 Generated with Claude Code

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 10, 2026

CLA assistant check
All committers have signed the CLA.

@pszymkowiak pszymkowiak added effort-small Quelques heures, 1 fichier enhancement New feature or request labels Apr 10, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

Type feature
🟢 Risk low

Summary

Adds a configurable [git] no_merges option to the TOML config file, allowing users to disable the automatic --no-merges flag injection in rtk git log. The change also prevents duplicate --no-merges flags when the user explicitly passes it. Defaults to true for backward compatibility.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #1113


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@1llum1n4t1s 1llum1n4t1s changed the base branch from master to develop April 10, 2026 15:14
@1llum1n4t1s 1llum1n4t1s force-pushed the fix/issue-1113-git-log-merge-commits branch from 8770e38 to 940109c Compare April 10, 2026 15:19
@1llum1n4t1s 1llum1n4t1s force-pushed the fix/issue-1113-git-log-merge-commits branch from 940109c to 21973f3 Compare May 21, 2026 05:01
rtk git log always injected --no-merges, hiding merge commits with no
way to opt out. Add [git] no_merges config option (default: true for
backward compat). Users can set no_merges = false in config.toml to
include merge commits in git log output.

Also skip injection when user explicitly passes --no-merges to avoid
duplicate flags.

Closes #1113

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@1llum1n4t1s 1llum1n4t1s force-pushed the fix/issue-1113-git-log-merge-commits branch from 21973f3 to d57c247 Compare May 30, 2026 04:40
@1llum1n4t1s
Copy link
Copy Markdown
Author

Closing this PR as it doesn't look like it'll be merged. Feel free to reopen if there's interest. Thanks! 🙏

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

Labels

effort-small Quelques heures, 1 fichier enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk git log hides merge commits with no way to disable

3 participants