-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Edit" function in tree and diff view opens the wrong path under certain conditions in submodules #781
Comments
See f99d2af for a test that proves it's an issue. |
jonas
added a commit
that referenced
this issue
May 20, 2018
jonas
added a commit
that referenced
this issue
May 20, 2018
Confirmed fixed. Thanks! |
Thanks for testing. |
rolandwalker
pushed a commit
to rolandwalker/tig
that referenced
this issue
May 21, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part One
When the git repo you're viewing is cloned as a submodule,
e
opens the wrong file path for editing, but only if your working directory isn't the top directory of the submodule if that makes any sense.Steps to reproduce:
Run these shell lines:
$ mkdir temp ; cd temp
$ git init
$ git submodule add https://github.com/jonas/tig.git
$ cd tig/src
$ tig
Then in the resulting tig window, press enter on a commit, then use j/k to highlight a diff-stat line and press e. It will give the error "Failed to open file: ..."
Expected behavior: Open the file in $EDITOR from the highlighted line in the diff view.
Part Two
Likewise, pressing
e
on a file when in tree view results in the editor opening a non-existent file, but only sometimes. It seems to have to do with it being both a submodule, and trying to open a file using tree view two levels above the directory where you started tig.Steps to reproduce, part 2:
t
to enter tree view, then press enter on..
twice, so you're at the top level for the submodule.INSTALL.adoc
and presse
.I find it will open
temp/INSTALL.adoc
which doesn't exist, instead oftemp/tig/INSTALL.adoc
.Tested under 58aa1d4 running on Slackware Linux x86_64 with git-2.16.1.
The text was updated successfully, but these errors were encountered: