fix: preserve commit body in git log output#546
Merged
Conversation
Closes #467 git log now includes %b (body) in the format string and extracts the first meaningful line (skipping Signed-off-by/Co-authored-by trailers), displayed indented under the header. This preserves BREAKING CHANGE notices, Closes references, and design context for LLM agents. Also fixes resolved_command assertion in test and missing truncate import in cargo_cmd.rs (both from PR #269 rebase). Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
aeppling
approved these changes
Mar 13, 2026
pszymkowiak
added a commit
that referenced
this pull request
Mar 16, 2026
When user passes --oneline, --pretty, or --format, RTK correctly skips injecting its custom format with ---END--- markers. However, filter_log_output() still tried to split on ---END---, treating the entire output as a single block and only preserving 2 lines. Add user_format parameter to filter_log_output: when true, use simple line-based truncation instead of ---END--- block splitting. Fixes regression introduced in PR #546 (commit c3416eb). Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
6 tasks
pszymkowiak
added a commit
that referenced
this pull request
Mar 16, 2026
After the git log --oneline regression (PR #546), add a mandatory review step: trace all callers of modified functions and verify every input variant has a test. This prevents regressions where a function is changed but only one code path is tested. Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
pszymkowiak
added a commit
that referenced
this pull request
Mar 16, 2026
* fix: git log --oneline regression drops commits When user passes --oneline, --pretty, or --format, RTK correctly skips injecting its custom format with ---END--- markers. However, filter_log_output() still tried to split on ---END---, treating the entire output as a single block and only preserving 2 lines. Add user_format parameter to filter_log_output: when true, use simple line-based truncation instead of ---END--- block splitting. Fixes regression introduced in PR #546 (commit c3416eb). Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu> * chore: add call-site analysis rule to code-reviewer agent After the git log --oneline regression (PR #546), add a mandatory review step: trace all callers of modified functions and verify every input variant has a test. This prevents regressions where a function is changed but only one code path is tested. Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu> --------- Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
maxkulish
added a commit
to maxkulish/rtk
that referenced
this pull request
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
%b(body) in git log format to preserve BREAKING CHANGE, Closes #xxx, and design contextresolved_commandtest assertion from PR fix windows PATHEXT resolution for .cmd/.bat wrappers #269 (absolute path vs bare name)truncateimport incargo_cmd.rsfrom PR fix windows PATHEXT resolution for .cmd/.bat wrappers #269 rebaseCloses #467
Test plan
rtk git log -5shows bodies indented under headersrtk git log --onelinestill uses user format (no body injection)