A Go implementation of Git functions
Go C Shell
Switch branches/tags
Nothing to show
Clone or download
ChimeraCoder Merge pull request #8 from ChimeraCoder/basic-benchmarks
Add benchmarks for CatFile, parseObject, and VerifyPack
Latest commit 9921b28 Oct 29, 2016
Permalink
Failed to load latest commit information.
gitgo Update gitgo sample binary with new Log signature Jan 18, 2016
test_data Add LICENSE (GPLv2) for files excluded from the general license Feb 8, 2016
.appveyor.yml Configure appveyor CI on Windows Oct 29, 2016
.gitignore Remove accidental binary file from tracking Apr 14, 2015
.travis.yml Add .travis.yml Apr 30, 2015
LICENSE Update LICENSE file (Apache 2.0) Feb 8, 2016
README Fix typo in README May 13, 2015
README.md Add symlink to README for Github pretty-print Apr 17, 2015
cat-file.go Convert basedir to os.File from string Jan 18, 2016
cat-file_test.go Add benchmarks for CatFile, parseObject, and VerifyPack Oct 29, 2016
delta.go Remove unnecessary argument to readByte May 17, 2015
delta_test.go Fix bug with OFS objects with length < 128 bytes Apr 28, 2015
log.go Update Log function signature to use *os.File instead of string Jan 18, 2016
log_test.go Update Log function signature to use *os.File instead of string Jan 18, 2016
object.go Use filepath for OS-specific pathnames Oct 29, 2016
object_test.go Add support for AuthorDate field in commit May 10, 2015
pack.go Use filepath for OS-specific pathnames Oct 29, 2016
packobjecttype_string.go Update Stringer output Apr 18, 2015
repository.go Add benchmarks for CatFile, parseObject, and VerifyPack Oct 29, 2016
scanner.go Fix imports May 15, 2015
setup_test.go Convert basedir to os.File from string Jan 18, 2016
verify-pack.go Add test for Type() function on packObject May 4, 2015
verify-pack_test.go Add benchmarks for CatFile, parseObject, and VerifyPack Oct 29, 2016

README.md

gitgo

GoDoc Build Status

Gitgo provides Go functions for interacting with Git repositories.

Unlike libgit2, which is written in C, Gitgo is written in pure Go, and can be compiled and cross-compiled easily for all platforms supported by Go.

Installation

$ go get github.com/ChimeraCoder/gitgo

Usage

Full documentation is available on GoDoc.

Gitgo is a library intended to be used by other applications, rather than a replacement for the git command-line tools. However, gitgo does provide the gitgo binary, which is used for testing the gitgo library functions and demonstrating their functionality:

$ cd $GOPATH/src/github.com/ChimeraCoder/gitgo
$ gitgo log 1d833eb5b6c5369c0cb7a4a3e20ded237490145f
commit 1d833eb5b6c5369c0cb7a4a3e20ded237490145f
Author: aditya <dev@chimeracoder.net>
Date:   Mon Apr 6 15:49:15 2015 -0400

    Parse git object into struct and add corresponding test
    
commit a7f92c920ce85f07a33f948aa4fa2548b270024f
Author: aditya <dev@chimeracoder.net>
Date:   Fri Apr 3 12:38:24 2015 -0400

    Add CatFile function and corresponding test
    
commit 97eed02ebe122df8fdd853c1215d8775f3d9f1a1
Author: aditya <dev@chimeracoder.net>
Date:   Fri Apr 3 11:45:00 2015 -0400

    First commit. Create .gitignore

Note that the gitgo binary does not support all (or even most) of the functions provided by the gitgo library; it is intended for demonstration purposes and testing only.