You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working on multiple projects within the same Vim instance, gitsigns "base"-configuration functionality is not ideal, because there is no (documented) way to set the base separately for different projects. For example, suppose I am working on feature branches on project1 and project2. project1 uses main and project2 uses master for the central branch. I want to check the status of my feature branch against main in project1, so I run require('gitsigns').reset_base('main', true).
This is great for project1, but now the entire file content in project2 is treated as new, because the nonexistent branch main has been set as the base for project2.
Describe the solution you'd like
Allow setting cwd (i.e. project/workspace)-scoped base:
You could preserve backward compatibility by treating any truthy value that is not'cwd' as equivalent to 'global'.
Describe alternatives you've considered
A hack where I store the cwd-scoped base in an external data structure and use autocmds to set the buffer base from this structure. Undesirable.
The text was updated successfully, but these errors were encountered:
When working on multiple projects within the same Vim instance,
gitsigns
"base"-configuration functionality is not ideal, because there is no (documented) way to set the base separately for different projects. For example, suppose I am working on feature branches on project1 and project2. project1 usesmain
and project2 usesmaster
for the central branch. I want to check the status of my feature branch againstmain
in project1, so I runrequire('gitsigns').reset_base('main', true)
.This is great for project1, but now the entire file content in project2 is treated as new, because the nonexistent branch
main
has been set as the base for project2.Describe the solution you'd like
Allow setting cwd (i.e. project/workspace)-scoped base:
You could preserve backward compatibility by treating any truthy value that is not
'cwd'
as equivalent to'global'
.Describe alternatives you've considered
A hack where I store the cwd-scoped base in an external data structure and use autocmds to set the buffer base from this structure. Undesirable.
The text was updated successfully, but these errors were encountered: