You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this binding to start a code review in neovim directly from the selected commit in tig:
bind main v !>nvim +'DiffviewOpen %(commit)~1..%(head)'
Thing is .. that only works if the branch I want to review is currently checked out or if I use tig -> view-refs, select the branch and commit and then use the keybind.
If I start tig with a branch directly, e.g. tig origin/some/branch and select a commit, the %(head) variable contains the wrong commit (the one of the currently checked out branch, not the branch I called tig with).
Edit: I also tried %(branch) and %(refname) but they wont work either.
The text was updated successfully, but these errors were encountered:
%(revargs) should do the job for your binding, but I agree it would be best to initialize %(head) from a revision in %(revargs) as it may also contain other revision arguments like --all.
bind main V !echo %(commit) %(head) %(revargs) works but your original binding will also fail with %(revargs) due to 's. No luck with current Tig version, the following patch initialises %(head) from command line arguments:
I have this binding to start a code review in neovim directly from the selected commit in tig:
Thing is .. that only works if the branch I want to review is currently checked out or if I use tig -> view-refs, select the branch and commit and then use the keybind.
If I start tig with a branch directly, e.g.
tig origin/some/branch
and select a commit, the%(head)
variable contains the wrong commit (the one of the currently checked out branch, not the branch I called tig with).Edit: I also tried
%(branch)
and%(refname)
but they wont work either.The text was updated successfully, but these errors were encountered: