afero icon indicating copy to clipboard operation
afero copied to clipboard

git backend

Open vjeantet opened this issue 6 years ago • 3 comments

Hello,

Is a git repo could be used as backend ?

#question

vjeantet avatar Nov 30 '19 17:11 vjeantet

@vjeantet I'm going to give answering your question a shot.

Theoretically you could use Afero to hold git projects. Doing so will require a git library that allows you to inject a filesystem interface. src-d/go-git supports this concept, unfortunately the interfaces don't line up so integrating them together is a painful.

the src-d team has created their own virtual filesystem which can check code out into memory/other file systems which might satisfy your need. Small disclaimer, it's not nearly built out to the level of Afero and doesn't include many of the utilities.

UPDATE:

I fixed this for myself so I can use afero with go-git: https://github.com/jonfriesen/go-billy-afero

jonfriesen avatar Dec 20 '19 16:12 jonfriesen

@jonfriesen, are you all still willing to support the billy adapter within Afero?

c4milo avatar Aug 03 '20 20:08 c4milo

@c4milo no, I no longer use this library and do not have the time. Thanks (and sorry!)

jonfriesen avatar Aug 04 '20 14:08 jonfriesen