Currently, at least `:LazyGitCurrentFile` doesn't handle paths with
spaces correctly as they aren't escaped (if your current path is a valid
shell script, this can also lead to code execution)
This PR changes the lazygit commands from strings to lists to avoid this
problem
Co-authored-by: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com>
We have already worked out the "git root" for the current buffer, we did
this to work out the relative path. We might as well use this
information when calling `lazygitfilter`.
This now allows `lazygitfiltercurrentfile` to work, whether your actual
cwd is a git repository ('normal' workflow) or a project folder
containing many repositories (another workflow many vim users follow).
It looks like LSP did an autoformat on the file also, I can revert those
two lines if required.
## Motivation:
If I close LazyGit after having done some changes (Commit
something/change branch…) I often run into some minor inconsistency with
the UI on screen, that does not get updated to reflect the changes.
In particular the issue I’m having is with the color of the files inside
the [neo-tree](https://github.com/nvim-neo-tree/neo-tree.nvim) view. I
understand this is a really insignificant issue, but I still would like
to fix it.
## Proposed solution:
I have added an option that allow an user of the plugin to add a
callback that is automatically executed after exiting LazyGit, so that I
can put there the necessary code to refresh my UI
Passes `work-tree` and `git-dir` arguments for Lazygit.
This is very useful when using a bare git repo, so that Lazygit can still be used to manage the repo.
Save the window from which the LazyGit command was executed and return
to it on exit, so in case of multiple splits the user does not have to
navigate back manually
blub
The file path check is incorrect. It gives the main repository path to
lazygit, not the submodule path. Lazygit itself can do well for the
path-checking job, so just let lazygit deal with it.
Symlink check functionality is kept.
Signed-off-by: Avimitin <avimitin@gmail.com>