Title: RFE: Give Commit objects a replace method that returns new Commit with modified attributes · Issue #1123 · gitpython-developers/GitPython · GitHub
Open Graph Title: RFE: Give Commit objects a replace method that returns new Commit with modified attributes · Issue #1123 · gitpython-developers/GitPython
X Title: RFE: Give Commit objects a replace method that returns new Commit with modified attributes · Issue #1123 · gitpython-developers/GitPython
Description: The datetime objects produced by Python's datetime module are immutable, much like Commit objects. The datetime module provides a convenient replace function that returns a new object based on an old with one or more attributes replaced....
Open Graph Description: The datetime objects produced by Python's datetime module are immutable, much like Commit objects. The datetime module provides a convenient replace function that returns a new object based on an o...
X Description: The datetime objects produced by Python's datetime module are immutable, much like Commit objects. The datetime module provides a convenient replace function that returns a new object based on ...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1123
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RFE: Give Commit objects a replace method that returns new Commit with modified attributes","articleBody":"The `datetime` objects produced by Python's `datetime` module are immutable, much like `Commit` objects. The `datetime` module provides a convenient `replace` function that returns a new object based on an old with one or more attributes replaced. E.g, I can write:\r\n\r\n```\r\n\u003e\u003e\u003e d = datetime.datetime.now()\r\n\u003e\u003e\u003e d.replace(hour=0, minute=0, second=0)\r\ndatetime.datetime(2021, 2, 15, 0, 0, 0, 318021)\r\n```\r\n\r\nI would like to see the same api on `Commit` objects, so that one could write:\r\n\r\n```\r\n\u003e\u003e\u003e newcommit = oldcommit.replace(message='This is a test', author='Cookie Monster')\r\n```\r\n\r\n","author":{"url":"https://github.com/larsks","@type":"Person","name":"larsks"},"datePublished":"2021-02-15T23:05:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1123/GitPython/issues/1123"}
| 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:0205d302-f477-9014-eac8-c4e0b830044a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E68A:DED1E:2A6A1E:38B566:6A614AD9 |
| html-safe-nonce | 0672fdc5aeba6f214944b8cbbcaa15bb3fe3baa3b708b48f9ce8e6366dbcaf1f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjhBOkRFRDFFOjJBNkExRTozOEI1NjY6NkE2MTRBRDkiLCJ2aXNpdG9yX2lkIjoiODQ3MjIzNDQ1MTAxMTcxNzg0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 493ab46240f7779b174b4af0a7d01377ed36bcc758cc3e0e1dd0c689ae787ab9 |
| hovercard-subject-tag | issue:808867053 |
| 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/gitpython-developers/GitPython/1123/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5062df228afd97cc0370aba32e42398126ca6713d29a2fdfc4795d9d3c9f6bfb/gitpython-developers/GitPython/issues/1123 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5062df228afd97cc0370aba32e42398126ca6713d29a2fdfc4795d9d3c9f6bfb/gitpython-developers/GitPython/issues/1123 |
| og:image:alt | The datetime objects produced by Python's datetime module are immutable, much like Commit objects. The datetime module provides a convenient replace function that returns a new object based on an o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | larsks |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4876c15b81beff1a5306612a3386748550c731559f1dbbe4cf7146fda63fc0e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| 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 | 3e1bd3b6ebab0d27ffbef3a6bbb1043bc5f098ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width