git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] Make difftool.prompt fall back to mergetool.prompt
@ 2010-01-22 16:36 Sebastian Schuberth
       [not found] ` <7vr5pivx70.fsf@alter.siamese.dyndns.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Schuberth @ 2010-01-22 16:36 UTC (permalink / raw)
  To: git; +Cc: David Aguilar

The documentation states that "git-difftool falls back to git-mergetool
config variables when the difftool equivalents have not been defined".
Until now, this was not the case for "difftool.prompt".

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
 git-difftool--helper.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index 57e8e32..3438aba 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -12,7 +12,8 @@ TOOL_MODE=diff
 # difftool.prompt controls the default prompt/no-prompt behavior
 # and is overridden with $GIT_DIFFTOOL*_PROMPT.
 should_prompt () {
-	prompt=$(git config --bool difftool.prompt || echo true)
+	prompt_merge=$(git config --bool mergetool.prompt || echo true)
+	prompt=$(git config --bool difftool.prompt || echo $prompt_merge)
 	if test "$prompt" = true; then
 		test -z "$GIT_DIFFTOOL_NO_PROMPT"
 	else
-- 
1.6.6.265.ga0f40

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCHv2] Make difftool.prompt fall back to mergetool.prompt
       [not found] ` <7vr5pivx70.fsf@alter.siamese.dyndns.org>
@ 2010-01-22 21:24   ` David Aguilar
  2010-01-22 23:31     ` Sebastian Schuberth
  0 siblings, 1 reply; 3+ messages in thread
From: David Aguilar @ 2010-01-22 21:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Sebastian Schuberth, git@vger.kernel.org

On Jan 22, 2010, at 9:58 AM, Junio C Hamano <gitster@pobox.com> wrote:

> Sebastian Schuberth <sschuberth@gmail.com> writes:
>
>> The documentation states that "git-difftool falls back to git- 
>> mergetool
>> config variables when the difftool equivalents have not been  
>> defined".
>> Until now, this was not the case for "difftool.prompt".
>>
>> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
>
> David, does this look ok?  It seems to match the discussion between  
> you I
> saw yesterday, but just checking to make sure (if "yes" please Ack).

Acked-by: David Aguilar <davvid@gmail.com>

I would like to see a testcase to ensure we don't break it in the  
future, though.

Thanks Sebastian, Junio.

Sebastian, I you don't send a test I'll try to send one tonight.


>
> Is it Ok that today I see only this patch not two-patch series on the
> topic (iow, has the other patch been withdrawn)?  I didn't folow the
> discussion very closely.
>
> Thanks.
>
>> ---
>> git-difftool--helper.sh |    3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
>> index 57e8e32..3438aba 100755
>> --- a/git-difftool--helper.sh
>> +++ b/git-difftool--helper.sh
>> @@ -12,7 +12,8 @@ TOOL_MODE=diff
>> # difftool.prompt controls the default prompt/no-prompt behavior
>> # and is overridden with $GIT_DIFFTOOL*_PROMPT.
>> should_prompt () {
>> -    prompt=$(git config --bool difftool.prompt || echo true)
>> +    prompt_merge=$(git config --bool mergetool.prompt || echo true)
>> +    prompt=$(git config --bool difftool.prompt || echo  
>> $prompt_merge)
>>    if test "$prompt" = true; then
>>        test -z "$GIT_DIFFTOOL_NO_PROMPT"
>>    else
>> -- 
>> 1.6.6.265.ga0f40

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv2] Make difftool.prompt fall back to mergetool.prompt
  2010-01-22 21:24   ` David Aguilar
@ 2010-01-22 23:31     ` Sebastian Schuberth
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Schuberth @ 2010-01-22 23:31 UTC (permalink / raw)
  To: David Aguilar; +Cc: Junio C Hamano, git@vger.kernel.org

On Fri, Jan 22, 2010 at 22:24, David Aguilar <davvid@gmail.com> wrote:

> Sebastian, I you don't send a test I'll try to send one tonight.

I'd be glad if you could propose a testcase. Thanks.

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-22 23:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-22 16:36 [PATCHv2] Make difftool.prompt fall back to mergetool.prompt Sebastian Schuberth
     [not found] ` <7vr5pivx70.fsf@alter.siamese.dyndns.org>
2010-01-22 21:24   ` David Aguilar
2010-01-22 23:31     ` Sebastian Schuberth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).