git-gui: remove unused git-version

git-version supports choosing different bodies of code passed into it, rather than using the more traditional if/else construct typically used. The only use of git-version in this mode was by its author in 2007, and that code has been deleted. So, delete this now unused function that was mostly ignored. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>

Mark Levedahl committed Feb 13, 2024 at 00:19 UTC c939344b683cbad03bccda986f7babbce4d36aae
1 file changed -44
git-gui.sh
-44
@@ -1029,50 +1029,6 @@ if {[catch {set vcheck [package vcompare $_git_version $MIN_GIT_VERSION]}] ||
1029 }
1030 unset _real_git_version
1031
1032 -proc git-version {args} {
1033 - global _git_version
1034 -
1035 - switch [llength $args] {
1036 - 0 {
1037 - return $_git_version
1038 - }
1039 -
1040 - 2 {
1041 - set op [lindex $args 0]
1042 - set vr [lindex $args 1]
1043 - set cm [package vcompare $_git_version $vr]
1044 - return [expr $cm $op 0]
1045 - }
1046 -
1047 - 4 {
1048 - set type [lindex $args 0]
1049 - set name [lindex $args 1]
1050 - set parm [lindex $args 2]
1051 - set body [lindex $args 3]
1052 -
1053 - if {($type ne {proc} && $type ne {method})} {
1054 - error "Invalid arguments to git-version"
1055 - }
1056 - if {[llength $body] < 2 || [lindex $body end-1] ne {default}} {
1057 - error "Last arm of $type $name must be default"
1058 - }
1059 -
1060 - foreach {op vr cb} [lrange $body 0 end-2] {
1061 - if {[git-version $op $vr]} {
1062 - return [uplevel [list $type $name $parm $cb]]
1063 - }
1064 - }
1065 -
1066 - return [uplevel [list $type $name $parm [lindex $body end]]]
1067 - }
1068 -
1069 - default {
1070 - error "git-version >= x"
1071 - }
1072 -
1073 - }
1074 -}
1075 -
1032 ######################################################################
1033 ##
1034 ## configure our library