{"thread":{"id":"22306","subject":"[PATCH 2/2] Make difftool.prompt fall back to mergetool.prompt","startedAt":"2010-01-20T15:30:58Z","lastAt":"2010-01-20T16:10:58Z","messageCount":2,"participants":["Sebastian Schuberth"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"132197","messageId":"4B5721B2.5050703@gmail.com","threadId":"22306","inReplyTo":null,"subject":"[PATCH 2/2] Make difftool.prompt fall back to mergetool.prompt","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-20T15:30:58Z","receivedAt":"2010-01-20T15:30:58Z","isPatch":true,"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 |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/git-difftool--helper.sh b/git-difftool--helper.sh\nindex 57e8e32..a7185b2 100755\n--- a/git-difftool--helper.sh\n+++ b/git-difftool--helper.sh\n@@ -11,8 +11,9 @@ TOOL_MODE=diff\n \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+should_prompt_diff () {\n+\tlocal prompt_merge=$(should_prompt_merge && echo true || echo false)\n+\tlocal prompt=$(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@@ -33,7 +34,7 @@ launch_merge_tool () {\n \n \t# $LOCAL and $REMOTE are temporary files so prompt\n \t# the user with the real $MERGED name before launching $merge_tool.\n-\tif should_prompt; then\n+\tif should_prompt_diff; then\n \t\tprintf \"\\nViewing: '$MERGED'\\n\"\n \t\tprintf \"Hit return to launch '%s': \" \"$merge_tool\"\n \t\tread ans\n-- \n1.6.5.1.1373.g71d1\n"},{"id":"132200","messageId":"4B572B12.50907@gmail.com","threadId":"22306","inReplyTo":"4B5721B2.5050703@gmail.com","subject":"Re: [PATCH 2/2] Make difftool.prompt fall back to mergetool.prompt","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-20T16:10:58Z","receivedAt":"2010-01-20T16:10:58Z","isPatch":true,"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 |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/git-difftool--helper.sh b/git-difftool--helper.sh\nindex 57e8e32..1c1fad4 100755\n--- a/git-difftool--helper.sh\n+++ b/git-difftool--helper.sh\n@@ -11,8 +11,9 @@ TOOL_MODE=diff\n \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+should_prompt_diff () {\n+\tprompt_merge=$(should_prompt_merge && echo true || echo false)\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@@ -33,7 +34,7 @@ launch_merge_tool () {\n \n \t# $LOCAL and $REMOTE are temporary files so prompt\n \t# the user with the real $MERGED name before launching $merge_tool.\n-\tif should_prompt; then\n+\tif should_prompt_diff; then\n \t\tprintf \"\\nViewing: '$MERGED'\\n\"\n \t\tprintf \"Hit return to launch '%s': \" \"$merge_tool\"\n \t\tread ans\n-- \n1.6.6.266.g55d982.dirty\n"}]}