Skip to content

fix(git): mark truncated git log output - #4939

Open
alexrain wants to merge 1 commit into
rtk-ai:developfrom
alexrain:fix/git-log-truncation-marker
Open

alexrain wants to merge 1 commit into
rtk-ai:developfrom
alexrain:fix/git-log-truncation-marker

Conversation

@alexrain

@alexrain alexrain commented Nov 2, 2026 •

Copy link
Copy Markdown

Fixes #2204.

rtk git log caps the output it prints, but the cap had no marker, so a truncated history read as complete. Both the RTK-injected format path and the user-format path now append the number of omitted commits or lines and how to raise the limit. The guard still keeps the filtered output shorter than the raw stream.

Tests: cargo test --lib test_filter_log_output_cap_lines and cargo test --lib test_user_format_log_lines_with_limit.

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working git output labels Nov 2, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Fixes silent truncation in rtk git log output by appending a marker indicating how many commits or lines were omitted when the output is capped, for both the user-format and RTK-injected format code paths. Updates existing unit tests to assert the new marker text appears.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #2204


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

@alexrain
alexrain force-pushed the fix/git-log-truncation-marker branch from 3a92705 to 70ac03f Compare November 2, 2026 03:15
@alexrain

alexrain commented Nov 9, 2026

Copy link
Copy Markdown
Author

Friendly ping: this branch is rebased on the latest develop and the targeted tests pass locally. The full lib suite also passes except for the environment-specific test_all_git_pi_plugin_revisions_are_allowlisted check, which fails here because the WSL test isolation hides the repo's safe.directory setting.

The workflow is currently action_required because this is a fork PR. Could a maintainer approve the CI run and take a look when convenient? Happy to adjust the scope or tests.

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

Labels

bug Something isn't working git output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

passthrough_max_chars truncates output silently (no marker) — git log shows 50 of 252 commits, misleads scope

1 participant