Documentation
¶
Index ¶
- func AppendToFiles(filePath, commiter, email, msg, SHA1, time string) error
- func ChangeActiveBranch(pathToLit, branchname string) error
- func Checkout(PathToLit, BranchName string)
- func Commit(commitMessage, pathToBitDirectory string) error
- func CoreAdd(path string, untracked, modified, deleted []FileInfo)
- func CreateBranch(pathToLit, branchname string) error
- func CurrentActiveBranch(pathToLit string) (string, error)
- func DecompressAndSaveFile(inputFilePath, outputFilePath string) error
- func DecompressFile(inputFilePath string) (string, error)
- func GenerateIndex(PathToLit, Tree_Object_Hash string) (map[string]FileInfo, error)
- func GetIndexFileContent(path string) map[string]FileInfo
- func GetStatus(files []FileInfo, path string) ([]FileInfo, []FileInfo, []FileInfo, []FileInfo, error)
- func Init(path string) bool
- func ListBranches(pathToLit string) error
- func LogsBranchChange(logFilePath, msg string) error
- func RemoveFilesFromStagingArea(bitDirPath string, files []string)
- func Restore(paths []string, rootDirPath string, staged bool) error
- func Switch(dir string, currentB, newB map[string]FileInfo) error
- type FileInfo
- type TreeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToFiles ¶
Append the content at the end of specified files used for appending logs at the end of log files present inside logs directory
func ChangeActiveBranch ¶
func Checkout ¶
func Checkout(PathToLit, BranchName string)
Perform checkout operation to switch to other branch
func CoreAdd ¶
takes current file information from status command and writes it to the index file resulting into moving those files into staging area takes root directory filepath and fileinfo
func CreateBranch ¶
Function to create new branch
func CurrentActiveBranch ¶
Function which returns the current active branch
func DecompressAndSaveFile ¶
func DecompressFile ¶
func GenerateIndex ¶
generate index file for the new branch
func GetIndexFileContent ¶
func GetStatus ¶
func GetStatus(files []FileInfo, path string) ([]FileInfo, []FileInfo, []FileInfo, []FileInfo, error)
Get the slice of tracked, modified, deleted and unracked files It takes the information about files in current director with index filepath
func ListBranches ¶
List all the branches and show the current active branch
func LogsBranchChange ¶
Types ¶
type FileInfo ¶
type FileInfo struct { FileName string FilePath string FileSize uint64 FilePerm uint32 FileModifiedAt time.Time SHA1 string FileStatus string CommitStatus string }