cmd

package
v0.0.0-...-eb52846 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func Compress_file(file_name string) []byte

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 Git_log

func Git_log()

func Hash_file_name

func Hash_file_name(file_name string) []byte

return hashed file names.

func Is_blob_exists

func Is_blob_exists(file_name string) bool

check if the given file's blob objects exists in .git/objects/

func Is_file_exists

func Is_file_exists(file_name string) bool

check if the file exists

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL