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 tried to force delete a branch. GitGraph uses git branch --delete --force name, which is unsupported by git V1.8.3. Native VS Code uses git branch -D name, which works.
It took me some time to figure out the reason for the failure (the error message only tells me how to use git branch). A warning about a too old git version for GitGraph would be helpful in such cases.
The text was updated successfully, but these errors were encountered:
Visual Studio Code itself issues a warning when Git < 2.0.0 is used, which the user must dismiss (so the extension doesn't duplicate the same warning). Additionally, I do implement warning messages when the extension needs to use a Git command / argument that was more recently introduced to Git, when the user attempts to use it.
In this specific case, I didn't spot the incompatibility because while both --delete and --force arguments do exist for git branch in older versions of Git, there is additional logic internally within Git that prevents them from being used together. Thank you for making me aware of it!
I'll adjust the extension to use git branch -D, instead of git branch --delete --force, as it will increase the backwards compatibility of the extension.
mhutchie
changed the title
Issue a warning, if an unsupported git version is detected
When force deleting a branch -D instead of --delete --force to increase backwards compatibility
Aug 2, 2021
mhutchie
changed the title
When force deleting a branch -D instead of --delete --force to increase backwards compatibility
When force deleting a branch, use -D instead of --delete --force to increase backwards compatibility
Aug 2, 2021
I tried to force delete a branch. GitGraph uses
git branch --delete --force name
, which is unsupported by git V1.8.3. Native VS Code usesgit branch -D name
, which works.It took me some time to figure out the reason for the failure (the error message only tells me how to use
git branch
). A warning about a too old git version for GitGraph would be helpful in such cases.The text was updated successfully, but these errors were encountered: