aviau / python-pass

For fun - I have decided to write pass in python
http://aviau.github.io/python-pass/
GNU General Public License v3.0
36 stars 17 forks source link

Use dulwich instead of git internally #24

Closed TheLastProject closed 4 years ago

TheLastProject commented 4 years ago

Because dulwich is a pure Python implementation of git, this means python-pass won't require the git client to exist, making it more portable to other systems.

aviau commented 4 years ago

Are there that many systems that don't support git?

aviau commented 4 years ago

I'd like it better if this was optional. Maybe create a GitBackend interface that is implemented with subprocess or with dulwich

TheLastProject commented 4 years ago

Are there that many systems that don't support git?

Well, Windows doesn't have git by default and as python-pass is python based, it seems nicest if none-Python dependencies would be limited to a minimum.

I'd like it better if this was optional. Maybe create a GitBackend interface that is implemented with subprocess or with dulwich

I suppose that makes sense, yeah. I'll take a look at that later.

TheLastProject commented 4 years ago

I've realized the PasswordStore class actually doesn't really do anything with git itself and only the command line usage directly calls git, so it turns out I actually had no issues at all using this as a library. I have thus implemented commit creation with dulwich in my own application (which uses python-pass internally) instead. Seeing your lack of interest in this issue and the added complexity of two git back-ends I think I'll drop this pull request and see if there are other places I can contribute to python-pass instead, especially around using it is a library (as I do).