Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Fix up the commit trailers functionality#1576
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…s functionality. Update trailers tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks a lot for your help, it looks very good already!
There isn't much missing at all for getting it merged, and I am looking forward to hearing what you think. Thank you.
git/objects/commit.py Outdated
Git messages can contain trailer information that are similar to RFC 822 | ||
e-mail headers (see: https://git-scm.com/docs/git-interpret-trailers). | ||
WARNING: This function only returns the latest instance of each trailer key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think it's OK to deprecate it, and suggest usingtrailers_dict()
. Then this warning can be removed as it will show up when using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Agreed - deprecated78424b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That's not deprecation 😅, that's downright removal, which is a breaking change.
After taking a look I realize now that there is no built-in facility for marking properties or functions as deprecated. So I think documenting the deprecation is as good as it gets.
Sorry for the hassle, but once that is reverted, it's ready to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
No worries!trailers
method is back -9ef07a7
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Thanks a lot for bearing with me on this one, and I really appreciate the one commit per change with reference to it in the respective comment. There is justone tiny adjustment left and then it's ready to go. |
Thanks a lot for the contribution, much appreciated! |
No problem! Issue#1533 can also be closed now. 😄 |
[](https://renovatebot.com)This PR contains the following updates:| Package | Change | Age | Adoption | Passing | Confidence ||---|---|---|---|---|---|| [GitPython](https://togithub.com/gitpython-developers/GitPython) |`==3.1.31` -> `==3.1.32` |[](https://docs.renovatebot.com/merge-confidence/)|[](https://docs.renovatebot.com/merge-confidence/)|[](https://docs.renovatebot.com/merge-confidence/)|[](https://docs.renovatebot.com/merge-confidence/)|---### Release Notes<details><summary>gitpython-developers/GitPython (GitPython)</summary>###[`v3.1.32`](https://togithub.com/gitpython-developers/GitPython/releases/tag/3.1.32):- with another security update[CompareSource](https://togithub.com/gitpython-developers/GitPython/compare/3.1.31...3.1.32)#### What's Changed- Bump cygwin/cygwin-install-action from 3 to 4 by[@​dependabot](https://togithub.com/dependabot) in[https://github.com/gitpython-developers/GitPython/pull/1572](https://togithub.com/gitpython-developers/GitPython/pull/1572)- Fix up the commit trailers functionality by[@​itsluketwist](https://togithub.com/itsluketwist) in[https://github.com/gitpython-developers/GitPython/pull/1576](https://togithub.com/gitpython-developers/GitPython/pull/1576)- Name top-level exceptions as private variables by[@​Hawk777](https://togithub.com/Hawk777) in[https://github.com/gitpython-developers/GitPython/pull/1590](https://togithub.com/gitpython-developers/GitPython/pull/1590)- fix pypi long description by[@​eUgEntOptIc44](https://togithub.com/eUgEntOptIc44) in[https://github.com/gitpython-developers/GitPython/pull/1603](https://togithub.com/gitpython-developers/GitPython/pull/1603)- Don't rely on **del** by[@​r-darwish](https://togithub.com/r-darwish) in[https://github.com/gitpython-developers/GitPython/pull/1606](https://togithub.com/gitpython-developers/GitPython/pull/1606)- Block insecure non-multi options in clone/clone_from by[@​Beuc](https://togithub.com/Beuc) in[https://github.com/gitpython-developers/GitPython/pull/1609](https://togithub.com/gitpython-developers/GitPython/pull/1609)#### New Contributors- [@​Hawk777](https://togithub.com/Hawk777) made their firstcontribution in[https://github.com/gitpython-developers/GitPython/pull/1590](https://togithub.com/gitpython-developers/GitPython/pull/1590)- [@​eUgEntOptIc44](https://togithub.com/eUgEntOptIc44) made theirfirst contribution in[https://github.com/gitpython-developers/GitPython/pull/1603](https://togithub.com/gitpython-developers/GitPython/pull/1603)- [@​r-darwish](https://togithub.com/r-darwish) made their firstcontribution in[https://github.com/gitpython-developers/GitPython/pull/1606](https://togithub.com/gitpython-developers/GitPython/pull/1606)- [@​Beuc](https://togithub.com/Beuc) made their firstcontribution in[https://github.com/gitpython-developers/GitPython/pull/1609](https://togithub.com/gitpython-developers/GitPython/pull/1609)**Full Changelog**:gitpython-developers/GitPython@3.1.31...3.1.32</details>---### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined),Automerge - At any time (no schedule defined).🚦 **Automerge**: Enabled.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick therebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about this updateagain.---- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, checkthis box---This PR has been generated by [MendRenovate](https://www.mend.io/free-developer-tools/renovate/). Viewrepository job log[here](https://developer.mend.io/github/allenporter/flux-local).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bump gitpython from 3.1.31 to 3.1.32Bumps gitpython from 3.1.31 to 3.1.32.Release notesSourced from gitpython's releases.v3.1.32 - with another security updateWhat's ChangedBump cygwin/cygwin-install-action from 3 to 4 by @dependabot ingitpython-developers/GitPython#1572Fix up the commit trailers functionality by @itsluketwist ingitpython-developers/GitPython#1576Name top-level exceptions as private variables by @Hawk777 ingitpython-developers/GitPython#1590fix pypi long description by @eUgEntOptIc44 ingitpython-developers/GitPython#1603Don't rely on del by @r-darwish ingitpython-developers/GitPython#1606Block insecure non-multi options in clone/clone_from by @Beuc ingitpython-developers/GitPython#1609New Contributors@Hawk777 made their first contribution ingitpython-developers/GitPython#1590@eUgEntOptIc44 made their first contribution ingitpython-developers/GitPython#1603@r-darwish made their first contribution ingitpython-developers/GitPython#1606@Beuc made their first contribution ingitpython-developers/GitPython#1609Full Changelog: gitpython-developers/GitPython@3.1.31...3.1.32Commits5d45ce2 prepare 3.1.32 releaseca965ec Merge pull request #1609 from Beuc/block-insecure-options-clone-non-multi5c59e0d Block insecure non-multi options in clone/clone_fromc09a71e Merge pull request #1606 from r-darwish/no-dela3859ee fixes8186159 Don't rely on del741edb5 Merge pull request #1603 from eUgEntOptIc44/eugenoptic44-fix-pypi-long-descri...0c543cd Improve readability of README.md9cd7ddb Improve the 'long_description' displayed on pypi6fc11e6 update README to reflect the status quo on git command usageAdditional commits viewable in compare viewDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting@dependabot rebase.Dependabot commands and optionsYou can trigger Dependabot actions by commenting on this PR:@dependabot rebase will rebase this PR@dependabot recreate will recreate this PR, overwriting any edits that have been made to it@dependabot merge will merge this PR after your CI passes on it@dependabot squash and merge will squash and merge this PR after your CI passes on it@dependabot cancel merge will cancel a previously requested merge and block automerging@dependabot reopen will reopen this PR if it is closed@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)You can disable automated security fix PRs for this repo from the Security Alerts page.Reviewed-by: Vladimir Vshivkov
Uh oh!
There was an error while loading.Please reload this page.
Add trailers_dict and trailers_list methods to fix the commit trailers functionality.
I left the existing method as is to not break any existing code using it, leaving a comment about how it's incorrect.
Also updated the trailers tests.
Work here resolves issue#1533