-
-
Notifications
You must be signed in to change notification settings - Fork 954
add replace method to git.Commit #1124
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
Conversation
This adds a replace method to git.Commit. The replace method returns a copy of the Commit object with attributes replaced from keyword arguments. For example: >>> old = repo.head.commit >>> new = old.replace(message='This is a test') closes gitpython-developers#1123
826cf16
to
36811a2
Compare
use Commit.replace from gitpython-developers/GitPython#1124.
Thanks so much, absolutely perfect work (at least as far as I can tell :)).
I must admit that initially I was skeptical when reading the corresponding issue, but now that I see the implementation I couldn't find a reason not to have this capability.
If you would like the next release to contain a dedicated and deserved entry in the changelog (change.rst
), please feel free to submit another PR. The next release is not scheduled but from experience these happen every few weeks.
- add a changelog entry for gitpython-developers#1124 - correct duplicate entry for 3.1.12 -> 3.1.13
Uh oh!
There was an error while loading. Please reload this page.
This adds a replace method to git.Commit. The replace method returns a
copy of the Commit object with attributes replaced from keyword
arguments. For example:
closes #1123