Skip to content

Garoth/gowrapgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Go Wrap Git

Go Wrap Git Logo

This project provides a Go API to common Git functions. It is implemented as a simple git command shell wrapper, so it doesn't have any complex non-Go dependencies. Want to know if it's any good?

The aim of this project is to provide the most-used features of common commands. This project is currently geared more towards querying git repositories rather than affecting and synchronizing them.

If you're looking for a much more complete and down-to-the-metal implementation, I recommend looking at https://github.com/libgit2/git2go. That project wraps around libgit2 directly.

Project & Testing Status

Generally pretty beta. I'm mostly just adding functions as I need them for other projects. However, the project is outstandingly simple, so maybe it makes sense for you to add whatever you need.

Although this project lacks completeness, the features that it does have are heavily unit tested. This is uniformly true for all currently implemented functions. Currently, there is about 50% more unit test code than actual code.

Feature Plan / Progress

Documentation: https://godoc.org/github.com/Garoth/gowrapgit

  • Check If Is Repo
    • Check If Is Bare Repo
  • Log
    • General Commit Struct
    • Log Produces Array of Commit Structs
  • Clone
    • --bare Option
  • Checkout
  • Branch
    • Get Current Branch
    • Get All Local Branches
    • Get All Remote Branches
    • Make Local Branch
  • Find All Git Repos Recursively From Path
  • Reset
    • --hard Option
  • (future) Status
  • (future) Worktree
    • Spawn New Worktree From Parent
    • Find Parent Of Worktree
  • (future) Tree Manipulation Features
    • Fetch
    • Merge
    • Rebase
    • Push
    • Pull
    • Add
    • Commit