X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-gui%2Flib%2Findex.tcl;h=5d7bbf23eddeb2ff146487b28a79feee1d296289;hb=357ba5cf0d4c77c6b4ad8d2cc604392687a3e2a6;hp=e9db0c49895fbebdf8dbe7c0472546a05fea26a0;hpb=80b5b6985510406dfb4016cada8013832078930c;p=git.git diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl index e9db0c498..8efbbdde2 100644 --- a/git-gui/lib/index.tcl +++ b/git-gui/lib/index.tcl @@ -103,8 +103,11 @@ proc write_update_indexinfo {fd pathList totalCnt batch after} { set s $file_states($path) switch -glob -- [lindex $s 0] { A? {set new _O} - M? {set new _M} + MT - + TM - T_ {set new _T} + M? {set new _M} + TD - D_ {set new _D} D? {set new _?} ?? {continue} @@ -167,7 +170,10 @@ proc write_update_index {fd pathList totalCnt batch after} { AD {set new __} ?D {set new D_} _O - + AT - AM {set new A_} + TM - + MT - _T {set new T_} _U - U? { @@ -261,7 +267,7 @@ proc unstage_helper {txt paths} { switch -glob -- [lindex $file_states($path) 0] { A? - M? - - T_ - + T? - D? { lappend pathList $path if {$path eq $current_diff_path} { @@ -350,12 +356,33 @@ proc do_add_all {} { global file_states set paths [list] + set untracked_paths [list] foreach path [array names file_states] { switch -glob -- [lindex $file_states($path) 0] { U? {continue} ?M - ?T - ?D {lappend paths $path} + ?O {lappend untracked_paths $path} + } + } + if {[llength $untracked_paths]} { + 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] } } add_helper {Adding all changed files} $paths