git-gui: new config to control staging of untracked files

The default is the current "ask".

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
Bert Wesarg
2011-10-14 21:25:21 +02:00
committed by Pat Thoyts
parent 526aa2b203
commit bb196e2619
3 changed files with 32 additions and 1 deletions

View File

@ -367,7 +367,19 @@ 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 also untracked files?"]]
}
}
if {$reply} {
set paths [concat $paths $untracked_paths]
}