Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch: reduce Patch::Ed::apply() #974

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Feb 27, 2025

  • Split personality apply(): I spawn an external ed command, but also I process ed diffs myself
  • On systems where ed is available, users have the option to apply an ed-diff using ed instead of patch
  • In my view the point of patch is to directly process edits from diff files, not act as a wrapper around an external editor
  • ed-diffs are also not very common so it's even less important to maintain this external-ed code
  • This change will help to expose issues with processing ed-diffs, which would be masked by the code not being exercised

* Split personality: I spawn an external ed command, but also I process ed diffs myself
* On systems where ed is available, users have the option to apply an ed-diff using ed instead of patch
* In my view the point of patch is to directly process edits from diff files, not act as a wrapper around an external editor
* ed-diffs are also not very common so it's even less important to maintain this external-ed code within patch
* This change will help to expose issues with processing ed-diffs, which would be masked by the code not being exercised
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: patch The patch program labels Feb 27, 2025
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@github-actions github-actions bot added Status: needs verification issue needs to be verified Type: bug an existing feature does not work labels Feb 27, 2025
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:53 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:54 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing February 27, 2025 00:54 — with GitHub Actions Inactive
@coveralls
Copy link

coveralls commented Feb 27, 2025

Pull Request Test Coverage Report for Build 13556456739

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.7%) to 72.349%

Files with Coverage Reduction New Missed Lines %
bin/units 3 69.91%
Totals Coverage Status
Change from base Build 13547916301: -0.7%
Covered Lines: 348
Relevant Lines: 481

💛 - Coveralls

@briandfoy briandfoy self-assigned this Feb 27, 2025
@briandfoy briandfoy merged commit 51ac8d3 into briandfoy:master Feb 27, 2025
21 of 24 checks passed
@github-actions github-actions bot added Status: accepted The fix is accepted and removed Status: needs verification issue needs to be verified Priority: low get to this whenever labels Feb 27, 2025
@briandfoy
Copy link
Owner

changes: don't process diffs with ed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: patch The patch program Status: accepted The fix is accepted Type: bug an existing feature does not work Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants