Title: Use the Git class type definition within Repo classmethods by mmulich · Pull Request #1322 · gitpython-developers/GitPython · GitHub
Open Graph Title: Use the Git class type definition within Repo classmethods by mmulich · Pull Request #1322 · gitpython-developers/GitPython
X Title: Use the Git class type definition within Repo classmethods by mmulich · Pull Request #1322 · gitpython-developers/GitPython
Description: Allow the GitCommandWrapperType definition to be used within the Repo classmethods. This change follows the intended purpose as stated in the code, "Subclasses may easily bring in their own custom types by placing a constructor or type here." The usecase that prompted this change has to do with GIT_SSH_COMMAND. The goal is to setup a custom Git class with knowledge of the value, something like as follows from git import Git as BaseGit, Repo as BaseRepo class Git(BaseGit): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # For example, assign the SSH command using the current flask # app's configured setting. self.update_environment(GIT_SSH_COMMAND=current_app.config['GIT_SSH_COMMAND']) class Repo(BaseRepo): GitCommandWrapperType = Git With this change, the above example will allow the developer to use Repo.clone_from(...) with the intended outcome. Otherwise the developer will have two differing result when using Repo(...) vs Repo.clone_from(...).
Open Graph Description: Allow the GitCommandWrapperType definition to be used within the Repo classmethods. This change follows the intended purpose as stated in the code, "Subclasses may easily bring in their own cu...
X Description: Allow the GitCommandWrapperType definition to be used within the Repo classmethods. This change follows the intended purpose as stated in the code, "Subclasses may easily bring in their ow...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1322
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4e8be7cd-f88f-09dd-efd2-108e6c53e8d9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B594:3F89C5:1B54BF:244832:6A595359 |
| html-safe-nonce | e75d2957d1142ea8c8c6d64c82e923f721a17ec2dbdcac7a6a800e9028dd781c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTk0OjNGODlDNToxQjU0QkY6MjQ0ODMyOjZBNTk1MzU5IiwidmlzaXRvcl9pZCI6IjEwMzAyMzczMzMyNDM5MDg5NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a13ed1e12d2b7c7c05e13418c0f3c34185bab4e3c9492cd459c24fad08af26dc |
| hovercard-subject-tag | pull_request:714533782 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/gitpython-developers/GitPython/pull/1322/files |
| twitter:image | https://avatars.githubusercontent.com/u/168470?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/168470?s=400&v=4 |
| og:image:alt | Allow the GitCommandWrapperType definition to be used within the Repo classmethods. This change follows the intended purpose as stated in the code, "Subclasses may easily bring in their own cu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5f35ad1fb16417d6e6774c537b62a2fe92222907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width