Documentation
¶
Index ¶
- func Add_file_to_objects(file_name string)
- func Compress_file(file_name string) []byte
- func Git_add(files []string)
- func Git_cat_file(hash_value []string)
- func Git_commit(message []string)
- func Git_init(cmd_args []string)
- func Git_log()
- func Hash_file_name(file_name string) []byte
- func Is_blob_exists(file_name string) bool
- func Is_file_exists(file_name string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add_file_to_objects ¶
func Add_file_to_objects(file_name string)
store the given file contents at that time to .git/objects directory.
func Compress_file ¶
compress file by zlib and return the compressed one.
func Git_add ¶
func Git_add(files []string)
git add adds the target files to .sugit/objects/hash[:2]/hash[2:] hash[:]=sha-1(”) multiple files is ok.
func Git_cat_file ¶
func Git_cat_file(hash_value []string)
cat-file outputs given hash's file's contents. this cat-file only accept fully hash-value.
func Git_commit ¶
func Git_commit(message []string)
git commit creates commit object and HEAD file points it. tree objects contains blob objects at that time. commit message couldn't contain white space. commit can commit any time. if commit object's content is same, the hash value is also same. (this spec is not same as the git's one)
func Git_init ¶
func Git_init(cmd_args []string)
git init creates .sugit/, which contains HEAD/, objects/, refs/.
func Is_blob_exists ¶
check if the given file's blob objects exists in .git/objects/
Types ¶
This section is empty.