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>
Setting `-p <path>` is the same as setting `-w <path> -g <path>/.git/`,
but this eliminates the possibility that the git dir could be outside of
the work tree, or else named something besides `.git`. Use case for me
is my configuration files are VC'ed in a git repo, and checked out into
`$HOME` (the work tree). The repo is a bare repo elsewhere.