-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Compute old lines for changed file #26
Comments
I'll try to research how https://github.com/gitkraken/vscode-gitlens does this (if they do it). This doesn't feel like a novel problem, surely someone must've done something similar |
Fugitive's I think the code to do the old line number computation lives in this ~230 line behemoth of a function: https://github.com/tpope/vim-fugitive/blob/5b62c75238bf04b3156ffe62f821930827de8578/autoload/fugitive.vim#L7251= Specifically here perhaps?: https://github.com/tpope/vim-fugitive/blob/5b62c75238bf04b3156ffe62f821930827de8578/autoload/fugitive.vim#L7404-L7431= Looks like it's using |
@ruifm git link does not make sense to use unless it's a commit pushed to remote. My suggestion is to use a config param to allow the git diff line remap to be applied until the latest commit pushed remotely. Depending on whether config specifies to use latest commit or latest remote commit do the diff line remap accordingly. |
After #24, it's now possible to generate URLs for changed files.
Unfortunately that is done at the expense of the line numbers which are discarded since on a changed file they no longer make sense. See #21 for further discussion.
It should be possible to parse
git diff
and compute what the old line numbers were, and use those ones instead of nothing.The text was updated successfully, but these errors were encountered: