Skip to content

Conversation

@twaugh
Copy link
Owner

@twaugh twaugh commented Aug 21, 2025

Fixes: #55

Adds new --as-numbered-lines options that preserve original line numbers
from the diff context, addressing GitHub issue #55. This is useful for
CI/CD systems that need to report errors on exact line numbers from the
original diff.

Changes:
- Add OriginalBefore and OriginalAfter to line_numbering enum
- Implement original line number tracking without munge_offset adjustment
- Update argument parsing to accept original-before/original-after values
- Extend help text and documentation with new options
- Add bash completion support for new options
- Add comprehensive test case for original line number functionality
- Update NEWS file with feature description

The existing before/after options maintain their current behavior of
showing adjusted line numbers, ensuring backward compatibility.

Fixes: #55

Assisted-by: Cursor
@twaugh twaugh force-pushed the grepdiff-original-line-numbers branch from c71242f to cf11c91 Compare August 21, 2025 08:50
@twaugh twaugh merged commit 1838191 into master Aug 21, 2025
3 checks passed
@twaugh twaugh deleted the grepdiff-original-line-numbers branch September 23, 2025 11:19
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.

grepdiff returns wrong line numbers for --output-matching=hunk

2 participants