@@ -367,8 +367,7 @@ proc do_add_all {} {}}if{[llength$unknown_paths]}{-setreply[ask_popup[mc"There are unknown files do you also want-tostagethose?"]]+setreply[ask_popup[mc"There are unknown files do you also want to stage those?"]]if{$reply}{setpaths[concat$paths$unknown_paths]}
"untracked" is the right phrase for files new to git. For example
git-status uses this phrase. Also make the question shorter.
Signed-off-by: Bert Wesarg <redacted>
---
lib/index.tcl | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
@@ -356,20 +356,20 @@ proc do_add_all {} {globalfile_statessetpaths[list]-setunknown_paths[list]+setuntracked_paths[list]foreachpath[arraynamesfile_states]{switch-glob--[lindex$file_states($path)0]{U?{continue}?M-?T-?D{lappendpaths$path}-?O{lappendunknown_paths$path}+?O{lappenduntracked_paths$path}}}-if{[llength$unknown_paths]}{-setreply[ask_popup[mc"There are unknown files do you also want to stage those?"]]+if{[llength$untracked_paths]}{+setreply[ask_popup[mc"Stage also untracked files?"]]if{$reply}{-setpaths[concat$paths$unknown_paths]+setpaths[concat$paths$untracked_paths]}}add_helper{Addingallchangedfiles}$paths
[...]
Here I am wondering whether we have a similar mechanism in git gui like
in core git that makes yes,true,1 equivalents (and similar with other
values) ? If we don't I think the series is fine as it is otherwise it
probably makes sense to use that mechanism.
Cheers Heiko
}
}
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
+ }
[...]
Here I am wondering whether we have a similar mechanism in git gui like
in core git that makes yes,true,1 equivalents (and similar with other
values) ?
But it is not only yes,true,1 or no,false,0 its a tristate with the
third state 'ask'. For booleans, there is such functionality in git
gui. See is_config_true and is_config_false. Reusing these for this
tristate wouldn't work. The current check here is indeed very strict
and should be loosen by at least ignoring the case, surrounding
spaces, and allow also true/false. But also note, that this variable
can be set via the Options menu, so you can't mistype it.
Bert
If we don't I think the series is fine as it is otherwise it
probably makes sense to use that mechanism.
Cheers Heiko
Hi,
On Mon, Oct 17, 2011 at 08:47:50PM +0200, Bert Wesarg wrote:
On Mon, Oct 17, 2011 at 20:34, Heiko Voigt [off-list ref] wrote:
quoted
Here I am wondering whether we have a similar mechanism in git gui like
in core git that makes yes,true,1 equivalents (and similar with other
values) ?
But it is not only yes,true,1 or no,false,0 its a tristate with the
third state 'ask'. For booleans, there is such functionality in git
gui. See is_config_true and is_config_false. Reusing these for this
tristate wouldn't work. The current check here is indeed very strict
and should be loosen by at least ignoring the case, surrounding
spaces, and allow also true/false. But also note, that this variable
can be set via the Options menu, so you can't mistype it.
Well if using git config you can ;-). I just wanted to ask whether we
may already have machinery which supports such tristate.
If we do not I think the current "strict" configuration is fine. In most
cases the user will use the gui itself to configure such behavior so
thats no big deal.
If someone needs that it can be added later on.
Thanks, Heiko