git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv2] Make difftool.prompt fall back to mergetool.prompt

From
David Aguilar <davvid@gmail.com>
Date
Jan 22, 2010, 21:24 UTC
Message-ID
<7B0478B5-CEE2-4207-8268-B0B338F88449@gmail.com>
In-Reply-To
<7vr5pivx70.fsf@alter.siamese.dyndns.org>
On Jan 22, 2010, at 9:58 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> 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.
Show 28 quoted lines
>
> 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
Previous: Sebastian SchuberthNext: Sebastian Schuberth
Message 2 of 3 in “[PATCHv2] Make difftool.prompt fall back to mergetool.prompt”
  1. Sebastian SchuberthJan 22, 2010
  2. David AguilarJan 22, 2010
  3. Sebastian SchuberthJan 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.