Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8405241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:48:13+00:00 2026-06-09T22:48:13+00:00

Patches are being done by getting an original version of a source code file

  • 0

Patches are being done by getting an original version of a source code file (let’s call it rev1), making changes to it (thus it becomes rev2), then using diff.

The patch applies cleanly to rev1, which is fine.

But, sometimes the same patch applies cleanly to other, modified versions of the same file (though, not always). When exactly this happens?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:48:15+00:00Added an answer on June 9, 2026 at 10:48 pm

    The exact conditions under which this happens depend on which patch application program you are using. However, most patch programs have heuristic algorithms which allow the base file to be different in certain ways from the base file originally used to create the patch.

    Most useful patch formats contain a few lines of unchanged “context” lines around changed lines. The patch program will use the line number information in the patch file (which might be different) in conjunction with the context lines to find where the appropriate place to apply the change is in the new base file. Usually, the line numbers are permitted to vary somewhat but the context lines must match exactly.

    In the case where the context lines differ and the patch program cannot find where the modification could go, it encounters a conflict (and might generate “rejected hunk” output).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to start making code patches to Rails. Are there any good
Generally,our fixes/patches for any bugs involves changes in multiple files and we will commit
I'm in a situation where some minor patches I've submitted to an open-source project
I have a batch file that contains commands to restore a database using patches
I have successfully imported patches without having conflicting changes. But when I try to
Commit patches and wait for INRIA to merge takes a long time and my
Are there any patches out there for custom keywords in SVN?
I am writing a script to install patches on Windows boxes. The best methodology
I have a reasonably advanced (many patches and subpatches) quartz composition that was created
I looking for a way to create Delta Diff Patches of Large Binary Files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.