6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-06 15:42:56 +00:00
Grzegorz Dlugoszewski 13f69bb4b5 Simplify error checking in test helper functions
Helper functions check for errors and call Fatal if necessary on their own. This way we don't have to check for errors again in actual tests.
2020-05-18 16:10:31 +02:00
2020-05-15 14:43:59 +02:00
2020-05-15 14:43:59 +02:00
2020-05-18 13:25:46 +02:00
2020-05-18 13:25:46 +02:00

git-get

Build

How to build with libgit2 statically linked into a single executable without dependencies:

  • Install development packages for libssh2 and openssl:

    sudo apt install libssh2-1-dev libssl-dev
    
  • Inside the static folder there's the git2go library added as a submodule (pointing to a correct v30 release). This, in turn, contains libgit2 submodule. To ensure the submodules are cloned run:

    git submodule update --init --recursive
    
  • Build the static git2go library:

    cd static/git2go && make install-static
    
  • Ensure our git-get module uses the static git2go library instead of the one downloaded by Go modules by having the following line in go.mod:

    replace github.com/libgit2/git2go/v30 => ./static/git2go
    
  • Build, install and test git-get with --tags static flag, eg:

    go build -i --tags static
    go test --tags static
    

Features

Show repo status:

  • uncommitted changes
  • untracked files
  • push needed (master, branch1, branch2 etc.)
  • pull needed
  • upstream missing
  • stashes?
  • state (merging, rebasing, conflict, cherry picking etc)
  • ahead/behind?
  • submodules?
Description
No description provided
Readme 657 KiB
Languages
Go 98.5%
Makefile 1.5%