{"thread":{"id":"21780","subject":"[RFH] Mention of 1.7.0 transition plans in Release Notes to 1.6.6","startedAt":"2009-11-28T22:46:24Z","lastAt":"2009-11-29T08:44:26Z","messageCount":7,"participants":["Junio C Hamano","Nanako Shiraishi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128649","messageId":"7vfx7yfetb.fsf@alter.siamese.dyndns.org","threadId":"21780","inReplyTo":null,"subject":"[RFH] Mention of 1.7.0 transition plans in Release Notes to 1.6.6","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-28T22:46:24Z","receivedAt":"2009-11-28T22:46:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I am attaching the first part of the current draft release notes to\nrequest help from the developer community, so that we can avoid a fiasco\nlike we had at 1.6.0 when we switched from \"git-foo\" to \"git foo\".\n\nThe 1.6.0 change was widely advertised but the way it was introduced\nallowed users to _ignore_ the issue until the last minute, and as the\nconsequence of having ignoring the issue, they were _forced_ to scramble\nand adjust once their system administrator decided to install the new\nversion.\n\nI think contributors who pushed for the updated safety valve for \"git\npush\" did a lot better, learning from the bitter 1.6.0 experience, to\nprevent users from ignoring the issue and instead prepare them for smooth\ntransition.  I wanted to make sure all the users who read Release Notes to\nthe upcoming release but otherwise do not follow this list regularly will\nnot be surprised when 1.7.0 happens, and I feel the text needs polishing\nfor that purpose.  We might want to deliver the announcement to a wider\naudience than usual as well, and volunteers to help doing so are very\nwelcomed.\n\nTwo things and a half to note:\n\n - I do not think we have such an anti-procrastination measure for\n   send-email's --[no-]chain-reply-to change.  We might want to have one\n   before 1.6.6 ships; namely, if the code decided to use chain-reply-to\n   behaviour by default because there was no sendemail.chainreplyto (or\n   sendemail.$identity.chainreplyto) configured, nor --no-chain-reply-to\n   or --chain-reply-to given from the command line, we issue a big fat\n   warning just like we warn against unconfigured push.denyCurrentBranch\n   when allowing pushing to a checked-out branch without being told.\n\n - I do not think of a sane way to cover \"diff -b/-w\" changes, as this is\n   a \"bugfix --- but there may be some scripts that have been relying on\n   the bug\", and a configuration option that retains the buggy behaviour\n   does not make much sense.  But I may be mistaken and somebody can come\n   up with an easy patch to allow both behaviour, in which case we should\n   add similar anti-procrastination measure to this change.\n\n - Recent proposal to add \"grep.fulltree\" configuration variable may fall\n   into the same category as sendemail.chainreplyto, as it is not about\n   \"buggy behaviour\" nor \"risky default that can easily hurt users\" but is\n   more about \"there are two competing and equally sane defaults and it is\n   purely an issue of user preference\".  So if we were to decide flip the\n   default in a far future, we may add such anti-procrastination measure\n   there as well (but not before we decide we will flip it someday).\n\n   This last item is obviously outside the scope of 1.7.0, though.\n\n----------------------------------------------------------------\n\nGit v1.6.6 Release Notes\n========================\n\nNotes on behaviour change\n-------------------------\n\n * In this release, \"git fsck\" defaults to \"git fsck --full\" and\n   checks packfiles, and because of this it will take much longer to\n   complete than before.  If you prefer a quicker check only on loose\n   objects (the old default), you can say \"git fsck --no-full\".  This\n   has been supported by 1.5.4 and newer versions of git, so it is\n   safe to write it in your script even if you use slightly older git\n   on some of your machines.\n\nPreparing yourselves for compatibility issues in 1.7.0\n------------------------------------------------------\n\nIn git 1.7.0, which is planned to be the release after 1.6.6, there will\nbe a handful of behaviour changes that will break backward compatibility.\n\nThese changes were discussed long time ago and existing behaviours have\nbeen identified as more problematic to the userbase than keeping them for\nthe sake of backward compatibility.\n\nWhen necessary, transition strategy for existing users has been designed\nnot to force them running around setting configuration variables and\nupdating their scripts in order to keep the traditional behaviour on the\nday their sysadmin decides to install the new version of git.  When we\nswitched from \"git-foo\" to \"git foo\" in 1.6.0, even though the change had\nbeen advertised and the transition guide had been provided for a very long\ntime, the users procrastinated during the entire transtion period, and\nended up panicking on the day their sysadmins updated their git.\n\nFor changes decided to be in 1.7.0, we have been much louder to strongly\ndiscourage such procrastination.  If you have been using recent versions\nof git, you would have already seen warnings issued when you exercised\nfeatures whose behaviour will change, with the instruction on how to keep\nthe existing behaviour if you choose to.  You hopefully should be well\nprepared already.\n\nOf course, we have also given \"this and that will change in 1.7.0; prepare\nyourselves\" warnings in the release notes and announcement messages.\nLet's see how well users will fare this time.\n\n * \"git push\" into a branch that is currently checked out (i.e. pointed by\n   HEAD in a repository that is not bare) will be refused by default.\n\n   Similarly, \"git push $there :$killed\" to delete the branch $killed\n   in a remote repository $there, when $killed branch is the current\n   branch pointed at by its HEAD, will be refused by default.\n\n   Setting the configuration variables receive.denyCurrentBranch and\n   receive.denyDeleteCurrent to 'ignore' in the receiving repository\n   can be used to override these safety features.  Versions of git\n   since 1.6.2 have issued a loud warning when you tried to do them\n   without setting the configuration, so repositories of people who\n   still need to be able to perform such a push should already been\n   future proofed.\n\n   Please refer to:\n\n   http://git.or.cz/gitwiki/GitFaq#non-bare\n   http://thread.gmane.org/gmane.comp.version-control.git/107758/focus=108007\n\n   for more details on the reason why this change is needed and the\n   transition process that already took place so far.\n\n * \"git send-email\" will not make deep threads by default when sending a\n   patch series with more than two messages.  All messages will be sent as\n   a reply to the first message, i.e. cover letter.  It has been possible\n   to configure send-email to do this by setting sendemail.chainreplyto\n   configuration variable to false.  The only thing the new release will\n   do is to change the default when you haven't configured that variable.\n\n * \"git status\" will not be \"git commit --dry-run\".  This change does not\n   affect you if you run the command without pathspec.\n\n   Nobody sane found the current behaviour of \"git status Makefile\" useful\n   nor meaningful, and it confused users.  \"git commit --dry-run\" has been\n   provided as a way to get the current behaviour of this command since\n   1.6.5.\n\n * \"git diff\" traditionally treated various \"ignore whitespace\" options\n   only as a way to filter the patch output.  \"git diff --exit-code -b\"\n   exited with non-zero status even if all changes were about changing the\n   ammount of whitespace and nothing else.  and \"git diff -b\" showed the\n   \"diff --git\" header line for such a change without patch text.\n\n   In 1.7.0, the \"ignore whitespaces\" will affect the semantics of the\n   diff operation itself.  A change that does not affect anything but\n   whitespaces will be reported with zero exit status when run with\n   --exit-code, and there will not be \"diff --git\" header for such a\n   change.\n"},{"id":"128655","messageId":"20091129122448.6117@nanako3.lavabit.com","threadId":"21780","inReplyTo":"7vfx7yfetb.fsf@alter.siamese.dyndns.org","subject":"Re: [RFH] Mention of 1.7.0 transition plans in Release Notes to 1.6.6","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-11-29T03:24:48Z","receivedAt":"2009-11-29T03:24:48Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Subject: prepare send-email for smoother change of --chain-reply-to default\n\nGive a warning message when send-email uses chain-reply-to to thread the\nmessages because of the current default, not because the user explicitly\nasked to, either from the command line or from the configuration.\n\nThis way, by the time 1.7.0 switches the default, everybody will be ready.\n\nSigned-off-by: Nanako Shiraishi <nanako3@lavabit.com>\n---\n Quoting Junio C Hamano <gitster@pobox.com>\n\n >  - I do not think we have such an anti-procrastination measure for\n >    send-email's --[no-]chain-reply-to change.  We might want to have one\n >    before 1.6.6 ships; namely, if the code decided to use chain-reply-to\n >    behaviour by default because there was no sendemail.chainreplyto (or\n >    sendemail.$identity.chainreplyto) configured, nor --no-chain-reply-to\n >    or --chain-reply-to given from the command line, we issue a big fat\n >    warning just like we warn against unconfigured push.denyCurrentBranch\n >    when allowing pushing to a checked-out branch without being told.\n\n Like this?\n\n git-send-email.perl   |   19 +++++++++++++++++--\n t/t9001-send-email.sh |   40 ++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 57 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 4f5da4e..2afed76 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -187,9 +187,11 @@ my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts);\n my ($validate, $confirm);\n my (@suppress_cc);\n \n+my $not_set_by_user = \"true but not set by the user\";\n+\n my %config_bool_settings = (\n     \"thread\" => [\\$thread, 1],\n-    \"chainreplyto\" => [\\$chain_reply_to, 1],\n+    \"chainreplyto\" => [\\$chain_reply_to, $not_set_by_user],\n     \"suppressfrom\" => [\\$suppress_from, undef],\n     \"signedoffbycc\" => [\\$signed_off_by_cc, undef],\n     \"signedoffcc\" => [\\$signed_off_by_cc, undef],      # Deprecated\n@@ -214,6 +216,19 @@ my %config_settings = (\n     \"from\" => \\$sender,\n );\n \n+# Help users prepare for 1.7.0\n+sub chain_reply_to {\n+\tif (defined $chain_reply_to &&\n+\t    $chain_reply_to eq $not_set_by_user) {\n+\t\tprint STDERR\n+\t\t    \"In git 1.7.0, the default will be changed to --no-chain-reply-to\\n\" .\n+\t\t    \"Set sendemail.chainreplyto configuration variable to true if\\n\" .\n+\t\t    \"you want to keep --chain-reply-to as your default.\\n\";\n+\t\t$chain_reply_to = 1;\n+\t}\n+\treturn $chain_reply_to;\n+}\n+\n # Handle Uncouth Termination\n sub signal_handler {\n \n@@ -1157,7 +1172,7 @@ foreach my $t (@files) {\n \n \t# set up for the next message\n \tif ($thread && $message_was_sent &&\n-\t\t($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {\n+\t\t(chain_reply_to() || !defined $reply_to || length($reply_to) == 0)) {\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 84a7f03..4372774 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -769,4 +769,44 @@ test_expect_success 'threading but no chain-reply-to' '\n \tgrep \"In-Reply-To: \" stdout\n '\n \n+test_expect_success 'no warning with an explicit --chain-reply-to' '\n+\tgit send-email \\\n+\t--dry-run \\\n+\t--from=\"Example <nobody@example.com>\" \\\n+\t--to=nobody@example.com \\\n+\t--chain-reply-to \\\n+\toutdir/000?-*.patch 2>errors >out &&\n+\t! grep \"no-chain-reply-to\" errors\n+'\n+\n+test_expect_success 'no warning with an explicit --no-chain-reply-to' '\n+\tgit send-email \\\n+\t--dry-run \\\n+\t--from=\"Example <nobody@example.com>\" \\\n+\t--to=nobody@example.com \\\n+\t--no-chain-reply-to \\\n+\toutdir/000?-*.patch 2>errors >out &&\n+\t! grep \"no-chain-reply-to\" errors\n+'\n+\n+test_expect_success 'no warning with sendemail.chainreplyto = false' '\n+\tgit config sendemail.chainreplyto false &&\n+\tgit send-email \\\n+\t--dry-run \\\n+\t--from=\"Example <nobody@example.com>\" \\\n+\t--to=nobody@example.com \\\n+\toutdir/000?-*.patch 2>errors >out &&\n+\t! grep \"no-chain-reply-to\" errors\n+'\n+\n+test_expect_success 'no warning with sendemail.chainreplyto = true' '\n+\tgit config sendemail.chainreplyto true &&\n+\tgit send-email \\\n+\t--dry-run \\\n+\t--from=\"Example <nobody@example.com>\" \\\n+\t--to=nobody@example.com \\\n+\toutdir/000?-*.patch 2>errors >out &&\n+\t! grep \"no-chain-reply-to\" errors\n+'\n+\n test_done\n\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"128664","messageId":"7vmy25dc9h.fsf@alter.siamese.dyndns.org","threadId":"21780","inReplyTo":"7vfx7yfetb.fsf@alter.siamese.dyndns.org","subject":"Re: [RFH] Mention of 1.7.0 transition plans in Release Notes to 1.6.6","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-29T07:24:26Z","receivedAt":"2009-11-29T07:24:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>  - I do not think of a sane way to cover \"diff -b/-w\" changes, as this is\n>    a \"bugfix --- but there may be some scripts that have been relying on\n>    the bug\", and a configuration option that retains the buggy behaviour\n>    does not make much sense.  But I may be mistaken and somebody can come\n>    up with an easy patch to allow both behaviour, in which case we should\n>    add similar anti-procrastination measure to this change.\n\nThe patch to enable/disable this feature would look like the attached,\nwhich doesn't look too bad.  This apply to a merge between two topics:\n\n    jc/1.7.0-diff-whitespace-only-status (97bf2a0)\n    gb/1.7.0-diff-whitespace-only-output (3e97c7c)\n\nAn anti-procrastination measure must be done in at least two, but probably\nin three steps on top of this patch:\n\n #1. Flip the default in this patch back to 1, as the traditional\n     behaviour is to treat ignore-whitespace options as purely affecting\n     output of patch text, not affecting status nor the header;\n\n #2. Add extra logic to detect if a particular invocation may trigger a\n     different behaviour once the default is changed to 0, and issue an\n     warning if there is no configuration explicitly set;\n\n #3. Flip the default to 0, perhaps still keeping the warning when there\n     is no configuration.\n\nMake a major release after the second step is done, and wait for at least\none but preferrably two releases, and then ship the result of the third\nstep in the \"flag day\" release.  In a much later version we would remove\nthe \"no configuration warning\".\n\nDo we need an anti-procrastination measure for this?  If so, I think we\nprobably need to postpone the \"diff\" semantics changes after 1.7.0, as I\nam not very confident that we can solidly finish the second step before\nthe 1.6.6 final.\n\nAlso, I am not very keen on having this configuration, as its only purpose\nis to ask for a broken semantics from \"diff\", even though it has been the\ntraditional behaviour for the past four years.\n\nComments?\n\n---\n diff.c |   15 +++++++++++----\n 1 files changed, 11 insertions(+), 4 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex da90e6e..6e7c47c 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -29,6 +29,7 @@ static const char *diff_word_regex_cfg;\n static const char *external_diff_cmd_cfg;\n int diff_auto_refresh_index = 1;\n static int diff_mnemonic_prefix;\n+static int diff_b_w_output_only;\n \n static char diff_colors[][COLOR_MAXLEN] = {\n \tGIT_COLOR_RESET,\n@@ -133,6 +134,11 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)\n \t\treturn 0;\n \t}\n \n+\tif (!strcmp(var, \"diff.bwoutputonly\")) {\n+\t\tdiff_b_w_output_only = git_config_bool(var, value);\n+\t\treturn 0;\n+\t}\n+\n \treturn git_color_default_config(var, value, cb);\n }\n \n@@ -1668,7 +1674,7 @@ static void builtin_diff(const char *name_a,\n \t\tstruct emit_callback ecbdata;\n \t\tconst struct userdiff_funcname *pe;\n \n-\t\tif (!DIFF_XDL_TST(o, WHITESPACE_FLAGS)) {\n+\t\tif (!DIFF_XDL_TST(o, WHITESPACE_FLAGS) || diff_b_w_output_only) {\n \t\t\tfprintf(o->file, \"%s\", header.buf);\n \t\t\tstrbuf_reset(&header);\n \t\t}\n@@ -2537,9 +2543,10 @@ int diff_setup_done(struct diff_options *options)\n \t * inside contents.\n \t */\n \n-\tif (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||\n-\t    DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||\n-\t    DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL))\n+\tif (!diff_b_w_output_only &&\n+\t    (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||\n+\t     DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||\n+\t     DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL)))\n \t\tDIFF_OPT_SET(options, DIFF_FROM_CONTENTS);\n \telse\n \t\tDIFF_OPT_CLR(options, DIFF_FROM_CONTENTS);\n-- \n1.6.6.rc0.61.g41d5b.dirty\n"},{"id":"128665","messageId":"7viqctdc7q.fsf_-_@alter.siamese.dyndns.org","threadId":"21780","inReplyTo":"7vmy25dc9h.fsf@alter.siamese.dyndns.org","subject":"[PATCH 1/3] diff: flip the default diff.bwoutputonly to true","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-29T07:25:29Z","receivedAt":"2009-11-29T07:25:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This switches the default behaviour of \"diff -w/-b\" back to the\ntraditional \"ignore whitespace affects only output of patch text, not\nstatus nor diff header\", and allows the planned new semantics to be asked\nin advance by setting diff.bwoutputonly configuration to false.\n\nAlso a loud warning is issued when the configuration is not set at all,\nso that we can flip the default later more smoothly.\n\nUpdate tests to check cases where the configuration is set to true, false\nand not set at all; make sure the warning is issued when and only when\nnecessary.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n diff.c                       |   23 ++++++++++---\n t/t4015-diff-whitespace.sh   |   70 +++++++++++++++++++++++++++++++++---------\n t/t4040-whitespace-status.sh |   48 ++++++++++++++++++----------\n 3 files changed, 103 insertions(+), 38 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 6e7c47c..fb93a22 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -29,7 +29,8 @@ static const char *diff_word_regex_cfg;\n static const char *external_diff_cmd_cfg;\n int diff_auto_refresh_index = 1;\n static int diff_mnemonic_prefix;\n-static int diff_b_w_output_only;\n+static int diff_b_w_output_only = 1;\n+static int diff_b_w_output_only_given;\n \n static char diff_colors[][COLOR_MAXLEN] = {\n \tGIT_COLOR_RESET,\n@@ -135,6 +136,7 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)\n \t}\n \n \tif (!strcmp(var, \"diff.bwoutputonly\")) {\n+\t\tdiff_b_w_output_only_given = 1;\n \t\tdiff_b_w_output_only = git_config_bool(var, value);\n \t\treturn 0;\n \t}\n@@ -2521,9 +2523,15 @@ void diff_setup(struct diff_options *options)\n \t}\n }\n \n+static const char *bw_option_warning =\n+\t\"ignore-whitespace options will stop showing diff headers in later\\n\"\n+\t\"versions of git; set diff.bwoutputonly to true to keep the old\\n\"\n+\t\"behaviour, or set.bwoutputonly to false to squelch this message.\\n\";\n+\n int diff_setup_done(struct diff_options *options)\n {\n \tint count = 0;\n+\tint bw_options;\n \n \tif (options->output_format & DIFF_FORMAT_NAME)\n \t\tcount++;\n@@ -2542,11 +2550,14 @@ int diff_setup_done(struct diff_options *options)\n \t * --ignore-whitespace* options force us to look\n \t * inside contents.\n \t */\n-\n-\tif (!diff_b_w_output_only &&\n-\t    (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||\n-\t     DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||\n-\t     DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL)))\n+\tbw_options = (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||\n+\t\t      DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||\n+\t\t      DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL));\n+\tif (!diff_b_w_output_only_given && bw_options && bw_option_warning) {\n+\t\twarning(\"%s\", bw_option_warning);\n+\t\tbw_option_warning = NULL;\n+\t}\n+\tif (!diff_b_w_output_only && bw_options)\n \t\tDIFF_OPT_SET(options, DIFF_FROM_CONTENTS);\n \telse\n \t\tDIFF_OPT_CLR(options, DIFF_FROM_CONTENTS);\ndiff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh\nindex 90f3342..310421b 100755\n--- a/t/t4015-diff-whitespace.sh\n+++ b/t/t4015-diff-whitespace.sh\n@@ -92,16 +92,30 @@ EOF\n git diff > out\n test_expect_success 'another test, without options' 'test_cmp expect out'\n \n-cat << EOF > expect\n+test_w_b () {\n+\tnote=$1\n+\tfor o in \"-w\" \"-w -b\" \"-w --ignore-space-at-eol\" \"-w -b --ignore-space-at-eol\"\n+\tdo\n+\t\ttest_expect_success \"with $o ($note)\" '\n+\t\t\tgit diff $o >actual &&\n+\t\t\ttest_cmp expect actual\n+\t\t'\n+\tdone\n+}\n+\n+git config diff.bwoutputonly false\n+> expect\n+test_w_b \"bwoutputonly=false\"\n+\n+git config diff.bwoutputonly true\n+cat <<EOF >expect\n+diff --git a/x b/x\n+index d99af23..8b32fb5 100644\n EOF\n-git diff -w > out\n-test_expect_success 'another test, with -w' 'test_cmp expect out'\n-git diff -w -b > out\n-test_expect_success 'another test, with -w -b' 'test_cmp expect out'\n-git diff -w --ignore-space-at-eol > out\n-test_expect_success 'another test, with -w --ignore-space-at-eol' 'test_cmp expect out'\n-git diff -w -b --ignore-space-at-eol > out\n-test_expect_success 'another test, with -w -b --ignore-space-at-eol' 'test_cmp expect out'\n+test_w_b \"bwoutputonly=true\"\n+\n+git config --unset diff.bwoutputonly\n+test_w_b \"bwoutputonly unset\"\n \n tr 'Q' '\\015' << EOF > expect\n diff --git a/x b/x\n@@ -384,20 +398,47 @@ test_expect_success 'checkdiff allows new blank lines' '\n \tgit diff --check\n '\n \n-cat <<EOF >expect\n-EOF\n-test_expect_success 'whitespace-only changes not reported' '\n+test_expect_success 'whitespace-only changes shown' '\n+\tgit config --unset diff.bwoutputonly\n \tgit reset --hard &&\n \techo >x \"hello world\" &&\n \tgit add x &&\n \tgit commit -m \"hello 1\" &&\n \techo >x \"hello  world\" &&\n \tgit diff -b >actual &&\n-\ttest_cmp expect actual\n+\ttest 2 = $(wc -l <actual)\n '\n \n-test_expect_success 'combined diff with autocrlf conversion' '\n+test_expect_success 'whitespace-only changes shown with diff.bwoutputonly' '\n+\tgit config diff.bwoutputonly true &&\n+\tgit diff -b >actual &&\n+\ttest 2 = $(wc -l <actual)\n+'\n+\n+test_expect_success 'whitespace-only changes hidden with !diff.bwoutputonly' '\n+\tgit config diff.bwoutputonly false &&\n+\tgit diff -b >actual &&\n+\t! test -s actual\n+'\n+\n+test_expect_success 'no warning with diff.bwoutputonly given' '\n+\tgit diff -b 2>errors &&\n+\t! grep warn errors\n+'\n \n+test_expect_success 'no warning without diff.bwoutputonly' '\n+\tgit config --unset diff.bwoutputonly\n+\tgit diff -p 2>errors &&\n+\t! grep \"stop showing\" errors\n+'\n+\n+test_expect_success 'warning without diff.bwoutputonly' '\n+\tgit config --unset diff.bwoutputonly\n+\tgit diff -b 2>errors &&\n+\tgrep \"stop showing\" errors\n+'\n+\n+test_expect_success 'combined diff with autocrlf conversion' '\n \tgit reset --hard &&\n \techo >x hello &&\n \tgit commit -m \"one side\" x &&\n@@ -409,7 +450,6 @@ test_expect_success 'combined diff with autocrlf conversion' '\n \n \tgit diff | sed -e \"1,/^@@@/d\" >actual &&\n \t! grep \"^-\" actual\n-\n '\n \n test_done\ndiff --git a/t/t4040-whitespace-status.sh b/t/t4040-whitespace-status.sh\nindex a30b03b..95a93f7 100755\n--- a/t/t4040-whitespace-status.sh\n+++ b/t/t4040-whitespace-status.sh\n@@ -19,45 +19,59 @@ test_expect_success setup '\n \tgit add a/d\n '\n \n-test_expect_success 'diff-tree --exit-code' '\n+test_once () {\n+\tnote=$1 tmf=$2\n+\n+test_expect_success \"diff-tree --exit-code ($note)\" '\n \ttest_must_fail git diff --exit-code HEAD^ HEAD &&\n \ttest_must_fail git diff-tree --exit-code HEAD^ HEAD\n '\n \n-test_expect_success 'diff-tree -b --exit-code' '\n-\tgit diff -b --exit-code HEAD^ HEAD &&\n-\tgit diff-tree -b -p --exit-code HEAD^ HEAD &&\n-\tgit diff-tree -b --exit-code HEAD^ HEAD\n+test_expect_success \"diff-tree -b --exit-code ($note)\" '\n+\t$tmf git diff -b --exit-code HEAD^ HEAD &&\n+\t$tmf git diff-tree -b -p --exit-code HEAD^ HEAD &&\n+\t$tmf git diff-tree -b --exit-code HEAD^ HEAD\n '\n \n-test_expect_success 'diff-index --cached --exit-code' '\n+test_expect_success \"diff-index --cached --exit-code ($note)\" '\n \ttest_must_fail git diff --cached --exit-code HEAD &&\n \ttest_must_fail git diff-index --cached --exit-code HEAD\n '\n \n-test_expect_success 'diff-index -b -p --cached --exit-code' '\n-\tgit diff -b --cached --exit-code HEAD &&\n-\tgit diff-index -b -p --cached --exit-code HEAD\n+test_expect_success \"diff-index -b -p --cached --exit-code ($note)\" '\n+\t$tmf git diff -b --cached --exit-code HEAD &&\n+\t$tmf git diff-index -b -p --cached --exit-code HEAD\n '\n \n-test_expect_success 'diff-index --exit-code' '\n+test_expect_success \"diff-index --exit-code ($note)\" '\n \ttest_must_fail git diff --exit-code HEAD &&\n \ttest_must_fail git diff-index --exit-code HEAD\n '\n \n-test_expect_success 'diff-index -b -p --exit-code' '\n-\tgit diff -b --exit-code HEAD &&\n-\tgit diff-index -b -p --exit-code HEAD\n+test_expect_success \"diff-index -b -p --exit-code ($note)\" '\n+\t$tmf git diff -b --exit-code HEAD &&\n+\t$tmf git diff-index -b -p --exit-code HEAD\n '\n \n-test_expect_success 'diff-files --exit-code' '\n+test_expect_success \"diff-files --exit-code ($note)\" '\n \ttest_must_fail git diff --exit-code &&\n \ttest_must_fail git diff-files --exit-code\n '\n \n-test_expect_success 'diff-files -b -p --exit-code' '\n-\tgit diff -b --exit-code &&\n-\tgit diff-files -b -p --exit-code\n+test_expect_success \"diff-files -b -p --exit-code ($note)\" '\n+\t$tmf git diff -b --exit-code &&\n+\t$tmf git diff-files -b -p --exit-code\n '\n \n+}\n+\n+git config diff.bwoutputonly true\n+test_once \"bwoutputonly=true\" \"test_must_fail\"\n+\n+git config diff.bwoutputonly false\n+test_once \"bwoutputonly=false\" \"\"\n+\n+git config --unset diff.bwoutputonly\n+test_once \"bwoutputonly unset\" \"test_must_fail\"\n+\n test_done\n-- \n1.6.6.rc0.61.g41d5b.dirty\n"},{"id":"128666","messageId":"7veinhdc71.fsf_-_@alter.siamese.dyndns.org","threadId":"21780","inReplyTo":"7vmy25dc9h.fsf@alter.siamese.dyndns.org","subject":"[PATCH 2/3] diff: flip the diff.bwoutputonly default to false","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-29T07:25:54Z","receivedAt":"2009-11-29T07:25:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This finally corrects the broken \"ignore whitespace options only\naffect patch output and never affects status nor header output\",\nas we have been planning for 1.7.0\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n diff.c                       |    2 +-\n t/t4015-diff-whitespace.sh   |    5 +++--\n t/t4040-whitespace-status.sh |    2 +-\n 3 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex fb93a22..df67f18 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -29,7 +29,7 @@ static const char *diff_word_regex_cfg;\n static const char *external_diff_cmd_cfg;\n int diff_auto_refresh_index = 1;\n static int diff_mnemonic_prefix;\n-static int diff_b_w_output_only = 1;\n+static int diff_b_w_output_only;\n static int diff_b_w_output_only_given;\n \n static char diff_colors[][COLOR_MAXLEN] = {\ndiff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh\nindex 310421b..8ca81e8 100755\n--- a/t/t4015-diff-whitespace.sh\n+++ b/t/t4015-diff-whitespace.sh\n@@ -114,6 +114,7 @@ index d99af23..8b32fb5 100644\n EOF\n test_w_b \"bwoutputonly=true\"\n \n+>expect\n git config --unset diff.bwoutputonly\n test_w_b \"bwoutputonly unset\"\n \n@@ -398,7 +399,7 @@ test_expect_success 'checkdiff allows new blank lines' '\n \tgit diff --check\n '\n \n-test_expect_success 'whitespace-only changes shown' '\n+test_expect_success 'whitespace-only changes hidden' '\n \tgit config --unset diff.bwoutputonly\n \tgit reset --hard &&\n \techo >x \"hello world\" &&\n@@ -406,7 +407,7 @@ test_expect_success 'whitespace-only changes shown' '\n \tgit commit -m \"hello 1\" &&\n \techo >x \"hello  world\" &&\n \tgit diff -b >actual &&\n-\ttest 2 = $(wc -l <actual)\n+\t! test -s actual\n '\n \n test_expect_success 'whitespace-only changes shown with diff.bwoutputonly' '\ndiff --git a/t/t4040-whitespace-status.sh b/t/t4040-whitespace-status.sh\nindex 95a93f7..57db3cc 100755\n--- a/t/t4040-whitespace-status.sh\n+++ b/t/t4040-whitespace-status.sh\n@@ -72,6 +72,6 @@ git config diff.bwoutputonly false\n test_once \"bwoutputonly=false\" \"\"\n \n git config --unset diff.bwoutputonly\n-test_once \"bwoutputonly unset\" \"test_must_fail\"\n+test_once \"bwoutputonly unset\" \"\"\n \n test_done\n-- \n1.6.6.rc0.61.g41d5b.dirty\n"},{"id":"128667","messageId":"7vaay5dc6d.fsf_-_@alter.siamese.dyndns.org","threadId":"21780","inReplyTo":"7vmy25dc9h.fsf@alter.siamese.dyndns.org","subject":"[PATCH 3/3] diff: disable diff.bwoutputonly warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-29T07:26:18Z","receivedAt":"2009-11-29T07:26:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"After 1.7.0 (or whatever version) ships and everybody expects the new\nsemantics from \"diff\", we can squelch the warning.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n diff.c                     |   11 -----------\n t/t4015-diff-whitespace.sh |    4 ++--\n 2 files changed, 2 insertions(+), 13 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex df67f18..ba1f482 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -30,7 +30,6 @@ static const char *external_diff_cmd_cfg;\n int diff_auto_refresh_index = 1;\n static int diff_mnemonic_prefix;\n static int diff_b_w_output_only;\n-static int diff_b_w_output_only_given;\n \n static char diff_colors[][COLOR_MAXLEN] = {\n \tGIT_COLOR_RESET,\n@@ -136,7 +135,6 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)\n \t}\n \n \tif (!strcmp(var, \"diff.bwoutputonly\")) {\n-\t\tdiff_b_w_output_only_given = 1;\n \t\tdiff_b_w_output_only = git_config_bool(var, value);\n \t\treturn 0;\n \t}\n@@ -2523,11 +2521,6 @@ void diff_setup(struct diff_options *options)\n \t}\n }\n \n-static const char *bw_option_warning =\n-\t\"ignore-whitespace options will stop showing diff headers in later\\n\"\n-\t\"versions of git; set diff.bwoutputonly to true to keep the old\\n\"\n-\t\"behaviour, or set.bwoutputonly to false to squelch this message.\\n\";\n-\n int diff_setup_done(struct diff_options *options)\n {\n \tint count = 0;\n@@ -2553,10 +2546,6 @@ int diff_setup_done(struct diff_options *options)\n \tbw_options = (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||\n \t\t      DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||\n \t\t      DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL));\n-\tif (!diff_b_w_output_only_given && bw_options && bw_option_warning) {\n-\t\twarning(\"%s\", bw_option_warning);\n-\t\tbw_option_warning = NULL;\n-\t}\n \tif (!diff_b_w_output_only && bw_options)\n \t\tDIFF_OPT_SET(options, DIFF_FROM_CONTENTS);\n \telse\ndiff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh\nindex 8ca81e8..0964ea2 100755\n--- a/t/t4015-diff-whitespace.sh\n+++ b/t/t4015-diff-whitespace.sh\n@@ -433,10 +433,10 @@ test_expect_success 'no warning without diff.bwoutputonly' '\n \t! grep \"stop showing\" errors\n '\n \n-test_expect_success 'warning without diff.bwoutputonly' '\n+test_expect_success 'no warning anymore' '\n \tgit config --unset diff.bwoutputonly\n \tgit diff -b 2>errors &&\n-\tgrep \"stop showing\" errors\n+\t! grep \"stop showing\" errors\n '\n \n test_expect_success 'combined diff with autocrlf conversion' '\n-- \n1.6.6.rc0.61.g41d5b.dirty\n"},{"id":"128671","messageId":"7v1vjhd8k5.fsf@alter.siamese.dyndns.org","threadId":"21780","inReplyTo":"20091129122448.6117@nanako3.lavabit.com","subject":"Re: [RFH] Mention of 1.7.0 transition plans in Release Notes to 1.6.6","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-29T08:44:26Z","receivedAt":"2009-11-29T08:44:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n> Subject: prepare send-email for smoother change of --chain-reply-to default\n>\n> Give a warning message when send-email uses chain-reply-to to thread the\n> messages because of the current default, not because the user explicitly\n> asked to, either from the command line or from the configuration.\n>\n> This way, by the time 1.7.0 switches the default, everybody will be ready.\n>\n> Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>\n> ---\n\nLooks good.\n"}]}