Documentation ¶
Index ¶
- func HashObjectFromPath(path string, oType object.ObjectKind, save bool) (common.Hash, error)
- func HashObjectFromReader(r io.Reader, oType object.ObjectKind, save bool) (common.Hash, error)
- type DirEntry
- type References
- type Repository
- func (r *Repository) Dump(oid common.Hash, w io.Writer) error
- func (r *Repository) Get(oid common.Hash) (*object.GitObject, error)
- func (r *Repository) GetAsBlob(oid common.Hash) (*object.Blob, error)
- func (r *Repository) GetAsTree(oid common.Hash) (*object.Tree, error)
- func (r *Repository) InitRepository(w io.Writer, root string) error
- func (r *Repository) LoadTrees(rootId common.Hash) (*object.Tree, error)
- func (r *Repository) ObjectsPath() string
- func (r *Repository) Put(g *object.GitObject) error
- type StagingArea
- func (s *StagingArea) Dump(w io.Writer)
- func (s *StagingArea) Load()
- func (s *StagingArea) ReadTree(treeId common.Hash, prefix string, eraseOriginal bool) error
- func (s *StagingArea) Save() error
- func (s *StagingArea) Stage(paths []string) error
- func (s *StagingArea) Unstage(paths []string, recursive bool)
- func (s *StagingArea) UpdateIndex(path string)
- func (s *StagingArea) UpdateIndexFromCache(oid common.Hash, path string, mode common.FileMode)
- func (s *StagingArea) UpdateIndexRemove(path string)
- func (s *StagingArea) WriteTree() (common.Hash, error)
- type VirtualFileSystem
- type WorkingArea
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashObjectFromPath ¶
func HashObjectFromReader ¶
Types ¶
type References ¶
type References struct {
// contains filtered or unexported fields
}
func GetReferencs ¶
func GetReferencs() *References
func (*References) Head ¶
func (r *References) Head() string
func (*References) SaveCommit ¶
func (r *References) SaveCommit(id common.Hash) error
type Repository ¶
func GetRepository ¶
func GetRepository() *Repository
func (*Repository) InitRepository ¶
func (r *Repository) InitRepository(w io.Writer, root string) error
Init Git Repository in the path. Default, root == "."
func (*Repository) ObjectsPath ¶
func (r *Repository) ObjectsPath() string
type StagingArea ¶
func GetStagingArea ¶
func GetStagingArea() *StagingArea
func (*StagingArea) Dump ¶
func (s *StagingArea) Dump(w io.Writer)
func (*StagingArea) Load ¶
func (s *StagingArea) Load()
func (*StagingArea) Save ¶
func (s *StagingArea) Save() error
func (*StagingArea) Stage ¶
func (s *StagingArea) Stage(paths []string) error
func (*StagingArea) Unstage ¶
func (s *StagingArea) Unstage(paths []string, recursive bool)
func (*StagingArea) UpdateIndex ¶
func (s *StagingArea) UpdateIndex(path string)
UpdateIndexEntry add or replace IndexEntry identified by path, and Invalidate all entries in TreeCache covered by path
func (*StagingArea) UpdateIndexFromCache ¶
func (*StagingArea) UpdateIndexRemove ¶
func (s *StagingArea) UpdateIndexRemove(path string)
If a specified file is in the index but is missing then it’s removed. Default behavior is to ignore removed file.
type VirtualFileSystem ¶
type VirtualFileSystem struct {
// contains filtered or unexported fields
}
func (*VirtualFileSystem) Add ¶
func (fs *VirtualFileSystem) Add(path string)
func (*VirtualFileSystem) Mount ¶
func (fs *VirtualFileSystem) Mount(root string)
func (*VirtualFileSystem) Unmount ¶
func (fs *VirtualFileSystem) Unmount()
type WorkingArea ¶
type WorkingArea struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.