git

package module
v0.0.0-...-7a99fca Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: MIT Imports: 10 Imported by: 0

README

git

GoDoc

git implementation in Go.

This is a toy project and it is abandoned, but I'm not deleting it.

Why so? Because of many reasons:

  • This repository got me a job, not kidding! (there I actually implemented a read-only git implementation in Go)
  • It helped me learning all the amazing things git is made (composed) of
  • This is a failure project of mine and I'm ashamed of it, it taught me lots of things!

When...?

... will this be ready?

Never.

But don't worry there's plenty of git libraries in Go, here's a couple of suggestions:

Why?

I wanted to learn how git works internally not just the commands to use it.

Also, I want go get to be independent of external commands so anyone can go get anything without installing git, MsysGit, TortoiseHg, Bazaar or any SCM out there supported by this tool.

By implementing git in Go go get can include additional features like fetching a repo at certain tag or commit (just an example).

Go authors still have to approve this, which probably will be rejected just because there's no Mercurial and Bazaar Go implementations yet (if there are I don't know a thing about them).

Reference

Some useful links that helped me understand some of the deepest concepts of git:

Feel free to email me!

Documentation

Overview

Package git implements git SCM in Go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashObject

func HashObject(name string, write bool) (string, error)

func Init

func Init()

func IsBinary

func IsBinary(buf *bytes.Buffer) bool

Types

type ObjectType

type ObjectType byte
const (
	Blob   ObjectType = iota // holds a block of user data (eg the contents of a file, but not filename or other metadata)
	Tree                     // holds a map of (filename => checksum) - and therefore implicitly (filename => object)
	Commit                   // holds (commit-message, patch-checksum, list of parent-checksums, root-dir-object-checksum)
	Tag                      // holds (tagname, commit-object-checksum)
)

func (ObjectType) String

func (o ObjectType) String()

Notes

Bugs

  • Hardcodeed `core.autocrlf=true`. Should use git config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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