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
I would like to have the option to automatically change the global git-config depending on the active workspace.
Ideally sourcegit would store the global preferences in independent files for each available workspace and overwrite the global ~/.gitconfig with the content corresponding to the active workspace.
An alternative (I think easier) implementation would be to give the user the option to specify a config file in the workspace settings that can be included at the end of the global config. That way one could craft a file by hand and have it activated automatically.
I think this approach wouldn't be that hard to implement, we could add an entry like this to the end of the global config and simply update the path if another workspace is initiated.
If I understood your proposal correctly, I'll raise a potential issue. What happens if more than one instance of SourceGit is open at the same time? Editing a file on disk when switching workspaces doesn’t seem feasible to me.
Just to clarify.
I am aware, that the global GIT configuration can be changed that way, I want different global configurations for different workspaces. But I understand that this is out of scope.
Could we do something like run a user-specified command after switching to another workspace?
Like after switching to this workspace run this command.
@love-linger I'm not sure if this has been discussed yet or if it's too early to consider. Has the possibility of SourceGit supporting plugins been explored? It seems like it would be a great way to make SourceGit more open to community contributions and prevent the product from becoming cluttered with too many features in the main package, distracting from its primary goal of being a fast and efficient Git client.
Activity
dougcunha commentedon Oct 25, 2024
If I understood your proposal correctly, I'll raise a potential issue. What happens if more than one instance of SourceGit is open at the same time? Editing a file on disk when switching workspaces doesn’t seem feasible to me.
love-linger commentedon Oct 28, 2024
The
GITpage ofPreferencewindow is designed to provide the ability to modify commonly used global GIT configurations in GUI way.Masgalor commentedon Oct 28, 2024
Just to clarify.
I am aware, that the global GIT configuration can be changed that way, I want different global configurations for different workspaces. But I understand that this is out of scope.
Could we do something like run a user-specified command after switching to another workspace?
Like after switching to this workspace run this command.
dougcunha commentedon Oct 28, 2024
@love-linger I'm not sure if this has been discussed yet or if it's too early to consider. Has the possibility of SourceGit supporting plugins been explored? It seems like it would be a great way to make SourceGit more open to community contributions and prevent the product from becoming cluttered with too many features in the main package, distracting from its primary goal of being a fast and efficient Git client.
love-linger commentedon Oct 29, 2024
PS: You can use
includeIfin git configuration file. For example:love-linger commentedon Oct 30, 2024
Currently, we have no plan to do this.