[Gambas-user] New colored version display fails with older git versions
Benoît Minisini
g4mba5 at gmail.com
Mon Nov 29 16:15:10 CET 2021
Le 26/11/2021 à 05:36, bb a écrit :
> The IDE CVersionControlGit class uses the following to try and obtain
> the currently active branch of the project:
> Public Sub GetCurrentBranch() As String
> Return Trim(RunShell("git branch --show-current"))
> End
>
> Unfortunately, the --show-current option in git-branch is only available
> in *versions 2.22.0 and later*. See
> https://github.com/laurent22/joplin/issues/1695
> <https://github.com/laurent22/joplin/issues/1695> for a "clue" resolving
> this by using "git rev-parse --abbrev-ref HEAD".
>
> Alternately, the following "should be" version independant but
> microscopically slower:
>
> Return Trim(RunShell("git branch | grep \* | cut -d ' ' -f2"))
>
> best regards
> bruce
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
It should be fixed with commmit
https://gitlab.com/gambas/gambas/-/commit/70505e42c6b4bf2d09b4a522c19f6c9fa3889fea.
Regards,
--
Benoît Minisini
More information about the User
mailing list