Skip to content

diff: add -p and -F to show function lines in hunk headers - #323

Merged
sylvestre merged 1 commit into
diff-context-timestampfrom
diff-function-line
Nov 3, 2026
Merged

sylvestre merged 1 commit into
diff-context-timestampfrom
diff-function-line

Conversation

@sylvestre

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLI • Give Feedback 💬

@sylvestre
sylvestre added this pull request to stack #328 October 24, 2026 13:02
@sylvestre
sylvestre marked this pull request as ready for review October 24, 2026 13:14
Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Copilot AI balanced review requested due to automatic review settings October 24, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Copilot AI balanced review requested due to automatic review settings October 25, 2026 08:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Copilot AI balanced review requested due to automatic review settings October 25, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Should make test function-line-vs-leading-space pass.
Copilot AI balanced review requested due to automatic review settings November 2, 2026 08:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues

Review effort: Lite

Comment thread src/context_diff.rs
Comment on lines +341 to +345
let mut function_lines = FunctionLineFinder::new(expected, &params.function_line_patterns);
for result in diff_results {
let function_line = function_lines
.as_mut()
.and_then(|finder| finder.find(result.line_number_expected));
Comment thread src/unified_diff.rs
Comment on lines +263 to +267
let mut function_lines = FunctionLineFinder::new(expected, &params.function_line_patterns);
for result in diff_results {
let function_line = function_lines
.as_mut()
.and_then(|finder| finder.find(result.line_number_expected as usize));
Comment thread src/utils.rs
Comment on lines +71 to +81
pub fn new(old_text: &'a [u8], patterns: &'a [Bre]) -> Option<Self> {
if patterns.is_empty() {
return None;
}
Some(Self {
lines: old_text.split(|&byte| byte == b'\n').collect(),
patterns,
next_line: 0,
last_match: None,
})
}
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

GNU diffutils testsuite comparison:

Test results comparison:
  Current:   TOTAL: 33 / PASSED: 14 / FAILED: 15 / SKIPPED: 4
  Reference: TOTAL: 33 / PASSED: 8 / FAILED: 21 / SKIPPED: 4

Changes from main branch:
  TOTAL: +0
  PASSED: +6
  FAILED: -6

Test improvements (6):
  + binary
  + colors
  + function-line-vs-leading-space
  + label-vs-func
  + new-file
  + stdin

@sylvestre
sylvestre merged commit b745d8a into main Nov 3, 2026
41 of 47 checks passed
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.

2 participants