Documentation
¶
Overview ¶
Copyright © 2024 Kei-K23 <[email protected]>
Index ¶
- func CompressContent(compressBuf *bytes.Buffer, fileContentBytes []byte) error
- func DecompressContent(compressedBuf *bytes.Buffer) ([]byte, error)
- func GerCurrentBranch() string
- func GetCurrentCommit() string
- func GetCurrentTime() string
- func GetHashValueOfStagedFile(filename string) string
- func HandFileContent(fileContentBytes []byte) (string, error)
- func IsFileModified(filename string) bool
- func ReadCommitObject(hashValue string) []byte
- func UpdateCommitHashValue(newHash string)
- func WriteIndexFile(entries []IndexEntry) error
- type IndexEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressContent ¶
Utility function for file content compression
func DecompressContent ¶
Utility function for file content decompression
func GerCurrentBranch ¶
func GerCurrentBranch() string
Get current active branch (e.g main or dev, etc...)
func GetHashValueOfStagedFile ¶
Get hash value of staging file with their file name
func HandFileContent ¶
func IsFileModified ¶
Check file is made changes and modified to use in (e.g before adding file to staging area make sure file is modified or not)
func UpdateCommitHashValue ¶
func UpdateCommitHashValue(newHash string)
Function to update the latest commit hash value in the branch reference file
func WriteIndexFile ¶
func WriteIndexFile(entries []IndexEntry) error
Types ¶
type IndexEntry ¶
func ReadIndexFile ¶
func ReadIndexFile() ([]IndexEntry, error)
func UpdateIndexFileHashValue ¶
func UpdateIndexFileHashValue(entries []IndexEntry, filepath string, newHash string) []IndexEntry
Click to show internal directories.
Click to hide internal directories.