Skip to content

fix(git): preserve patch output for log -p#2276

Open
puneetdixit200 wants to merge 1 commit into
rtk-ai:developfrom
puneetdixit200:fix/git-log-patch-passthrough
Open

fix(git): preserve patch output for log -p#2276
puneetdixit200 wants to merge 1 commit into
rtk-ai:developfrom
puneetdixit200:fix/git-log-patch-passthrough

Conversation

@puneetdixit200
Copy link
Copy Markdown

Summary

Fixes #2275.

git log -p asks git for patch output, but the current log path still runs the result through RTK's log summarizer. That treats the diff as commit-body text and drops the patch lines.

This change detects explicit patch-style log flags and sends that command through unchanged, preserving the full diff when the caller asks for it.

Validation

  • cargo fmt --all --check
  • CARGO_TARGET_DIR=/private/tmp/rtkbuild-2275 cargo test test_log_patch_args_request_passthrough -j1
  • CARGO_TARGET_DIR=/private/tmp/rtkbuild-2275 cargo test filter_log_output -j1
  • CARGO_TARGET_DIR=/private/tmp/rtkbuild-2275 cargo run --quiet -- git log -p -1 -- src/cmds/git/git.rs
  • CARGO_TARGET_DIR=/private/tmp/rtkbuild-2275 cargo test -j1
  • CARGO_TARGET_DIR=/private/tmp/rtkbuild-2275 cargo clippy --all-targets -j1

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


puneetdixit200 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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 -p" omits the patch requested by the -p flag

2 participants