-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
fix: setqflist("all") should respect change_base #1094
Conversation
lua/gitsigns/git/repo.lua
Outdated
@@ -44,18 +45,27 @@ function M:command(args, spec) | |||
return git_command(args1, spec) | |||
end | |||
|
|||
--- @return string[] | |||
function M:files_changed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't pull the config into this file. Instead add the sha as an argument to this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
lua/gitsigns/git/repo.lua
Outdated
--- @type string[] | ||
local results = self:command({ 'status', '--porcelain', '--ignore-submodules' }) | ||
local results | ||
if base then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work if base is :0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will base be :0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When someone sets it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, it seems base will never be :0
gitsigns.nvim/lua/gitsigns/util.lua
Line 237 in f074844
if base == ':0' then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't matter, it might not in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add an additional check in both places, is that enough?
Commits needs squashing. |
349f76d
to
72a71e0
Compare
pass config.base as parameter to files_changed check if base = ":0"
Thanks |
If change_base is called, instead of run git status, run git diff against the changed base_commit.
Fix: #692