func PutObject(data string, objectType ...ObjectType) (oid string, err error) {
	_type := BLOB
	if len(objectType) > 0 {
		_type = objectType[0]
	}
	encoded := []byte(string(_type) + string(BYTE_SEPARATOR) + data)
	oid = string(HashObject(encoded))
	objectPath := fmt.Sprintf("%s/%s/%s", UGIT_DIR, OBJECTS_DIR, oid)
	err = ioutil.WriteFile(objectPath, encoded, 0777)
	return oid, err
}
/*
PutObject stores the data into the ugit objects repository. An object type is added before the content inside the file.
We hash the whole to return it as the oid
*/
PutObject stores the data into the ugit objects repository. An object type is added before the content inside the file.
We hash the whole to return it as the oid
/ * PutObject stores the data into the ugit objects repository . An object type is added before the content inside the file . We hash the whole to return it as the oid * /
func PutObject(data string, objectType ...ObjectType) (oid string, err error) {
	_type := BLOB
	if len(objectType) > 0 {
		_type = objectType[0]
	}
	encoded := []byte(string(_type) + string(BYTE_SEPARATOR) + data)
	oid = string(HashObject(encoded))
	objectPath := fmt.Sprintf("%s/%s/%s", UGIT_DIR, OBJECTS_DIR, oid)
	err = ioutil.WriteFile(objectPath, encoded, 0777)
	return oid, err
}
func PutObject ( data string , objectType ... ObjectType ) ( oid string , err error ) { _type := BLOB if len ( objectType ) > 0 { _type = objectType [ 0 ] } encoded := [ ] byte ( string ( _type ) + string ( BYTE_SEPARATOR ) + data ) oid = string ( HashObject ( encoded ) ) objectPath := fmt . Sprintf ( " " , UGIT_DIR , OBJECTS_DIR , oid ) err = ioutil . WriteFile ( objectPath , encoded , 0777 ) return oid , err }
PutObject stores the data into the ugit objects repository.
PutObject stores the data into the ugit objects repository .