Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:masterfromlarsks:feature/replace
Feb 17, 2021

Conversation

larsks
Copy link
Contributor

@larskslarsks commentedFeb 16, 2021
edited
Loading

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#1123

This adds a replace method to git.Commit. The replace method returns acopy of the Commit object with attributes replaced from keywordarguments. For example:>>> old = repo.head.commit>>> new = old.replace(message='This is a test')closesgitpython-developers#1123
larsks added a commit to larsks/git-snippets that referenced this pull requestFeb 16, 2021
larsks added a commit to larsks/git-snippets that referenced this pull requestFeb 16, 2021
@ByronByron added this to thev3.1.14 - Bugfixes milestoneFeb 17, 2021
@Byron
Copy link
Member

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.

@ByronByron merged commita880c5f intogitpython-developers:masterFeb 17, 2021
larsks added a commit to larsks/GitPython that referenced this pull requestFeb 17, 2021
- add a changelog entry forgitpython-developers#1124- correct duplicate entry for 3.1.12 -> 3.1.13
Byron added a commit that referenced this pull requestFeb 17, 2021
@larskslarsks deleted the feature/replace branchAugust 24, 2022 17:49
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Development

Successfully merging this pull request may close these issues.

RFE: Give Commit objects a replace method that returns new Commit with modified attributes
2 participants
@larsks@Byron

[8]ページ先頭

©2009-2025 Movatter.jp