Skip to content
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

externalise dependency on git #2253

Closed
Panaetius opened this issue Aug 11, 2021 · 1 comment · Fixed by #2363
Closed

externalise dependency on git #2253

Panaetius opened this issue Aug 11, 2021 · 1 comment · Fixed by #2363
Assignees

Comments

@Panaetius
Copy link
Member

we currently depend on gitpython directly in many places, but ideally git would just be an implementation detail.

We should have an interface that defines certain common operations that we use git for that then has a git specific implementation that gets injected as a dependency, so our code only depends on the interface.

As such, the interface should have methods for "git add", "git commit", "git push" directly, but should potentially combine those to units that make sense from our code (e.g. add and commit in a single method called persist_file_changes), in a way that it could still be used with a different implementation of the interface, like if we wanted to use subversion as a backend (not that we'd ever do this...).

@Panaetius
Copy link
Member Author

We should also consider moving away from GitPython. iterative/dvc#2215 has some very similar considerations and might be a good starting point for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants