Documentation ¶
Index ¶
- Constants
- func Add(path string) error
- func FindObject(sha1Prefix string) (string, error)
- func HashObject(param HashParam) (string, string, error)
- func Initail(repo string) error
- func PrintHelp()
- func Version() string
- func WriteIndex(indexes []Index) error
- type HashParam
- type Index
- type Indexes
- type ObjType
- type Object
Constants ¶
View Source
const ( // RepoRootPath root repo folder. RepoRootPath = ".tinygit" // ObjectsFolder objects folder. ObjectsFolder = "objects" )
Variables ¶
This section is empty.
Functions ¶
func FindObject ¶
FindObject find object with given SHA-1 prefix and return path to object in object store, or raise ValueError if there are no objects or multiple objects with this prefix.
func HashObject ¶
HashObject compute hash of object data of given type and write to object store if "WriteFile" is True. Return SHA-1 object hash as hex string.
func WriteIndex ¶
WriteIndex write list of Index objects to tinygit index file.
Types ¶
type Index ¶
type Index struct { CTimeS int64 CTimeN int64 MTimeS int64 MTimeN int64 Dev int32 INO uint64 Mode uint16 UID uint32 GID uint32 Size int64 Sha1 string Flags uint32 Path string }
Index represents a index struct.
type Indexes ¶
type Indexes []Index
Indexes represents a index slice for sort.
Click to show internal directories.
Click to hide internal directories.