Giter Site home page Giter Site logo

grv's Introduction

GRV - Git Repository Viewer Build Status

GRV is a terminal based interface for viewing Git repositories. It allows refs, commits and diffs to be viewed, searched and filtered. The behaviour and style can be customised through configuration. A query language can be used to filter refs and commits, see the Documentation section for more information.

Screenshot

More screenshots can be seen here

Features

  • Commits and refs can be filtered using a query language.
  • Changes to the repository are captured by monitoring the filesystem allowing the UI to be updated automatically.
  • Organised as tabs and splits. Custom tabs and splits can be created using any combination of views.
  • Vi like keybindings by default, key bindings can be customised.
  • Custom themes can be created.
  • Mouse support.
  • Commit Graph.

Documentation

Documentation for GRV is available here

Install

Note: grv is currently an alias used by oh-my-zsh. Add unalias grv to the end of your .zshrc to invoke GRV.

Linux

Static binaries are available for Linux. For example, to use the amd64 binary run the following steps:

wget -O grv https://github.com/rgburke/grv/releases/download/v0.3.2/grv_v0.3.2_linux64
chmod +x ./grv
./grv -repoFilePath /path/to/repo

Mac

GRV is available in homebrew and can be installed with:

brew install grv

FreeBSD

GRV can be installed as a binary package

pkg install grv

or from ports

cd /usr/ports/devel/grv && make install clean

Build instructions

Go version 1.8 or later is required. GRV depends on the following libraries:

  • libncursesw
  • libreadline
  • libcurl
  • cmake (to build libgit2)

Building GRV on OSX requires homebrew, and for readline, pkg-config, and cmake to be installed using homebrew:

brew install readline pkg-config cmake

To install GRV run:

go get -d github.com/rgburke/grv/cmd/grv
cd $GOPATH/src/github.com/rgburke/grv
make install

To install grv with an alternative binary name change the last step to:

make install BINARY=NewBinaryName

where NewBinaryName is the alternative name to use instead.

The steps above will install GRV to $GOPATH/bin. A static libgit2 will be built and included in GRV when built this way. Alternatively if libgit2 version 0.27 is installed on your system GRV can be built normally:

go install ./cmd/grv

grv's People

Contributors

alexherbo2 avatar arp242 avatar dmgk avatar haraldnordgren avatar iamwillbar avatar ograff avatar rgburke avatar saginadir avatar sourcesoft avatar swordsman-inaction avatar x3ro avatar xwjdsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grv's Issues

Terminal color theme is overriden by default

grv overrides the theme being used by the terminal. Ideally it should not or there should be a quick way to not enforce this.

This would be in line with other ncurses based applications.

Switch back to the last active view after closing the Help View

This Help View is getting better and better with each new commit !

This is something I noticed when you introduced the Help View, but I felt I was being too nitpicky to open an issue about it, but as I started to use it more frequently, I realized it was necessary. Allow me a suggestion: when closing the Help View, switch back to the last active view. When I start grv with the default views, first History View then Status View and the History View is active. When I open the Help View, it's opened after the Status View, so when I close it, the Status View becomes the active view, and not the History View where I was before, so I always have to switch back to the History View.

If not switching back to the last active view, perhaps then open the Help View right after the current active view, so that when it's closed, the last active view gets focus.

cannot scroll with mouse wheel when mouse is enabled

Hi,

When mouse is not enabled mouse wheel scroll works fine.
When mouse is enabled it works to select commit, etc. but the mouse scroll wheel no longer scrolls.
Is it possible to have both ?

GRV - Git Repository Viewer v0.1.3-111-g93dfe02 (compiled with go1.10.3 at 2018-06-15 22:49:53 EDT)

Ubuntu 16.04 +hwe - 4.13 kernel, zsh in tmux, TERM set to screen-256color

thx for grv,
-mark

command ":help" does not provide help

Invalid command "help"

Good news: built without incident on Mac OS X 10.12.6, after installing dependencies via Homebrew. But I went to the command line trying to figure out how it worked for the first time, and the command "help" didn't work as expected.

Crashes when resizing the terminal

Seems fairly consistent both when making the terminal window larger and smaller.

I'm using xterm 330 on Arch Linux.

The stack is somewhat mangled due to the ncurses stuff. I'm going to be super-lazy here and just paste it as-is without fixing the formatting it; it's still fairly readable...

signal SIGSEGV: segmentation violation code=0x1 addr=0x24c pc=0x7fb1e6e70277]

                                                                            runtime stack:
                                                                                          runtime.throw(0x6ed037, 0x2a)
                                                                                                                        /usr/lib/go/src/runtime/panic.go:605 +0x95
                                                                                                                                                                  runtime.sigpanc()
        /usr/lib/go/src/runtime/signal_unix.go:351 +0x2b8

                                                         goroutine 15 [syscall, locked to thread]:
                                                                                                  runtime.cgocall(0x5bb140, 0xc42003cda0, 0x300000002)
                                                                                                                                                        /usr/lib/go/src/runtime/gocall.go:132 +0xe4 fp=0xc42003cd60 sp=0xc42003cd20 pc=0x428eb4
                                                               github.com/rthornton128/goncurses._Cfunc_resizeterm(0xb10000002b, 0xc400000000)
                                                                                                                                                github.com/rthornton128/goncurse/_obj/_cgo_gotypes.go:2613 +0x4d fp=0xc42003cda0 sp=0xc42003cd60 pc=0x50f71d
                                                                            github.com/rthornton128/goncurses.ResizeTerm(0x2b, 0xb1, 0x5413, 0xc42003ce00)
                                                                                                                                                                /home/martin/go/rc/github.com/rthornton128/goncurses/ncurses.go:240 +0x37 fp=0xc42003cdc8 sp=0xc42003cda0 pc=0x510487
                                                                                                     main.(*NCursesUI).Resize(0xc4200c29b0, 0x0, 0x0)
                                                                                                                                                        /home/martin/go/src/githb.com/rgburke/grv/cmd/grv/ui.go:221 +0x143 fp=0xc42003ce40 sp=0xc42003cdc8 pc=0x5aa673
                                                                                      main.(*GRV).runSignalHandlerLoop(0xc420060420, 0xc420015160, 0xc4200164e0)
                                                                                                                                                                        /home/matin/go/src/github.com/rgburke/grv/cmd/grv/grv.go:402 +0x474 fp=0xc42003cfc8 sp=0xc42003ce40 pc=0x589114
                                                                                                       runtime.goexit()
                                                                                                                        /usr/lib/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc4200cfd0 sp=0xc42003cfc8 pc=0x47db51
                                created by main.(*GRV).Run
                                                                /home/martin/go/src/github.com/rgburke/grv/cmd/grv/grv.go:230 +0x203

                                                                                                                                    goroutine 1 [semacquire]:
                                                                                                                                                             sync.runtime_Semacqire(0xc42001516c)
                        /usr/lib/go/src/runtime/sema.go:56 +0x39
                                                                sync.(*WaitGroup).Wait(0xc420015160)
                                                                                                        /usr/lib/go/src/sync/waitgroup.go:131 +0x72
                                                                                                                                                   main.(*GRV).Run(0xc420060420)
home/martin/go/src/github.com/rgburke/grv/cmd/grv/grv.go:235 +0x278
                                                                   main.main()
                                                                                /home/martin/go/src/github.com/rgburke/grv/cmd/grv/main.go:36 +0x1a7

                                                                                                                                                    goroutine 5 [syscall]:
                                                                                                                                                                          os/sigl.signal_recv(0xa12800)
                        /usr/lib/go/src/runtime/sigqueue.go:131 +0xa6
                                                                     os/signal.loop()
                                                                                        /usr/lib/go/src/os/signal/signal_unix.go:22 +0x22
                                                                                                                                         created by os/signal.init.0
                                                                                                                                                                        /usr/libo/src/os/signal/signal_unix.go:28 +0x41

                                       goroutine 12 [syscall]:
                                                              syscall.Syscall6(0x17, 0x4, 0xc420169580, 0x0, 0x0, 0x0, 0x0, 0x3, 0xc420169580, 0x0)
                                                                                                                                                        /usr/lib/go/src/syscall/m_linux_amd64.s:44 +0x5
                       syscall.Select(0x4, 0xc420169580, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0)
                                                                                        /usr/lib/go/src/syscall/zsyscall_linux_amd64.go:1374 +0xae
                                                                                                                                                  main.(*NCursesUI).GetInput(0xc00c29b0, 0x0, 0x1, 0xc420060298, 0x477fa0)
                                                /home/martin/go/src/github.com/rgburke/grv/cmd/grv/ui.go:393 +0x2c5
                                                                                                                   main.(*InputKeyMapper).GetKeyInput(0xc4200ba200, 0xc420137f170xc4200164e0, 0x0, 0x1)
                        /home/martin/go/src/github.com/rgburke/grv/cmd/grv/input_key_mapper.go:140 +0x3c
                                                                                                        main.(*GRV).runInputLoop(0xc420060420, 0xc420015160, 0xc4200164e0, 0xc4260240, 0xc420060300)
                        /home/martin/go/src/github.com/rgburke/grv/cmd/grv/grv.go:245 +0x121
                                                                                            created by main.(*GRV).Run
                                                                                                                        /home/martin/go/src/github.com/rgburke/grv/cmd/grv/grv.g224 +0xd8

         goroutine 13 [select]:
                               main.(*GRV).runDisplayLoop(0xc420060420, 0xc420015160, 0xc4200164e0, 0xc4200c0000, 0xc420060300)
                                                                                                                                /home/martin/go/src/github.com/rgburke/grv/cmd/g/grv.go:282 +0x351
                  created by main.(*GRV).Run
                                                /home/martin/go/src/github.com/rgburke/grv/cmd/grv/grv.go:226 +0x142

                                                                                                                    goroutine 14 [select]:
                                                                                                                                          main.(*GRV).runHandlerLoop(0xc42006042 0xc420015160, 0xc4200164e0, 0xc420060240, 0xc4200602a0, 0xc420060300)
                                                                        /home/martin/go/src/github.com/rgburke/grv/cmd/grv/grv.go:344 +0x260
                                                                                                                                            created by main.(*GRV).Run
                                                                                                                                                                        /home/main/go/src/github.com/rgburke/grv/cmd/grv/grv.go:228 +0x1b3

                                                          goroutine 16 [select, locked to thread]:
                                                                                                  runtime.gopark(0x6f06c8, 0x0, 0x6e35e4, 0x6, 0x18, 0x1)
                                                                                                                                                                /usr/lib/go/src/ntime/proc.go:277 +0x12c
                        runtime.selectgo(0xc420041f50, 0xc420016600)
                                                                        /usr/lib/go/src/runtime/select.go:395 +0x1138
                                                                                                                     runtime.ensureSigM.func1()
                                                                                                                                                /usr/lib/go/src/runtime/signal_ux.go:511 +0x220
               runtime.goexit()
                                /usr/lib/go/src/runtime/asm_amd64.s:2337 +0x1

Build is broken (fatal: No url found for submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/tests/resources/rebase-submodule/my-submodule' in .gitmodules)

Using the instructions in the README:

go get -d github.com/rgburke/grv/cmd/grv
cd $GOPATH/src/github.com/rgburke/grv
make install
# cd /home/cole/go/src/github.com/rgburke/grv; git submodule update --init --recursive
Submodule 'cmd/grv/vendor/github.com/Sirupsen/logrus' (https://github.com/Sirupsen/logrus) registered for path 'cmd/grv/vendor/github.com/Sirupsen/logrus'
Submodule 'cmd/grv/vendor/github.com/bradfitz/slice' (https://github.com/bradfitz/slice) registered for path 'cmd/grv/vendor/github.com/bradfitz/slice'
Submodule 'cmd/grv/vendor/github.com/davecgh/go-spew' (https://github.com/davecgh/go-spew) registered for path 'cmd/grv/vendor/github.com/davecgh/go-spew'
Submodule 'cmd/grv/vendor/github.com/gobwas/glob' (https://github.com/gobwas/glob) registered for path 'cmd/grv/vendor/github.com/gobwas/glob'
Submodule 'cmd/grv/vendor/github.com/mattn/go-runewidth' (https://github.com/mattn/go-runewidth) registered for path 'cmd/grv/vendor/github.com/mattn/go-runewidth'
Submodule 'cmd/grv/vendor/github.com/pmezard/go-difflib' (https://github.com/pmezard/go-difflib) registered for path 'cmd/grv/vendor/github.com/pmezard/go-difflib'
Submodule 'cmd/grv/vendor/github.com/rgburke/goncurses' (https://github.com/rgburke/goncurses) registered for path 'cmd/grv/vendor/github.com/rgburke/goncurses'
Submodule 'cmd/grv/vendor/github.com/rjeczalik/notify' (https://github.com/rjeczalik/notify) registered for path 'cmd/grv/vendor/github.com/rjeczalik/notify'
Submodule 'cmd/grv/vendor/github.com/stretchr/objx' (https://github.com/stretchr/objx) registered for path 'cmd/grv/vendor/github.com/stretchr/objx'
Submodule 'cmd/grv/vendor/github.com/stretchr/testify' (https://github.com/stretchr/testify) registered for path 'cmd/grv/vendor/github.com/stretchr/testify'
Submodule 'cmd/grv/vendor/github.com/tchap/go-patricia' (https://github.com/tchap/go-patricia) registered for path 'cmd/grv/vendor/github.com/tchap/go-patricia'
Submodule 'cmd/grv/vendor/go4.org' (https://github.com/camlistore/go4) registered for path 'cmd/grv/vendor/go4.org'
Submodule 'cmd/grv/vendor/golang.org/x/crypto' (https://go.googlesource.com/crypto) registered for path 'cmd/grv/vendor/golang.org/x/crypto'
Submodule 'cmd/grv/vendor/golang.org/x/sys' (https://go.googlesource.com/sys) registered for path 'cmd/grv/vendor/golang.org/x/sys'
Submodule 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26' (https://gopkg.in/libgit2/git2go.v26) registered for path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/Sirupsen/logrus'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/bradfitz/slice'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/davecgh/go-spew'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/gobwas/glob'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/mattn/go-runewidth'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/pmezard/go-difflib'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rgburke/goncurses'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rjeczalik/notify'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/stretchr/objx'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/stretchr/testify'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/tchap/go-patricia'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/go4.org'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/golang.org/x/crypto'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/golang.org/x/sys'...
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'...
Submodule path 'cmd/grv/vendor/github.com/Sirupsen/logrus': checked out '768a92a02685ee7535069fc1581341b41bab9b72'
Submodule path 'cmd/grv/vendor/github.com/bradfitz/slice': checked out 'd9036e2120b5ddfa53f3ebccd618c4af275f47da'
Submodule path 'cmd/grv/vendor/github.com/davecgh/go-spew': checked out '87df7c60d5820d0f8ae11afede5aa52325c09717'
Submodule path 'cmd/grv/vendor/github.com/gobwas/glob': checked out '51eb1ee00b6d931c66d229ceeb7c31b985563420'
Submodule path 'cmd/grv/vendor/github.com/mattn/go-runewidth': checked out '97311d9f7767e3d6f422ea06661bc2c7a19e8a5d'
Submodule path 'cmd/grv/vendor/github.com/pmezard/go-difflib': checked out '792786c7400a136282c1664665ae0a8db921c6c2'
Submodule path 'cmd/grv/vendor/github.com/rgburke/goncurses': checked out '74f667ab258b768bdb858bfcc3cf8850461d6ad7'
Submodule path 'cmd/grv/vendor/github.com/rjeczalik/notify': checked out 'c31e5f2cb22b3e4ef3f882f413847669bf2652b9'
Submodule path 'cmd/grv/vendor/github.com/stretchr/objx': checked out '8a3f7159479fbc75b30357fbc48f380b7320f08e'
Submodule path 'cmd/grv/vendor/github.com/stretchr/testify': checked out 'a726187e3128d0a0ec37f73ca7c4d3e508e6c2e5'
Submodule path 'cmd/grv/vendor/github.com/tchap/go-patricia': checked out '5ad6cdb7538b0097d5598c7e57f0a24072adf7dc'
Submodule path 'cmd/grv/vendor/go4.org': checked out 'fba789b7e39ba524b9e60c45c37a50fae63a2a09'
Submodule path 'cmd/grv/vendor/golang.org/x/crypto': checked out '1875d0a70c90e57f11972aefd42276df65e895b9'
Submodule path 'cmd/grv/vendor/golang.org/x/sys': checked out '37707fdb30a5b38865cfb95e5aab41707daec7fd'
Submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26': checked out 'eb0bf21280bf589ebc69341b3040616463542f12'
Submodule 'vendor/libgit2' (https://github.com/libgit2/libgit2) registered for path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2'
Cloning into '/home/cole/go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2'...
Submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2': checked out '15e119375018fba121cf58e02a9f17fe22df0df8'
fatal: No url found for submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/tests/resources/rebase-submodule/my-submodule' in .gitmodules
Failed to recurse into submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2'
Failed to recurse into submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'
package github.com/rgburke/grv/cmd/grv: exit status 1
cd: no such file or directory: /src/github.com/rgburke/grv
make: *** No rule to make target 'install'.  Stop.
 percy  ~  ✘                                          

Invalid variable tabwidth

According to documentation.md

 Variable | Type   | Description
 ---------+--------+----------------------------------------------
 tabwidth | int    | Tab character screen width (minimum value: 1)

but setting this

❯ cat .config/grv/grvrc 
set tabwidth 4

Launching grv yields this error:

/home/serge/.config/grv/grvrc:1:5 Invalid variable tabwidth

make install step breaks with error "malformed #cgo argument"

$go get -d github.com/rgburke/grv/cmd/grv
$cd $GOPATH/src/github.com/rgburke/grv
$make install

returns this error

[100%] Built target git2
go install -tags static ./...
can't load package: package gopkg.in/libgit2/git2go.v25: /Users/boris/.gvm/pkgsets/go1.4/global/src/gopkg.in/libgit2/git2go.v25/git_static.go: malformed #cgo argument: -I${SRCDIR}/vendor/libgit2/include
make[1]: *** [install-static] Error 1
make: *** [build-libgit2] Error 2

Remapped default key bindings not shown in the Help View

When a default key binding is remapped, the new mapping is not always shown in the Help View.

Here's my ~/.config/grv/grvrc file:

map All " " <grv-next-page>
map All b <grv-prev-page>
map All <C-n> <grv-show-available-actions>
map All d <grv-remove-view>
map All q <grv-exit>
map All <C-f> <grv-filter-prompt>

set commit-graph true

As you can see, I remapped:

Key Default mapping New mapping
q <grv-remove-view> <grv-exit>
<C-f> <grv-next-page> <grv-filter-prompt>
b <grv-branch-name-prompt> <grv-prev-page>

and added these new mappings:

Key Mapping
" " <grv-next-page>
d <grv-remove-view>
<C-n> <grv-show-available-actions>

Here's the Help View:

image

Remapping not shown: q
Remapping shown on both default and new mapping: b
Mapping not shown: " "

I just realized now that the filter actions are not shown in the Help View.

I fear I got a little lost looking at these mappings and remappings !

Doesn't support libgit2 > v0.25

I'm on libgit2 0.26, it doesn't build with:

~ ❯❯❯ go install github.com/rgburke/grv/cmd/grv
# gopkg.in/libgit2/git2go.v25
.go/src/gopkg.in/libgit2/git2go.v25/git.go:8:3: error: #error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
 # error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
   ^~~~~

So the README doesn't follow. I'm using the alternative install mechanism.

grv doesn't detect git repo when GIT_DIR is set to non-default

I use vcsh (https://github.com/RichiH/vcsh) to manage my $HOME dot files, which works by placing the .git config dir elsewhere and setting GIT_DIR, pointing to it. grv Does not detect this.

  serge  minos  ~                                                                                      
❯ vcsh dot
 
  serge  minos   master → keybase ↑1 S:1 U:9 ?:1  ~                                                   
❯ git status
On branch master
Your branch is ahead of 'keybase/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
(...)
 
  serge  minos   master → keybase ↑1 S:1 U:9 ?:1  ~                                                   
❯ grv
FATAL: Unable to initialise grv: Unable to find a git repository in . or any of its parent directories
 
  serge  minos   master → keybase ↑1 S:1 U:9 ?:1  ~  1                                                
❯ 

Can't map the <Space> key

I'd like to map the space key to <grv-next-page> in all views, these are the variations I tried:

map All <Space> <grv-next-page>
map All <space> <grv-next-page>
map All <SPACE> <grv-next-page>

I tried them both as a : command in the TUI, and in the ~/.config/grv/grvrc file, but the mapping doesn't take effect. Actually, can't be mapped to any grv action.

I'm running grv c1bfab3 built from source on Xubuntu 17.10.

Crash on startup

Hey there,

thanks for this awsome git client. have been looking for something like this for a long time now (:
sadly i get a runtime error in one repository i have on my system.

steps to reproduce:

git clone https://github.com/irungentoo/toxcore.git
cd toxcore
TERM=xterm grv

Error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x5cb045]

 goroutine 28 [running]:
main.DetermineRenderedCodePoint(0x9, 0x37, 0x0, 0x0, 0xc420185a00, 0x1, 0x1)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/window.go:533 +0x215
main.(*TableFormatter).textWidth(0xc4201a00c0, 0x23, 0x3, 0x37, 0x1e)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:235 +0xf5
main.(*TableFormatter).determineMaxColWidths(0xc4201a00c0, 0x1)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:220 +0xb0
main.(*TableFormatter).PadCells(0xc4201a00c0, 0x1, 0xc420259717, 0x3)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:180 +0x4c
main.(*TableFormatter).Render(0xc4201a00c0, 0xde3fc0, 0xc42011a150, 0x1, 0x1, 0x0, 0x0)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:144 +0x5f
main.(*CommitView).Render(0xc420092400, 0xde3fc0, 0xc42011a150, 0x0, 0x0)                                                                                                                                  	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/commit_view.go:136 +0x47e
main.(*ContainerView).renderWindowView(0xc420108870, 0xde3020, 0xc420092400, 0xc420134ae0, 0xc420092400, 0x1, 0x8)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/container_view.go:386 +0xd6
 main.(*ContainerView).Render(0xc420108870, 0x40, 0xef, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/container_view.go:280 +0x374
main.(*ContainerView).Render(0xc420108990, 0x40, 0x112, 0xc420174028, 0x1, 0x1, 0x0, 0x0)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/container_view.go:289 +0x51d
main.(*View).Render(0xc420108c60, 0x43, 0x112, 0xc42012c170, 0x0, 0x0, 0x0, 0x0)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/view.go:161 +0x27d
main.(*GRV).runDisplayLoop(0xc420092500, 0xc420142350, 0xc420078960, 0xc4200f08c0, 0xc420078ae0)
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/grv.go:340 +0x579
created by main.(*GRV).Run
/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/grv.go:261 +0x147

I am using the install methode as mentioned in the README

wget -O grv https://github.com/rgburke/grv/releases/download/v0.1.2/grv_v0.1.2_linux64
chmod +x ./grv
sudo mv grv /usr/bin/

"make install" doesn't work with multiple entries in GOPATH


$ pwd
/home/martin/go/src/github.com/rgburke/grv

$ echo $GOPATH
/home/martin/go:/home/martin/work

$ make install
go get -d ./...
cd /home/martin/go:/home/martin/work/src/gopkg.in/libgit2/git2go.v25 && git submodule update --init;
/bin/sh: line 0: cd: /home/martin/go:/home/martin/work/src/gopkg.in/libgit2/git2go.v25: No such file or directory
make: *** [Makefile:29: build-libgit2] Error 1

In general you should never use $GOPATH directly since it works like $PATH: it can have multiple entries.

It's probably better to get the path relative to the running Makefile; e.g. readlink -f $0 from a shell script (I'm not sure how to do that in a Makefile though, it's been over ten years since I last used make in any serious capacity).

no issue

This tool is awesome! Where is the donations button? Let me buy you a beer!

Can't build on Centos7 with readline 6.2

Build fails with this error:

go build --tags static -o grv ./cmd/grv
# github.com/rgburke/grv/cmd/grv
cmd/grv/readline.go: In function 'grv_init_readline':
cmd/grv/readline.go:18:2: error: 'rl_change_environment' undeclared (first use in this function)
 // rl_change_environment = 0;
  ^
cmd/grv/readline.go:18:2: note: each undeclared identifier is reported only once for each function it appears in
make: *** [grv] Error 2

I suspect the rl_change_environment variable got introduced in a later version of readline?

On my machine removing line 18 from cmd/grv/readline.go allows it to compile and run.
Not sure what negative effects this change might have...

[root@localhost readline-devel-6.2]# uname -a
Linux localhost.localdomain 3.10.0-514.21.1.el7.x86_64 #1 SMP Thu May 25 17:04:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost readline-devel-6.2]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@localhost readline-devel-6.2]# go version
go version go1.9.1 linux/amd64

panic in status view when trying to view the diff

Status View, empty "Diff for unstaged files" pane, pressing "tab".

panic: runtime error: index out of range

goroutine 37 [running]:

main.(*DiffView).RenderHelpBar(0xc4200e6230, 0xc4205c8d80, 0x0, 0x0)
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/diff_view.go:275 +0x188
main.(*ContainerView).RenderHelpBar(0xc4200d4b40, 0xc4205c8d80, 0xc4200d4b40, 0x3)
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/container_view.go:241 +0xb0
main.(*View).RenderHelpBar(0xc4200d4c60, 0xc4205c8d80, 0x1, 0x0)
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/view.go:289 +0xa7
main.(*HelpBarView).Render(0xc420087ba0, 0xdd3fc0, 0xc4200e63f0, 0x0, 0x0)
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/help_bar_view.go:61 +0x14b
main.(*GRVStatusView).Render(0xc4200ec5c0, 0x1, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/grv_status_view.go:90 +0x1a8
main.(*View).Render(0xc4200d4c60, 0x3d, 0xff, 0xc420b91e30, 0x0, 0x0, 0x0, 0x0)
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/view.go:182 +0x47b
main.(*GRV).runDisplayLoop(0xc42009e500, 0xc4200f8d00, 0xc420084840, 0xc4200bc8c0, 0xc4200849c0)
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/grv.go:340 +0x579

created by main.(*GRV).Run
	/home/richard/code/goworkspace/src/github.com/rgburke/grv/cmd/grv/grv.go:261 +0x147

<grv-remove-view> has to be run twice to remove Help View

Just noticed now that <grv-remove-view> has to be run twice to completely remove the Help View. I have <grv-remove-view> mapped to d: when I pressed it the first time, I all the text is cleared by the view stays on:
image

When a press it for the second time, then the view is removed:
image

scrolling down on commit list with 'Invalid collation character' errors slowly garbles screen

grv-garble

I invoked grv (0.1.2) on a git checkout of the linux tree (at b89e32ccd1be92a3643df3908d3026b09e271616), tabbed to the git log, and moved the cursor down 13 times to commit babcbbc.

There seems to be some garbled encoding somewhere in this commit (although I couldn't find it using a git show), grv doesn't update the commit message and keeps showing 8e44e66 in the message pane, but the cursor advances, and an error message Invalid collation character is shown on the bottom of the screen.

Moving down further, space to show more error messages gets allocated (as the regular 'window height' seems to get reduced), but the messages are not shown, and the window rendering gets garbled.

The collation error seems to be related to my locale (en_US.UTF-8), and is gone when invoking with LANG=C.

Status bar could dynamically show current key bindings

Following #57, I realized that if one of the key bindings on the status bar is remapped, the status bar still shows the default key bindings. It would be quite useful if the status bar dynamically reflected the current keybindings.

I'm running grv ff99964 on Xubuntu 18.04.

Can we get graph view?

suggesting a support for something that looks like the output of

git log --color --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all

grv seems to ignore entries with wildcards in .gitignore

I've got this .gitignore:

# files directly below bk.d are output by the backup scriplets, so they don't
# need to be tracked
bk.d/*
!bk.d/*/

which is applied to this repo tree:

+paulo@monk:~/prj/s/bk$ tree
.
├── bin
│   └── bk
├── bk.d
│   ├── foto
│   │   ├── 80backup-file
│   │   └── 90check-partition
│   ├── installed_packages
│   ├── musica
│   │   ├── 10stop-quodlibet
│   │   ├── 80backup-file
│   │   └── 90check-partition
│   ├── online
│   │   ├── 10get-contacts
│   │   └── 10get-trakt-episodes
│   ├── ppas
│   ├── software_from_source
│   ├── sys
│   │   ├── 10get-installed-package
│   │   ├── 10get-ppa
│   │   ├── 10get-source-software
│   │   ├── 80backup-file
│   │   ├── 90check-partition
│   │   └── backup_rules
│   ├── video
│   │   ├── 80backup-file
│   │   └── 90check-partition
│   └── watch
│       ├── 80backup-file
│       └── 90check-partition
└── default
    └── bk

so that the directories below bk.d are tracked, but the files directly below it are not. git is parsing .gitignore correctly:

+paulo@monk:~/prj/s/bk$ git status
On branch master
nothing to commit, working tree clean

But grv doesn't seem to:

image

I'm running grv master (783dad1) on Xubuntu 17.10 with go 1.10.

I ran grv with -logLevel DEBUG and here's the log file in case it helps. I didn't see any mention of .gitignore.

What is the correct/recommended way to keep grv up-to-date when building from source ?

I've built grv from source on Xubuntu 18.04 without problems, running:

go get -d -v -x github.com/rgburke/grv/cmd/grv
cd $GOPATH/src/github.com/rgburke/grv
make install 

I'm in doubt about the correct/recommended way to keep it up-to-date. I tried:

go get -u -v -x github.com/rgburke/grv/cmd/grv

but it outputs git pull errors for all the vendor submodules, here's the full output:

cd /home/paulo/go/src/github.com/rgburke/grv
git config remote.origin.url
github.com/rgburke/grv (download)
cd /home/paulo/go/src/github.com/rgburke/grv
git pull --ff-only
cd /home/paulo/go/src/github.com/rgburke/grv
git submodule update --init --recursive
cd /home/paulo/go/src/github.com/rgburke/grv
git show-ref
cd /home/paulo/go/src/github.com/rgburke/grv
git submodule update --init --recursive
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/Sirupsen/logrus
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/github.com/Sirupsen/logrus (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/Sirupsen/logrus
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/Sirupsen/logrus; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/github.com/Sirupsen/logrus: exit status 1
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/bradfitz/slice
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/github.com/bradfitz/slice (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/bradfitz/slice
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/bradfitz/slice; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/github.com/bradfitz/slice: exit status 1
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/gobwas/glob
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/github.com/gobwas/glob (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/gobwas/glob
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/gobwas/glob; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/github.com/gobwas/glob: exit status 1
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/mattn/go-runewidth
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/github.com/mattn/go-runewidth (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/mattn/go-runewidth
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/mattn/go-runewidth; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/github.com/mattn/go-runewidth: exit status 1
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rgburke/goncurses
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/github.com/rgburke/goncurses (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rgburke/goncurses
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rgburke/goncurses; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/github.com/rgburke/goncurses: exit status 1
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rjeczalik/notify
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/github.com/rjeczalik/notify (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rjeczalik/notify
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rjeczalik/notify; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/github.com/rjeczalik/notify: exit status 1
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/tchap/go-patricia
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/github.com/tchap/go-patricia (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/tchap/go-patricia
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/tchap/go-patricia; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/github.com/tchap/go-patricia/patricia: exit status 1
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26
git config remote.origin.url
github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26 (download)
cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26
git pull --ff-only
# cd /home/paulo/go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26: exit status 1

I've been using:

git pull --recurse-submodules
cd $GOPATH/src/github.com/rgburke/grv
make install 

but I'd like to know what is the go-way, so to speak, your recommended way of doing it.

Remap "Show actions for commit" to a key other than <C-a>

Is it possible to remap Show actions for commit to another key other than <C-a> ? <C-a> is a popular key combination for the tmux prefix. I couldn't find something that resembled Show actions for commit in the documentation, perhaps I didn't look properly.

EDIT: I forgot to mention: I'm running grv ff99964 on Xubuntu 18.04.

go get broken due to libgit2

Can you please vendor the dependencies?

$ GOPATH=/Users/alp/gotools go get github.com/rgburke/grv/cmd/grv
# cd /Users/alp/gotools/src/github.com/rgburke/grv; git submodule update --init --recursive
Submodule 'cmd/grv/vendor/github.com/Sirupsen/logrus' (https://github.com/Sirupsen/logrus) registered for path 'cmd/grv/vendor/github.com/Sirupsen/logrus'
Submodule 'cmd/grv/vendor/github.com/bradfitz/slice' (https://github.com/bradfitz/slice) registered for path 'cmd/grv/vendor/github.com/bradfitz/slice'
Submodule 'cmd/grv/vendor/github.com/davecgh/go-spew' (https://github.com/davecgh/go-spew) registered for path 'cmd/grv/vendor/github.com/davecgh/go-spew'
Submodule 'cmd/grv/vendor/github.com/gobwas/glob' (https://github.com/gobwas/glob) registered for path 'cmd/grv/vendor/github.com/gobwas/glob'
Submodule 'cmd/grv/vendor/github.com/mattn/go-runewidth' (https://github.com/mattn/go-runewidth) registered for path 'cmd/grv/vendor/github.com/mattn/go-runewidth'
Submodule 'cmd/grv/vendor/github.com/pmezard/go-difflib' (https://github.com/pmezard/go-difflib) registered for path 'cmd/grv/vendor/github.com/pmezard/go-difflib'
Submodule 'cmd/grv/vendor/github.com/rgburke/goncurses' (https://github.com/rgburke/goncurses) registered for path 'cmd/grv/vendor/github.com/rgburke/goncurses'
Submodule 'cmd/grv/vendor/github.com/rjeczalik/notify' (https://github.com/rjeczalik/notify) registered for path 'cmd/grv/vendor/github.com/rjeczalik/notify'
Submodule 'cmd/grv/vendor/github.com/stretchr/objx' (https://github.com/stretchr/objx) registered for path 'cmd/grv/vendor/github.com/stretchr/objx'
Submodule 'cmd/grv/vendor/github.com/stretchr/testify' (https://github.com/stretchr/testify) registered for path 'cmd/grv/vendor/github.com/stretchr/testify'
Submodule 'cmd/grv/vendor/github.com/tchap/go-patricia' (https://github.com/tchap/go-patricia) registered for path 'cmd/grv/vendor/github.com/tchap/go-patricia'
Submodule 'cmd/grv/vendor/go4.org' (https://github.com/camlistore/go4) registered for path 'cmd/grv/vendor/go4.org'
Submodule 'cmd/grv/vendor/golang.org/x/crypto' (https://go.googlesource.com/crypto) registered for path 'cmd/grv/vendor/golang.org/x/crypto'
Submodule 'cmd/grv/vendor/golang.org/x/sys' (https://go.googlesource.com/sys) registered for path 'cmd/grv/vendor/golang.org/x/sys'
Submodule 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26' (https://gopkg.in/libgit2/git2go.v26) registered for path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/Sirupsen/logrus'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/bradfitz/slice'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/davecgh/go-spew'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/gobwas/glob'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/mattn/go-runewidth'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/pmezard/go-difflib'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rgburke/goncurses'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/rjeczalik/notify'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/stretchr/objx'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/stretchr/testify'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/github.com/tchap/go-patricia'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/go4.org'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/golang.org/x/crypto'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/golang.org/x/sys'...
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'...
Submodule path 'cmd/grv/vendor/github.com/Sirupsen/logrus': checked out '768a92a02685ee7535069fc1581341b41bab9b72'
Submodule path 'cmd/grv/vendor/github.com/bradfitz/slice': checked out 'd9036e2120b5ddfa53f3ebccd618c4af275f47da'
Submodule path 'cmd/grv/vendor/github.com/davecgh/go-spew': checked out '87df7c60d5820d0f8ae11afede5aa52325c09717'
Submodule path 'cmd/grv/vendor/github.com/gobwas/glob': checked out '51eb1ee00b6d931c66d229ceeb7c31b985563420'
Submodule path 'cmd/grv/vendor/github.com/mattn/go-runewidth': checked out '97311d9f7767e3d6f422ea06661bc2c7a19e8a5d'
Submodule path 'cmd/grv/vendor/github.com/pmezard/go-difflib': checked out '792786c7400a136282c1664665ae0a8db921c6c2'
Submodule path 'cmd/grv/vendor/github.com/rgburke/goncurses': checked out '74f667ab258b768bdb858bfcc3cf8850461d6ad7'
Submodule path 'cmd/grv/vendor/github.com/rjeczalik/notify': checked out 'c31e5f2cb22b3e4ef3f882f413847669bf2652b9'
Submodule path 'cmd/grv/vendor/github.com/stretchr/objx': checked out '8a3f7159479fbc75b30357fbc48f380b7320f08e'
Submodule path 'cmd/grv/vendor/github.com/stretchr/testify': checked out 'a726187e3128d0a0ec37f73ca7c4d3e508e6c2e5'
Submodule path 'cmd/grv/vendor/github.com/tchap/go-patricia': checked out '5ad6cdb7538b0097d5598c7e57f0a24072adf7dc'
Submodule path 'cmd/grv/vendor/go4.org': checked out 'fba789b7e39ba524b9e60c45c37a50fae63a2a09'
Submodule path 'cmd/grv/vendor/golang.org/x/crypto': checked out '1875d0a70c90e57f11972aefd42276df65e895b9'
Submodule path 'cmd/grv/vendor/golang.org/x/sys': checked out '37707fdb30a5b38865cfb95e5aab41707daec7fd'
Submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26': checked out 'eb0bf21280bf589ebc69341b3040616463542f12'
Submodule 'vendor/libgit2' (https://github.com/libgit2/libgit2) registered for path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2'
Cloning into '/Users/alp/gotools/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2'...
Submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2': checked out '15e119375018fba121cf58e02a9f17fe22df0df8'
fatal: No url found for submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/tests/resources/rebase-submodule/my-submodule' in .gitmodules
Failed to recurse into submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2'
Failed to recurse into submodule path 'cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'
package github.com/rgburke/grv/cmd/grv: exit status 1

build fails on ubuntu

# We can't use the --recurisve option here due to https://github.com/libgit2/git2go/issues/407
# So we have to do exclude it and init the libgit2 submodule separately
git submodule update --init
cd ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v26 && git submodule update --init
if patch --dry-run -N -d ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v26 -p1 < git2go.v26.patch >/dev/null; then \
        patch -d ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v26 -p1 < git2go.v26.patch; \
fi
patching file git_static.go
patching file script/build-libgit2-static.sh
if patch --dry-run -N -d ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2 -p1 < libgit2.v26.patch >/dev/null; then \
        patch -d ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2 -p1 < libgit2.v26.patch; \
fi
patching file CMakeLists.txt
make -C ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v26 install-static
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'
./script/build-libgit2-static.sh
+ VENDORED_PATH=vendor/libgit2
+ cd vendor/libgit2
+ mkdir -p install/lib
+ mkdir -p build
+ cd build
+ cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../install -DUSE_EXT_HTTP_PARSER=OFF -DUSE_HTTPS=OFF -DUSE_NSEC=OFF -DUSE_SSH=OFF -DCURL=OFF -DUSE_GSSAPI=OFF -DUSE_OPENSSL=OFF ..
-- Performing Test IS_WSTRICT-ALIASING=2_SUPPORTED
-- Performing Test IS_WSTRICT-ALIASING=2_SUPPORTED - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build
+ cmake --build .
make[2]: Entering directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
make[3]: Entering directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
make[4]: Entering directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
make[4]: Leaving directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
make[4]: Entering directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
[  0%] Building C object CMakeFiles/git2.dir/src/ident.c.o
[  1%] Building C object CMakeFiles/git2.dir/src/offmap.c.o
[  2%] Building C object CMakeFiles/git2.dir/src/submodule.c.o
[  2%] Building C object CMakeFiles/git2.dir/src/zstream.c.o
[  3%] Building C object CMakeFiles/git2.dir/src/trace.c.o
[  4%] Building C object CMakeFiles/git2.dir/src/diff_generate.c.o
[  5%] Building C object CMakeFiles/git2.dir/src/tsort.c.o
[  5%] Building C object CMakeFiles/git2.dir/src/refdb_fs.c.o
[  6%] Building C object CMakeFiles/git2.dir/src/diff_parse.c.o
[  7%] Building C object CMakeFiles/git2.dir/src/object_api.c.o
[  7%] Building C object CMakeFiles/git2.dir/src/patch_generate.c.o
[  8%] Building C object CMakeFiles/git2.dir/src/clone.c.o
[  9%] Building C object CMakeFiles/git2.dir/src/pack-objects.c.o
[ 10%] Building C object CMakeFiles/git2.dir/src/merge_file.c.o
[ 10%] Building C object CMakeFiles/git2.dir/src/fetchhead.c.o
[ 11%] Building C object CMakeFiles/git2.dir/src/cache.c.o
[ 12%] Building C object CMakeFiles/git2.dir/src/ignore.c.o
[ 12%] Building C object CMakeFiles/git2.dir/src/signature.c.o
[ 13%] Building C object CMakeFiles/git2.dir/src/oidmap.c.o
[ 14%] Building C object CMakeFiles/git2.dir/src/oid.c.o
[ 15%] Building C object CMakeFiles/git2.dir/src/blob.c.o
[ 15%] Building C object CMakeFiles/git2.dir/src/checkout.c.o
[ 16%] Building C object CMakeFiles/git2.dir/src/buf_text.c.o
[ 17%] Building C object CMakeFiles/git2.dir/src/transaction.c.o
[ 17%] Building C object CMakeFiles/git2.dir/src/attr_file.c.o
[ 18%] Building C object CMakeFiles/git2.dir/src/worktree.c.o
[ 19%] Building C object CMakeFiles/git2.dir/src/posix.c.o
[ 19%] Building C object CMakeFiles/git2.dir/src/strmap.c.o
[ 20%] Building C object CMakeFiles/git2.dir/src/path.c.o
[ 21%] Building C object CMakeFiles/git2.dir/src/sysdir.c.o
[ 22%] Building C object CMakeFiles/git2.dir/src/curl_stream.c.o
[ 22%] Building C object CMakeFiles/git2.dir/src/merge_driver.c.o
[ 23%] Building C object CMakeFiles/git2.dir/src/filebuf.c.o
[ 24%] Building C object CMakeFiles/git2.dir/src/attr.c.o
[ 24%] Building C object CMakeFiles/git2.dir/src/commit.c.o
[ 25%] Building C object CMakeFiles/git2.dir/src/mwindow.c.o
[ 26%] Building C object CMakeFiles/git2.dir/src/blame_git.c.o
[ 27%] Building C object CMakeFiles/git2.dir/src/diff_tform.c.o
[ 27%] Building C object CMakeFiles/git2.dir/src/odb_pack.c.o
[ 28%] Building C object CMakeFiles/git2.dir/src/config.c.o
[ 29%] Building C object CMakeFiles/git2.dir/src/global.c.o
[ 29%] Building C object CMakeFiles/git2.dir/src/refdb.c.o
[ 30%] Building C object CMakeFiles/git2.dir/src/revwalk.c.o
[ 31%] Building C object CMakeFiles/git2.dir/src/apply.c.o
[ 32%] Building C object CMakeFiles/git2.dir/src/blame.c.o
[ 32%] Building C object CMakeFiles/git2.dir/src/tree-cache.c.o
[ 33%] Building C object CMakeFiles/git2.dir/src/reflog.c.o
[ 34%] Building C object CMakeFiles/git2.dir/src/patch.c.o
[ 34%] Building C object CMakeFiles/git2.dir/src/diff.c.o
[ 35%] Building C object CMakeFiles/git2.dir/src/buffer.c.o
[ 36%] Building C object CMakeFiles/git2.dir/src/socket_stream.c.o
[ 36%] Building C object CMakeFiles/git2.dir/src/fetch.c.o
[ 37%] Building C object CMakeFiles/git2.dir/src/refspec.c.o
[ 38%] Building C object CMakeFiles/git2.dir/src/oidarray.c.o
[ 39%] Building C object CMakeFiles/git2.dir/src/idxmap.c.o
[ 39%] Building C object CMakeFiles/git2.dir/src/proxy.c.o
[ 40%] Building C object CMakeFiles/git2.dir/src/refs.c.o
[ 41%] Building C object CMakeFiles/git2.dir/src/sortedcache.c.o
[ 41%] Building C object CMakeFiles/git2.dir/src/pack.c.o
[ 42%] Building C object CMakeFiles/git2.dir/src/remote.c.o
[ 43%] Building C object CMakeFiles/git2.dir/src/merge.c.o
[ 44%] Building C object CMakeFiles/git2.dir/src/delta.c.o
[ 44%] Building C object CMakeFiles/git2.dir/src/settings.c.o
[ 45%] Building C object CMakeFiles/git2.dir/src/config_file.c.o
[ 46%] Building C object CMakeFiles/git2.dir/src/sha1_lookup.c.o
[ 46%] Building C object CMakeFiles/git2.dir/src/vector.c.o
[ 47%] Building C object CMakeFiles/git2.dir/src/notes.c.o
[ 48%] Building C object CMakeFiles/git2.dir/src/diff_file.c.o
[ 49%] Building C object CMakeFiles/git2.dir/src/pool.c.o
[ 49%] Building C object CMakeFiles/git2.dir/src/status.c.o
[ 50%] Building C object CMakeFiles/git2.dir/src/describe.c.o
[ 51%] Building C object CMakeFiles/git2.dir/src/fileops.c.o
[ 51%] Building C object CMakeFiles/git2.dir/src/graph.c.o
[ 52%] Building C object CMakeFiles/git2.dir/src/odb_mempack.c.o
[ 53%] Building C object CMakeFiles/git2.dir/src/odb_loose.c.o
[ 54%] Building C object CMakeFiles/git2.dir/src/crlf.c.o
[ 54%] Building C object CMakeFiles/git2.dir/src/tls_stream.c.o
[ 55%] Building C object CMakeFiles/git2.dir/src/config_cache.c.o
[ 56%] Building C object CMakeFiles/git2.dir/src/commit_list.c.o
[ 56%] Building C object CMakeFiles/git2.dir/src/rebase.c.o
[ 57%] Building C object CMakeFiles/git2.dir/src/util.c.o
[ 58%] Building C object CMakeFiles/git2.dir/src/branch.c.o
[ 58%] Building C object CMakeFiles/git2.dir/src/patch_parse.c.o
[ 59%] Building C object CMakeFiles/git2.dir/src/annotated_commit.c.o
[ 60%] Building C object CMakeFiles/git2.dir/src/transports/local.c.o
[ 61%] Building C object CMakeFiles/git2.dir/src/transports/smart_protocol.c.o
[ 61%] Building C object CMakeFiles/git2.dir/src/transports/smart.c.o
[ 62%] Building C object CMakeFiles/git2.dir/src/transports/ssh.c.o
[ 63%] Building C object CMakeFiles/git2.dir/src/transports/git.c.o
[ 63%] Building C object CMakeFiles/git2.dir/src/transports/winhttp.c.o
[ 64%] Building C object CMakeFiles/git2.dir/src/transports/cred_helpers.c.o
[ 65%] Building C object CMakeFiles/git2.dir/src/transports/cred.c.o
[ 66%] Building C object CMakeFiles/git2.dir/src/transports/smart_pkt.c.o
[ 66%] Building C object CMakeFiles/git2.dir/src/transports/auth.c.o
[ 67%] Building C object CMakeFiles/git2.dir/src/transports/http.c.o
[ 68%] Building C object CMakeFiles/git2.dir/src/transports/auth_negotiate.c.o
[ 68%] Building C object CMakeFiles/git2.dir/src/xdiff/xprepare.c.o
[ 69%] Building C object CMakeFiles/git2.dir/src/xdiff/xhistogram.c.o
[ 70%] Building C object CMakeFiles/git2.dir/src/xdiff/xdiffi.c.o
[ 71%] Building C object CMakeFiles/git2.dir/src/xdiff/xpatience.c.o
[ 71%] Building C object CMakeFiles/git2.dir/src/xdiff/xutils.c.o
[ 72%] Building C object CMakeFiles/git2.dir/src/xdiff/xmerge.c.o
[ 73%] Building C object CMakeFiles/git2.dir/src/xdiff/xemit.c.o
[ 73%] Building C object CMakeFiles/git2.dir/src/unix/map.c.o
[ 74%] Building C object CMakeFiles/git2.dir/src/unix/realpath.c.o
[ 75%] Building C object CMakeFiles/git2.dir/src/hash/hash_generic.c.o
[ 76%] Linking C static library libgit2.a
make[4]: Leaving directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
[100%] Built target git2
make[3]: Leaving directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
make[2]: Leaving directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/build'
go install --tags "static" ./...
# github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26
./vendor/libgit2/build//libgit2.a(filebuf.c.o): In function `write_deflate':
./vendor/libgit2/src/filebuf.c:176: undefined reference to `deflate'
./vendor/libgit2/build//libgit2.a(filebuf.c.o): In function `git_filebuf_cleanup':
./vendor/libgit2/src/filebuf.c:123: undefined reference to `deflateEnd'
./vendor/libgit2/build//libgit2.a(filebuf.c.o): In function `git_filebuf_open_withsize':
./vendor/libgit2/src/filebuf.c:321: undefined reference to `deflateInit_'
./vendor/libgit2/build//libgit2.a(pack.c.o): In function `packfile_unpack_compressed':
./vendor/libgit2/src/pack.c:868: undefined reference to `inflateInit_'
./vendor/libgit2/src/pack.c:879: undefined reference to `inflate'
./vendor/libgit2/src/pack.c:894: undefined reference to `inflateEnd'
./vendor/libgit2/src/pack.c:886: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(pack.c.o): In function `git_packfile_stream_open':
./vendor/libgit2/src/pack.c:791: undefined reference to `inflateInit_'
./vendor/libgit2/build//libgit2.a(pack.c.o): In function `git_packfile_stream_read':
./vendor/libgit2/src/pack.c:817: undefined reference to `inflate'
./vendor/libgit2/build//libgit2.a(pack.c.o): In function `git_packfile_stream_free':
./vendor/libgit2/src/pack.c:842: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(odb_loose.c.o): In function `finish_inflate':
./vendor/libgit2/src/odb_loose.c:218: undefined reference to `inflate'
./vendor/libgit2/src/odb_loose.c:220: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(odb_loose.c.o): In function `read_header_loose':
./vendor/libgit2/src/odb_loose.c:451: undefined reference to `inflateInit_'
./vendor/libgit2/src/odb_loose.c:456: undefined reference to `inflate'
./vendor/libgit2/build//libgit2.a(odb_loose.c.o): In function `inflate_buffer':
./vendor/libgit2/src/odb_loose.c:251: undefined reference to `inflateInit_'
./vendor/libgit2/src/odb_loose.c:257: undefined reference to `inflate'
./vendor/libgit2/src/odb_loose.c:259: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(odb_loose.c.o): In function `start_inflate':
./vendor/libgit2/src/odb_loose.c:202: undefined reference to `inflateInit_'
./vendor/libgit2/src/odb_loose.c:205: undefined reference to `inflate'
./vendor/libgit2/build//libgit2.a(odb_loose.c.o): In function `inflate_tail':
./vendor/libgit2/src/odb_loose.c:298: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(odb_loose.c.o): In function `abort_inflate':
./vendor/libgit2/src/odb_loose.c:210: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(odb_loose.c.o): In function `inflate_tail':
./vendor/libgit2/src/odb_loose.c:283: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(netops.c.o): In function `gitno_extract_url_parts':
./vendor/libgit2/src/netops.c:239: undefined reference to `http_parser_parse_url'
./vendor/libgit2/build//libgit2.a(indexer.c.o): In function `crc_object':
./vendor/libgit2/src/indexer.c:260: undefined reference to `crc32'
./vendor/libgit2/src/indexer.c:267: undefined reference to `crc32'
./vendor/libgit2/build//libgit2.a(indexer.c.o): In function `hash_and_save':
./vendor/libgit2/src/indexer.c:400: undefined reference to `crc32'
./vendor/libgit2/build//libgit2.a(indexer.c.o): In function `inject_object':
./vendor/libgit2/src/indexer.c:734: undefined reference to `crc32'
./vendor/libgit2/src/indexer.c:742: undefined reference to `crc32'
./vendor/libgit2/build//libgit2.a(indexer.c.o):/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26/vendor/libgit2/src/indexer.c:752: more undefined references to `crc32' follow
./vendor/libgit2/build//libgit2.a(zstream.c.o): In function `git_zstream_init':
./vendor/libgit2/src/zstream.c:38: undefined reference to `deflateInit_'
./vendor/libgit2/src/zstream.c:36: undefined reference to `inflateInit_'
./vendor/libgit2/build//libgit2.a(zstream.c.o): In function `git_zstream_reset':
./vendor/libgit2/src/zstream.c:55: undefined reference to `deflateReset'
./vendor/libgit2/src/zstream.c:53: undefined reference to `inflateReset'
./vendor/libgit2/build//libgit2.a(zstream.c.o): In function `git_zstream_get_output':
./vendor/libgit2/src/zstream.c:117: undefined reference to `inflate'
./vendor/libgit2/src/zstream.c:119: undefined reference to `deflate'
./vendor/libgit2/build//libgit2.a(zstream.c.o): In function `git_zstream_free':
./vendor/libgit2/src/zstream.c:47: undefined reference to `deflateEnd'
./vendor/libgit2/src/zstream.c:45: undefined reference to `inflateEnd'
./vendor/libgit2/build//libgit2.a(http.c.o): In function `clear_parser_state':
./vendor/libgit2/src/transports/http.c:505: undefined reference to `http_parser_init'
./vendor/libgit2/build//libgit2.a(http.c.o): In function `http_connect':
./vendor/libgit2/src/transports/http.c:597: undefined reference to `http_should_keep_alive'
./vendor/libgit2/build//libgit2.a(http.c.o): In function `http_stream_read':
./vendor/libgit2/src/transports/http.c:743: undefined reference to `http_parser_execute'
./vendor/libgit2/src/transports/http.c:769: undefined reference to `http_errno_description'
collect2: error: ld returned 1 exit status
Makefile:14: recipe for target 'install-static' failed
make[1]: *** [install-static] Error 2
make[1]: Leaving directory '/home/florian/.go/src/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v26'
Makefile:39: recipe for target 'build-libgit2' failed
make: *** [build-libgit2] Error 2

git2go.v26

The latest libgit2 on os x via homebrew is 0.26.

Do you think you could switch to git2go.v26?
That would make grv installation (at least for Mac users) as easy as
go get github.com/rgburke/grv/cmd/grv

Document the instruction how to build on mac

Personally, I couldn't build grv on macOS. I have ncurses and readline, but they seem to be incompatible or smth, because building process fails with issues like this:

cmd/grv/readline.go:200:30: could not determine kind of name for C.rl_display_prompt

clang errors for preamble:
cmd/grv/readline.go:14:2: error: use of undeclared identifier 'rl_catch_signals'
        rl_catch_signals = 0;

can't run it and get a error

[root@demotest ~]# uname -a
Linux demotest 2.6.32-696.18.7.el6.x86_64 #1 SMP Thu Jan 4 17:31:22 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@demotest ~]# ./grv -repoFilePath /data/gitclone/
FATAL: kernel too old
Aborted

which system kernel version is available for ?

Checkout to any commit or branch

Hi !

Thanks for your work !

It's very cool to have a command line tool to view a git repository ;-) ! But maybe, when we looking for to a commit, a useful thing we want to do is to checkout to any selected commit or branch ?

I know this feature could diverge from the main goal of grv « a terminal interface for viewing git repositories ». But maybe it could be very cool ! This feature could follow directly the main goal: view… then checkout to branch or commit selected.

What do you think about this idea ?

Error opening terminal: xterm-256color

I don't seem to have issues with other applications but grv does not want to work for me:

$ mkdir temp
$ cd temp

$ grv
FATAL: Unable to initialise grv: Unable to find a git repository in . or any of its parent directories

$ git init
Initialized empty Git repository in /home/cole/temptemptemp/.git/

$ grv
Error opening terminal: xterm-256color.

Crash

When I scroll down to a certain commit grv crashes with this -

anic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5ece08]
goroutine 13 [running]:
main.DetermineRenderedCodePoint(0x9, 0x36, 0x0, 0x0, 0xc421b7e480, 0x1, 0x1)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/window.go:533 +0x208
main.(*TableFormatter).textWidth(0xc4201660c0, 0x11, 0x3, 0x2c, 0x3f)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:235 +0x10f
main.(*TableFormatter).determineMaxColWidths(0xc4201660c0, 0x1)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:220 +0x9b
main.(*TableFormatter).PadCells(0xc4201660c0, 0xc420244401, 0x7382f4, 0xc)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:180 +0x4c
main.(*TableFormatter).Render(0xc4201660c0, 0x766ba0, 0xc42013e0e0, 0x1, 0x1, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:144 +0x5f
main.(*CommitView).Render(0xc420132180, 0x766ba0, 0xc42013e0e0, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/commit_view.go:137 +0x408
main.(*ContainerView).renderWindowView(0xc4200ac160, 0x765d80, 0xc420132180, 0xc42161d2a0, 0xc420132180, 0xc421808b01, 0x8)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:388 +0xd6
main.(*ContainerView).Render(0xc4200ac160, 0x29, 0x6a, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:282 +0x30a
main.(*ContainerView).Render(0xc4200ac210, 0x29, 0x8d, 0xc420528d90, 0x1, 0x1, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:291 +0x495
main.(*View).Render(0xc4201520c0, 0x2c, 0x8d, 0xbea53b26e501a563, 0x430392b8b, 0xab7c80, 0xab7c01, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/view.go:164 +0x23d
main.(*GRV).runDisplayLoop(0xc420132280, 0xc42001b560, 0xc420024600, 0xc420142000, 0xc42007c600)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/grv.go:352 +0x7bf
created by main.(*GRV).Run
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/grv.go:261 +0x13b

What can I provide to help debug ?
btw, thx for grv.

CMake Error - Mac OsX High Sierra

Hi all,

I was trying to install grv but i couldn't figure it out.
I followed the instructions from README.md that are:

brew install readline pkg-config cmake
go get -d github.com/rgburke/grv/cmd/grv

# I then moved the files from go directory (didn't seem a good directory to me to do <make install>)
mv $GOPATH/src/github.com/rgburke/grv /usr/local/ 
cd /usr/local

# I have errors at this step
make install

And the error are:

git submodule update --init --recursive
if patch --dry-run -N -d ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v25 -p1 < git2go.v25.patch >/dev/null; then \
		patch -d ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v25 -p1 < git2go.v25.patch; \
	fi
cd ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v25 && git submodule update --init;
make -C ./cmd/grv/vendor/gopkg.in/libgit2/git2go.v25 install-static
./script/build-libgit2-static.sh
+ VENDORED_PATH=vendor/libgit2
+ cd vendor/libgit2
+ mkdir -p install/lib
+ mkdir -p build
+ cd build
+ cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../install -DUSE_EXT_HTTP_PARSER=OFF -DUSE_HTTPS=OFF -DUSE_NSEC=OFF -DUSE_SSH=OFF -DCURL=OFF ..
-- The C compiler identification is AppleClang 9.0.0.9000039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- broken
CMake Error at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /usr/local/go/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v25/vendor/libgit2/build/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/make" "cmTC_6c550/fast"
    /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_6c550.dir/build.make CMakeFiles/cmTC_6c550.dir/build
    Building C object CMakeFiles/cmTC_6c550.dir/testCCompiler.c.o
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc   -fPIC  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk   -o CMakeFiles/cmTC_6c550.dir/testCCompiler.c.o   -c /usr/local/go/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v25/vendor/libgit2/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_6c550
    /usr/local/Cellar/cmake/3.10.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6c550.dir/link.txt --verbose=1
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -fPIC  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -X 'main.version=v0.1.1-9-gc5bded9' -X 'main.headOid=c5bded9' -X 'main.buildDateTime=2018-02-06 12:35:17 CET'  CMakeFiles/cmTC_6c550.dir/testCCompiler.c.o  -o cmTC_6c550 
    clang: error: no such file or directory: 'main.version=v0.1.1-9-gc5bded9'
    clang: error: no such file or directory: 'main.headOid=c5bded9'
    clang: error: no such file or directory: 'main.buildDateTime=2018-02-06 12:35:17 CET'
    make[3]: *** [cmTC_6c550] Error 1
    make[2]: *** [cmTC_6c550/fast] Error 2
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:14 (PROJECT)


-- Configuring incomplete, errors occurred!
See also "/usr/local/go/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v25/vendor/libgit2/build/CMakeFiles/CMakeOutput.log".
See also "/usr/local/go/github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v25/vendor/libgit2/build/CMakeFiles/CMakeError.log".
make[1]: *** [build-libgit2] Error 1
make: *** [build-libgit2] Error 2

Note that I already did

brew install readline pkg-config cmake

And everything was OK. Only readline installation gave me this message:

==> Pouring readline-7.0.3_1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only..

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

I have also set that EVN VARS in ~/.bash_profile but the error persists.
I someone could help I would be very grateful. Thankx!

Install via homebrew

Looks like a useful tool! Do you have any plans to create a brew formula, or has anyone else started looking at this?

grv won't show commit message

When viewing a commit, the commit message is not shown, only the first line of the commit message.

This leaves out important information.

install-static failed

ubuntu 16.04
brand new install
#go get -d github.com/rgburke/grv/cmd/grv
#cd $GOPATH/src/github.com/rgburke/grv
#make

Makefile:14: recipe for target 'install-static' failed
make[1]: *** [install-static] Error 2
make[1]: Leaving directory '/home/lecheel/go_work/src/gopkg.in/libgit2/git2go.v25'
Makefile:34: recipe for target 'build-libgit2' failed
make: *** [build-libgit2] Error 2

sift00

NCurses Cursor failed: Failed to enable

I have tried installing with brew install grv as well as using the MacOS build instructions. In both cases, everything seems to build and install correctly, but when I try to use the tool I always get the following error.

FATAL: Unable to initialise grv: NCurses Cursor failed: Failed to enable 

Is this a PEBKAC error, or is this a real error that I just need to find the solution or workaround to?

libgit2/git2go fails to build due to pkg-config error

on my mac:

$ go version
go version go1.9.4 darwin/amd64

$ git show
commit ffbd489206c5e76b5c2e7ac251f088880678ea06 (HEAD -> master, tag: v0.1.2, origin/master, origin/HEAD)
[...]
Date:   Wed Feb 7 20:15:05 2018 +0000
[...]

$ make
[...]
go build github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v25: invalid pkg-config package name: --static
make[1]: *** [install-static] Error 1
make: *** [build-libgit2] Error 2

$ go build --tags static -ldflags "-X 'main.version=v0.1.2-0-gffbd489' -X 'main.headOid=ffbd489' -X 'main.buildDateTime=2018-02-07 13:37:56 PST'" -o grv ./cmd/grv
go build github.com/rgburke/grv/cmd/grv/vendor/gopkg.in/libgit2/git2go.v25: invalid pkg-config package name: --static

map usage with filtering

Hi, I need help with mapping. What I'm trying to do is filter the commits by comittername.
My map looks like this:
map CommitView m <grv-filter-prompt>committername="some_name"<Enter>
however it does not seem to work: the program freezes when I go into commit view and press m.
I also tried
map CommitView m <C-q>committername="some_name"<Enter> with the same result.

Is possible to do what I'm trying? Thanks!

grv just got killed right after it started

Hello,

I wanted to try out your tool but after I clone the repo and execute make install and trying to run grv the process just got killed without any sign.

[1]    13812 killed     ggui

I compiled with the following command: make install BINARY=ggui
The binary setting is irrelevant since it shows the same symptoms when I just fire a make install.
What am I doing wrong and how can I make it work? Also what else information do you need for this?

Thanks

Error during startup

I see this message constantly in a log with log level set to DEBUG
[FATAL] [main.go:34] - config value 'branch.my.remote' was not found
App doesn't start at all, any ideas?

Make fails, why GOPATH_DIR has "../../../.." in it?

When I issue make, the build fails. Full log is at the end. Basically, the code tries to use path $(GOPATH_DIR), which is set like below:

GRV_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
GOPATH_DIR:=$(GRV_DIR)../../../..

This looks like something that cannot work, because GRV_DIR is directory where I cloned the project. Is this Github repository only to be used with go get?

# make                                                         (git)-[master●]
go get -d ./...
The GRV_DIR is: /Users/sgniazdowski/.zplugin/plugins/rgburke---grv/
if patch --dry-run -N -d /Users/sgniazdowski/.zplugin/plugins/rgburke---grv/../../../../src/gopkg.in/libgit2/git2go.v25 -p1 < git2go.v25.patch >/dev/null; then \
		patch -d /Users/sgniazdowski/.zplugin/plugins/rgburke---grv/../../../../src/gopkg.in/libgit2/git2go.v25 -p1 < git2go.v25.patch; \
	fi
patch: **** Can't change to directory /Users/sgniazdowski/.zplugin/plugins/rgburke---grv/../../../../src/gopkg.in/libgit2/git2go.v25 : No such file or directory

There is my debug-echo "The GRV_DIR is ...".

Alias or cmd prompt for all git commands

It would be helpful to have either an alias command or to be able to drop to a git prompt and enter any git command manually. While having aliases for specific commands through UI is nice I often just have questions or actions that could be solved w/ git commands.

For example:
:git status > shows a dialog w/ the response ( or :g status )
:git stash > ( rather than exit grv in order to stash and switch branches )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.