git-gui: Treat `git version` as `git --version`
[gitweb.git] / git-gui.sh
index 53cf89876fe9978500c911683e6245f92082ff30..a3ac5daf14c3e57229d3d1dbea5bdee3c368fdb5 100755 (executable)
@@ -294,6 +294,7 @@ proc _git_cmd {name} {
 
        if {[catch {set v $_git_cmd_path($name)}]} {
                switch -- $name {
+                 version   -
                --version   -
                --exec-path { return [list $::_git $name] }
                }
@@ -315,7 +316,10 @@ proc _git_cmd {name} {
                        #
                        set v [list $::_sh [gitexec git-$name]]
                } else {
-                       error "No [gitexec git-$name]"
+                       # Assume it is builtin to git somehow and we
+                       # aren't actually able to see a file for it.
+                       #
+                       set v [list $::_git $name]
                }
                set _git_cmd_path($name) $v
        }