git-gui: update Japanese information
[gitweb.git] / git-gui.sh
index dc53e9a8f5c2b1401afd8c3d174981783c19e23b..11048c7a0e94f598b168de98d18fda9aea420c7d 100755 (executable)
@@ -83,9 +83,9 @@ if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
                return [uplevel 1 real__auto_load $name $args]
        }
        rename source real__source
-       proc source {name} {
-               puts stderr "source    $name"
-               uplevel 1 real__source $name
+       proc source {args} {
+               puts stderr "source    $args"
+               uplevel 1 [linsert $args 0 real__source]
        }
        if {[tk windowingsystem] eq "win32"} { console show }
 }
@@ -1286,7 +1286,7 @@ load_config 0
 apply_config
 
 # v1.7.0 introduced --show-toplevel to return the canonical work-tree
-if {[package vsatisfies $_git_version 1.7.0-]} {
+if {[package vcompare $_git_version 1.7.0] >= 0} {
        if { [is_Cygwin] } {
                catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
        } else {
@@ -1542,7 +1542,7 @@ proc rescan_stage2 {fd after} {
                close $fd
        }
 
-       if {[package vsatisfies $::_git_version 1.6.3-]} {
+       if {[package vcompare $::_git_version 1.6.3] >= 0} {
                set ls_others [list --exclude-standard]
        } else {
                set ls_others [list --exclude-per-directory=.gitignore]
@@ -1965,20 +1965,22 @@ proc display_all_files {} {
 
        set to_display [lsort [array names file_states]]
        set display_limit [get_config gui.maxfilesdisplayed]
-       if {[llength $to_display] > $display_limit} {
-               if {!$files_warning} {
-                       # do not repeatedly warn:
-                       set files_warning 1
-                       info_popup [mc "Displaying only %s of %s files." \
-                               $display_limit [llength $to_display]]
-               }
-               set to_display [lrange $to_display 0 [expr {$display_limit-1}]]
-       }
+       set displayed 0
        foreach path $to_display {
                set s $file_states($path)
                set m [lindex $s 0]
                set icon_name [lindex $s 1]
 
+               if {$displayed > $display_limit && [string index $m 1] eq {O} } {
+                       if {!$files_warning} {
+                               # do not repeatedly warn:
+                               set files_warning 1
+                               info_popup [mc "Display limit (gui.maxfilesdisplayed = %s) reached, not showing all %s files." \
+                                       $display_limit [llength $to_display]]
+                       }
+                       continue
+               }
+
                set s [string index $m 0]
                if {$s ne {U} && $s ne {_}} {
                        display_all_files_helper $ui_index $path \
@@ -1993,6 +1995,7 @@ proc display_all_files {} {
                if {$s ne {_}} {
                        display_all_files_helper $ui_workdir $path \
                                $icon_name $s
+                       incr displayed
                }
        }