{"thread":{"id":"22342","subject":"[PATCHv2] Make difftool.prompt fall back to mergetool.prompt","startedAt":"2010-01-22T16:36:36Z","lastAt":"2010-01-22T23:31:21Z","messageCount":3,"participants":["Sebastian Schuberth","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132405","messageId":"4B59D414.4020507@gmail.com","threadId":"22342","inReplyTo":null,"subject":"[PATCHv2] Make difftool.prompt fall back to mergetool.prompt","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-22T16:36:36Z","receivedAt":"2010-01-22T16:36:36Z","isPatch":false,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"The documentation states that \"git-difftool falls back to git-mergetool\nconfig variables when the difftool equivalents have not been defined\".\nUntil now, this was not the case for \"difftool.prompt\".\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n git-difftool--helper.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-difftool--helper.sh b/git-difftool--helper.sh\nindex 57e8e32..3438aba 100755\n--- a/git-difftool--helper.sh\n+++ b/git-difftool--helper.sh\n@@ -12,7 +12,8 @@ TOOL_MODE=diff\n # difftool.prompt controls the default prompt/no-prompt behavior\n # and is overridden with $GIT_DIFFTOOL*_PROMPT.\n should_prompt () {\n-\tprompt=$(git config --bool difftool.prompt || echo true)\n+\tprompt_merge=$(git config --bool mergetool.prompt || echo true)\n+\tprompt=$(git config --bool difftool.prompt || echo $prompt_merge)\n \tif test \"$prompt\" = true; then\n \t\ttest -z \"$GIT_DIFFTOOL_NO_PROMPT\"\n \telse\n-- \n1.6.6.265.ga0f40\n"},{"id":"132425","messageId":"7B0478B5-CEE2-4207-8268-B0B338F88449@gmail.com","threadId":"22342","inReplyTo":"7vr5pivx70.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCHv2] Make difftool.prompt fall back to mergetool.prompt","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2010-01-22T21:24:13Z","receivedAt":"2010-01-22T21:24:13Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Jan 22, 2010, at 9:58 AM, Junio C Hamano <gitster@pobox.com> wrote:\n\n> Sebastian Schuberth <sschuberth@gmail.com> writes:\n>\n>> The documentation states that \"git-difftool falls back to git- \n>> mergetool\n>> config variables when the difftool equivalents have not been  \n>> defined\".\n>> Until now, this was not the case for \"difftool.prompt\".\n>>\n>> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n>\n> David, does this look ok?  It seems to match the discussion between  \n> you I\n> saw yesterday, but just checking to make sure (if \"yes\" please Ack).\n\nAcked-by: David Aguilar <davvid@gmail.com>\n\nI would like to see a testcase to ensure we don't break it in the  \nfuture, though.\n\nThanks Sebastian, Junio.\n\nSebastian, I you don't send a test I'll try to send one tonight.\n\n\n>\n> Is it Ok that today I see only this patch not two-patch series on the\n> topic (iow, has the other patch been withdrawn)?  I didn't folow the\n> discussion very closely.\n>\n> Thanks.\n>\n>> ---\n>> git-difftool--helper.sh |    3 ++-\n>> 1 files changed, 2 insertions(+), 1 deletions(-)\n>>\n>> diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh\n>> index 57e8e32..3438aba 100755\n>> --- a/git-difftool--helper.sh\n>> +++ b/git-difftool--helper.sh\n>> @@ -12,7 +12,8 @@ TOOL_MODE=diff\n>> # difftool.prompt controls the default prompt/no-prompt behavior\n>> # and is overridden with $GIT_DIFFTOOL*_PROMPT.\n>> should_prompt () {\n>> -    prompt=$(git config --bool difftool.prompt || echo true)\n>> +    prompt_merge=$(git config --bool mergetool.prompt || echo true)\n>> +    prompt=$(git config --bool difftool.prompt || echo  \n>> $prompt_merge)\n>>    if test \"$prompt\" = true; then\n>>        test -z \"$GIT_DIFFTOOL_NO_PROMPT\"\n>>    else\n>> -- \n>> 1.6.6.265.ga0f40\n"},{"id":"132427","messageId":"bdca99241001221531t24afc87cydf080f432cfbc51a@mail.gmail.com","threadId":"22342","inReplyTo":"7B0478B5-CEE2-4207-8268-B0B338F88449@gmail.com","subject":"Re: [PATCHv2] Make difftool.prompt fall back to mergetool.prompt","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-22T23:31:21Z","receivedAt":"2010-01-22T23:31:21Z","isPatch":false,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Fri, Jan 22, 2010 at 22:24, David Aguilar <davvid@gmail.com> wrote:\n\n> Sebastian, I you don't send a test I'll try to send one tonight.\n\nI'd be glad if you could propose a testcase. Thanks.\n\n-- \nSebastian Schuberth\n"}]}