Skip to content

FIlesystem abstraction for Git repositories (Afero compatible)

Notifications You must be signed in to change notification settings

tobiash/go-gitfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-gitfs

This library currently provides a read-only filesystem abstraction (compatible with the Afero Fs interface). This allows reading from a particular reference of the repository without having a working directory. It also works on bare repositories. It uses Go-Git to access the git repository.

Use NewROFromHEAD to get a filesystem view of the repository HEAD or NewROFromRef to get a filesystem representation of a particular Ref.

A writable Fs is work in progress - see rw.go. It currently leverages Afero's CopyOnWriteFs to overlay a writable filesystem on top of the read-only view - for example a MemMapFs could be used here. There is a Commit function to commit the contents of the filesystem to repository. However, CopyOnWriteFs has some limitations, for example it cannot really handle deletion of files properly.

About

FIlesystem abstraction for Git repositories (Afero compatible)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages