Re: [PATCH 3/3] git-gui: new config to control staging of untracked files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 17, 2011 at 20:34, Heiko Voigt <hvoigt@xxxxxxxxxx> wrote:
> Hi,
>
> what the series tries to achieve looks good to me. Just one comment.

Thanks.

>
> On Fri, Oct 14, 2011 at 09:25:21PM +0200, Bert Wesarg wrote:
> [...]
>> diff --git a/lib/index.tcl b/lib/index.tcl
>> index 014acf9..45094c2 100644
>> --- a/lib/index.tcl
>> +++ b/lib/index.tcl
>> @@ -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
>> +             }
> [...]
>
> 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
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]