git-gui: added gui.maxrecentrepo to extend the number of remembered repos
[gitweb.git] / lib / index.tcl
index 014acf93198d3ef3bc347a65b6129121b1228f09..8efbbdde21123dd65412cd5fe6dbb506966b0af9 100644 (file)
@@ -367,7 +367,20 @@ proc do_add_all {} {
                }
        }
        if {[llength $untracked_paths]} {
-               set reply [ask_popup [mc "Stage also untracked files?"]]
+               set reply 0
+               switch -- [get_config gui.stageuntracked] {
+               no {
+                       set reply 0
+               }
+               yes {
+                       set reply 1
+               }
+               ask -
+               default {
+                       set reply [ask_popup [mc "Stage %d untracked files?" \
+                                                                         [llength $untracked_paths]]]
+               }
+               }
                if {$reply} {
                        set paths [concat $paths $untracked_paths]
                }