Title: Patch context is applied as well · Issue #55 · techtonik/python-patch · GitHub
Open Graph Title: Patch context is applied as well · Issue #55 · techtonik/python-patch
X Title: Patch context is applied as well · Issue #55 · techtonik/python-patch
Description: Given file.txt: a b c And this patch (my.diff): --- file.txt +++ file.txt @@ -1,3 +1,4 @@ a b +b1 d Which is applied using: import patch p = patch.fromfile("my.diff") p.apply(".") file.txt now looks like this: a b b1 d The patch only add...
Open Graph Description: Given file.txt: a b c And this patch (my.diff): --- file.txt +++ file.txt @@ -1,3 +1,4 @@ a b +b1 d Which is applied using: import patch p = patch.fromfile("my.diff") p.apply(".") file.txt now look...
X Description: Given file.txt: a b c And this patch (my.diff): --- file.txt +++ file.txt @@ -1,3 +1,4 @@ a b +b1 d Which is applied using: import patch p = patch.fromfile("my.diff") p.apply("."...
Opengraph URL: https://github.com/techtonik/python-patch/issues/55
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Patch context is applied as well","articleBody":"Given `file.txt`:\r\n```\r\na\r\nb\r\nc\r\n```\r\nAnd this patch (`my.diff`):\r\n```\r\n--- file.txt\r\n+++ file.txt\r\n@@ -1,3 +1,4 @@\r\n a\r\n b\r\n+b1\r\n d\r\n```\r\n\r\nWhich is applied using:\r\n```.py\r\nimport patch\r\np = patch.fromfile(\"my.diff\")\r\np.apply(\".\")\r\n```\r\n\r\n`file.txt` now looks like this:\r\n```\r\na\r\nb\r\nb1\r\nd\r\n```\r\n\r\nThe patch only adds `b1` but the following context was also put into the file. After applying the patch `file.txt` should not contain `d` but end with `c`.","author":{"url":"https://github.com/SeverinLeonhardt","@type":"Person","name":"SeverinLeonhardt"},"datePublished":"2018-01-26T15:57:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/55/python-patch/issues/55"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b2967a63-2edc-73f5-7f40-53c211ed1c2c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A46A:3454A3:80656A4:AA954D7:696E02E9 |
| html-safe-nonce | 114422d28ce36a222ef43f66844d041bed63b1ad5dde1b6d621f71004a7f2f2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDZBOjM0NTRBMzo4MDY1NkE0OkFBOTU0RDc6Njk2RTAyRTkiLCJ2aXNpdG9yX2lkIjoiNDcxMjI4MzExNzg2NTI3MjA0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ba61c5bfbb89abef44318fc53a8700895c48de64656d2b883755b1e1aa6bd9b8 |
| hovercard-subject-tag | issue:291946205 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/techtonik/python-patch/55/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d9a45839b1ac3844ef9c2c334b62d99fa1fc2d0a7b5c97b92e35316918816984/techtonik/python-patch/issues/55 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d9a45839b1ac3844ef9c2c334b62d99fa1fc2d0a7b5c97b92e35316918816984/techtonik/python-patch/issues/55 |
| og:image:alt | Given file.txt: a b c And this patch (my.diff): --- file.txt +++ file.txt @@ -1,3 +1,4 @@ a b +b1 d Which is applied using: import patch p = patch.fromfile("my.diff") p.apply(".") file.txt now look... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SeverinLeonhardt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b5131b207ddd175abf059a848d5f4302ec0606b02211b989013be49cf08593e |
| turbo-cache-control | no-preview |
| go-import | github.com/techtonik/python-patch git https://github.com/techtonik/python-patch.git |
| octolytics-dimension-user_id | 515889 |
| octolytics-dimension-user_login | techtonik |
| octolytics-dimension-repository_id | 34159484 |
| octolytics-dimension-repository_nwo | techtonik/python-patch |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 34159484 |
| octolytics-dimension-repository_network_root_nwo | techtonik/python-patch |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8590a63bfc8093b241930ca57d536c9a50f9680 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width