diff options
| author | Mark Levedahl <mlevedahl@gmail.com> | 2024-02-13 00:19:56 -0500 |
|---|---|---|
| committer | Mark Levedahl <mlevedahl@gmail.com> | 2025-07-18 23:48:06 -0400 |
| commit | c939344b683cbad03bccda986f7babbce4d36aae (patch) | |
| tree | 93553c2ae193f8a982852ca68b00653687ffb1e3 | |
| parent | c85557098f90801583866d9829719b6e2cf4cd49 (diff) | |
| download | git-c939344b683cbad03bccda986f7babbce4d36aae.tar.gz | |
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>
| -rwxr-xr-x | git-gui.sh | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/git-gui.sh b/git-gui.sh index 1e4c7601b9..ef82e8bd63 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -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 |
