Skip to content

Commit 764369c

Browse files
angavrilovspearce
authored andcommitted
git-gui: Support more git version notations.
Recently the msysgit repository has got a '1.6.1-msysgit1' tag, which, when used to build the git version, is not handled gracefully by the git-gui version code. This patch changes the regular expressions to fix it, and removes the hardcoded 'rc' string. Now git-gui can accept a version tail like '.foo123.GIT.bar.456.7.g89ab' Signed-off-by: Alexander Gavrilov <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 584fa9c commit 764369c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-gui.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,9 +769,9 @@ if {![regsub {^git version } $_git_version {} _git_version]} {
769769
set _real_git_version $_git_version
770770
regsub -- {[\-\.]dirty$} $_git_version {} _git_version
771771
regsub {\.[0-9]+\.g[0-9a-f]+$} $_git_version {} _git_version
772-
regsub {\.rc[0-9]+$} $_git_version {} _git_version
772+
regsub {\.[a-zA-Z]+\.?[0-9]+$} $_git_version {} _git_version
773773
regsub {\.GIT$} $_git_version {} _git_version
774-
regsub {\.[a-zA-Z]+\.[0-9]+$} $_git_version {} _git_version
774+
regsub {\.[a-zA-Z]+\.?[0-9]+$} $_git_version {} _git_version
775775
776776
if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
777777
catch {wm withdraw .}

0 commit comments

Comments
 (0)