]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: remove unused git-version
authorMark Levedahl <mlevedahl@gmail.com>
Tue, 13 Feb 2024 05:19:56 +0000 (00:19 -0500)
committerMark Levedahl <mlevedahl@gmail.com>
Sat, 19 Jul 2025 03:48:06 +0000 (23:48 -0400)
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>
git-gui.sh

index 1e4c7601b96836b5a615694af06de785c0d3fc30..ef82e8bd63fa1c414b6ae096efaf33ec57f5dc8e 100755 (executable)
@@ -1029,50 +1029,6 @@ if {[catch {set vcheck [package vcompare $_git_version $MIN_GIT_VERSION]}] ||
 }
 unset _real_git_version
 
-proc git-version {args} {
-       global _git_version
-
-       switch [llength $args] {
-       0 {
-               return $_git_version
-       }
-
-       2 {
-               set op [lindex $args 0]
-               set vr [lindex $args 1]
-               set cm [package vcompare $_git_version $vr]
-               return [expr $cm $op 0]
-       }
-
-       4 {
-               set type [lindex $args 0]
-               set name [lindex $args 1]
-               set parm [lindex $args 2]
-               set body [lindex $args 3]
-
-               if {($type ne {proc} && $type ne {method})} {
-                       error "Invalid arguments to git-version"
-               }
-               if {[llength $body] < 2 || [lindex $body end-1] ne {default}} {
-                       error "Last arm of $type $name must be default"
-               }
-
-               foreach {op vr cb} [lrange $body 0 end-2] {
-                       if {[git-version $op $vr]} {
-                               return [uplevel [list $type $name $parm $cb]]
-                       }
-               }
-
-               return [uplevel [list $type $name $parm [lindex $body end]]]
-       }
-
-       default {
-               error "git-version >= x"
-       }
-
-       }
-}
-
 ######################################################################
 ##
 ## configure our library