{"thread":{"id":"36939","subject":"[PATCH v6 2/4] commit test: Use write_script","startedAt":"2014-06-17T19:38:56Z","lastAt":"2015-03-02T19:02:33Z","messageCount":12,"participants":["Caleb Thompson","Jeff King","Junio C Hamano","Torstein Hegge"],"isPatch":true,"patchVersion":6,"patchTotal":4},"messages":[{"id":"244476","messageId":"cover.1403033723.git.caleb@calebthompson.io","threadId":"36939","inReplyTo":null,"subject":"[PATCH v6 0/4] commit: Add commit.verbose configuration","fromName":"Caleb Thompson","fromEmail":"caleb@calebthompson.io","sentAt":"2014-06-17T19:38:56Z","receivedAt":"2014-06-17T19:38:56Z","isPatch":true,"sender":{"key":"caleb@calebthompson.io","avatar":"https://gravatar.com/avatar/0440c826b3dfa9dd7f768e4b661935a3a2584612a2fcd261f6914ced0457ab4d?d=mp&s=160"},"body":"This patch allows people to set commit.verbose to implicitly send\n--verbose to git-commit.\n\nIt introduces several cleanup patches to t/t7505-commit-verbose.sh to\nbring it closer to the current state of the tests as they have been\nexplained to me, then adds the verbose config and --no-verbose flag.\n\nSince the last version of this patch\n(http://thread.gmane.org/gmane.comp.version-control.git/251486), there\nhave been a couple of commit message clarifications and the body of the\ncheck-for-no-diff script in the last patch was changed to simply negate\ncheck-for-diff.\n\nCaleb Thompson\n\n------------------------------------------------------\n\n\nCaleb Thompson (4):\n  commit test: Use test_config instead of git-config\n  commit test: Use write_script\n  commit test: test_set_editor in each test\n  commit: Add commit.verbose configuration\n\n Documentation/config.txt               |  5 +++\n Documentation/git-commit.txt           |  8 ++++-\n builtin/commit.c                       |  4 +++\n contrib/completion/git-completion.bash |  1 +\n t/t7507-commit-verbose.sh              | 64 +++++++++++++++++++++++++---------\n 5 files changed, 64 insertions(+), 18 deletions(-)\n\n--\n2.0.0\n"},{"id":"244474","messageId":"a7aa2efcb6a2beba973c389f5c7afbce79ec9747.1403033723.git.caleb@calebthompson.io","threadId":"36939","inReplyTo":"cover.1403033723.git.caleb@calebthompson.io","subject":"[PATCH v6 1/4] commit test: Use test_config instead of git-config","fromName":"Caleb Thompson","fromEmail":"caleb@calebthompson.io","sentAt":"2014-06-17T19:38:57Z","receivedAt":"2014-06-17T19:38:57Z","isPatch":true,"sender":{"key":"caleb@calebthompson.io","avatar":"https://gravatar.com/avatar/0440c826b3dfa9dd7f768e4b661935a3a2584612a2fcd261f6914ced0457ab4d?d=mp&s=160"},"body":"Some of the tests in t/t7507-commit-verbose.sh were still using\ngit-config to set configuration. Change them to use the test_config\nhelper.\n\nSigned-off-by: Caleb Thompson <caleb@calebthompson.io>\nReviewed-by: Jeremiah Mahler <jmmahler@gmail.com>\n---\n t/t7507-commit-verbose.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\nindex 2ddf28c..6d778ed 100755\n--- a/t/t7507-commit-verbose.sh\n+++ b/t/t7507-commit-verbose.sh\n@@ -43,7 +43,7 @@ test_expect_success 'verbose diff is stripped out' '\n '\n \n test_expect_success 'verbose diff is stripped out (mnemonicprefix)' '\n-\tgit config diff.mnemonicprefix true &&\n+\ttest_config diff.mnemonicprefix true &&\n \tgit commit --amend -v &&\n \tcheck_message message\n '\n@@ -71,7 +71,7 @@ test_expect_success 'diff in message is retained with -v' '\n '\n \n test_expect_success 'submodule log is stripped out too with -v' '\n-\tgit config diff.submodule log &&\n+\ttest_config diff.submodule log &&\n \tgit submodule add ./. sub &&\n \tgit commit -m \"sub added\" &&\n \t(\n-- \n2.0.0\n"},{"id":"244473","messageId":"fa7260f688bccac09138c8ef5ef1982cee0f0dde.1403033723.git.caleb@calebthompson.io","threadId":"36939","inReplyTo":"cover.1403033723.git.caleb@calebthompson.io","subject":"[PATCH v6 2/4] commit test: Use write_script","fromName":"Caleb Thompson","fromEmail":"caleb@calebthompson.io","sentAt":"2014-06-17T19:38:58Z","receivedAt":"2014-06-17T19:38:58Z","isPatch":true,"sender":{"key":"caleb@calebthompson.io","avatar":"https://gravatar.com/avatar/0440c826b3dfa9dd7f768e4b661935a3a2584612a2fcd261f6914ced0457ab4d?d=mp&s=160"},"body":"Use write_script from t/test-lib-functions.sh instead of cat, shebang,\nand chmod. This aids in readability for creating the script by using the\nnamed function and allows us to turn off interpolation in the heredoc of\nthe script body to avoid extra escaping, since $SHELL_PATH is handled\nfor us.\n\nSigned-off-by: Caleb Thompson <caleb@calebthompson.io>\nReviewed-by: Jeremiah Mahler <jmmahler@gmail.com>\n---\n t/t7507-commit-verbose.sh | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\nindex 6d778ed..db09107 100755\n--- a/t/t7507-commit-verbose.sh\n+++ b/t/t7507-commit-verbose.sh\n@@ -3,11 +3,9 @@\n test_description='verbose commit template'\n . ./test-lib.sh\n \n-cat >check-for-diff <<EOF\n-#!$SHELL_PATH\n-exec grep '^diff --git' \"\\$1\"\n+write_script check-for-diff <<-'EOF'\n+\texec grep '^diff --git' \"$1\"\n EOF\n-chmod +x check-for-diff\n test_set_editor \"$PWD/check-for-diff\"\n \n cat >message <<'EOF'\n-- \n2.0.0\n"},{"id":"244475","messageId":"41484002d48514cc6eefc1bebbf6fea8d0f93a40.1403033723.git.caleb@calebthompson.io","threadId":"36939","inReplyTo":"cover.1403033723.git.caleb@calebthompson.io","subject":"[PATCH v6 3/4] commit test: test_set_editor in each test","fromName":"Caleb Thompson","fromEmail":"caleb@calebthompson.io","sentAt":"2014-06-17T19:38:59Z","receivedAt":"2014-06-17T19:38:59Z","isPatch":true,"sender":{"key":"caleb@calebthompson.io","avatar":"https://gravatar.com/avatar/0440c826b3dfa9dd7f768e4b661935a3a2584612a2fcd261f6914ced0457ab4d?d=mp&s=160"},"body":"t/t7507-commit-verbose.sh was using a global test_set_editor call to\nbuild its environment. The $EDITOR being used was not necessary for\nall tests, and was in fact circumvented using subshells in some\ncases.\n\nTo improve robustness against global state changes and avoid the use of\nsubshells to temporarily switch the editor as some were with\nGIT_EDITOR=cat, set the editor explicitly wherever it will be important.\n\nSpecifically, in tests that need to check for the presence of a diff in the\neditor, make calls to set_test_editor to set $EDITOR to check-for-diff\nrather than relying on that editor being configured globally. This also\nhelps readers grok the tests as the setup is closer to the verification.\n\nSigned-off-by: Caleb Thompson <caleb@calebthompson.io>\nReviewed-by: Jeremiah Mahler <jmmahler@gmail.com>\n---\n t/t7507-commit-verbose.sh | 18 +++++++-----------\n 1 file changed, 7 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\nindex db09107..35a4d06 100755\n--- a/t/t7507-commit-verbose.sh\n+++ b/t/t7507-commit-verbose.sh\n@@ -6,7 +6,6 @@ test_description='verbose commit template'\n write_script check-for-diff <<-'EOF'\n \texec grep '^diff --git' \"$1\"\n EOF\n-test_set_editor \"$PWD/check-for-diff\"\n \n cat >message <<'EOF'\n subject\n@@ -21,6 +20,7 @@ test_expect_success 'setup' '\n '\n \n test_expect_success 'initial commit shows verbose diff' '\n+\ttest_set_editor \"$PWD/check-for-diff\" &&\n \tgit commit --amend -v\n '\n \n@@ -36,11 +36,13 @@ check_message() {\n }\n \n test_expect_success 'verbose diff is stripped out' '\n+\ttest_set_editor \"$PWD/check-for-diff\" &&\n \tgit commit --amend -v &&\n \tcheck_message message\n '\n \n test_expect_success 'verbose diff is stripped out (mnemonicprefix)' '\n+\ttest_set_editor \"$PWD/check-for-diff\" &&\n \ttest_config diff.mnemonicprefix true &&\n \tgit commit --amend -v &&\n \tcheck_message message\n@@ -77,20 +79,14 @@ test_expect_success 'submodule log is stripped out too with -v' '\n \t\techo \"more\" >>file &&\n \t\tgit commit -a -m \"submodule commit\"\n \t) &&\n-\t(\n-\t\tGIT_EDITOR=cat &&\n-\t\texport GIT_EDITOR &&\n-\t\ttest_must_fail git commit -a -v 2>err\n-\t) &&\n+\ttest_set_editor cat &&\n+\ttest_must_fail git commit -a -v 2>err &&\n \ttest_i18ngrep \"Aborting commit due to empty commit message.\" err\n '\n \n test_expect_success 'verbose diff is stripped out with set core.commentChar' '\n-\t(\n-\t\tGIT_EDITOR=cat &&\n-\t\texport GIT_EDITOR &&\n-\t\ttest_must_fail git -c core.commentchar=\";\" commit -a -v 2>err\n-\t) &&\n+\ttest_set_editor cat &&\n+\ttest_must_fail git -c core.commentchar=\";\" commit -a -v 2>err &&\n \ttest_i18ngrep \"Aborting commit due to empty commit message.\" err\n '\n \n-- \n2.0.0\n"},{"id":"244477","messageId":"2a0ed28d8ef50ce432c7680c1f01eb0f52891134.1403033723.git.caleb@calebthompson.io","threadId":"36939","inReplyTo":"cover.1403033723.git.caleb@calebthompson.io","subject":"[PATCH v6 4/4] commit: Add commit.verbose configuration","fromName":"Caleb Thompson","fromEmail":"caleb@calebthompson.io","sentAt":"2014-06-17T19:39:00Z","receivedAt":"2014-06-17T19:39:00Z","isPatch":true,"sender":{"key":"caleb@calebthompson.io","avatar":"https://gravatar.com/avatar/0440c826b3dfa9dd7f768e4b661935a3a2584612a2fcd261f6914ced0457ab4d?d=mp&s=160"},"body":"Add a new configuration variable commit.verbose to implicitly pass\n--verbose to git-commit. Ensure that --no-verbose to git-commit\nnegates that setting.\n\nSigned-off-by: Caleb Thompson <caleb@calebthompson.io>\n---\n Documentation/config.txt               |  5 +++++\n Documentation/git-commit.txt           |  8 +++++++-\n builtin/commit.c                       |  4 ++++\n contrib/completion/git-completion.bash |  1 +\n t/t7507-commit-verbose.sh              | 36 ++++++++++++++++++++++++++++++++++\n 5 files changed, 53 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 9f467d3..85ef016 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1017,6 +1017,11 @@ commit.template::\n \t\"`~/`\" is expanded to the value of `$HOME` and \"`~user/`\" to the\n \tspecified user's home directory.\n \n+commit.verbose::\n+\tA boolean to enable/disable inclusion of diff information in the\n+\tcommit message template when using an editor to prepare the commit\n+\tmessage.  Defaults to false.\n+\n credential.helper::\n \tSpecify an external helper to be called when a username or\n \tpassword credential is needed; the helper may consult external\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex 0bbc8f5..8cb3439 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -282,7 +282,13 @@ configuration variable documented in linkgit:git-config[1].\n \tShow unified diff between the HEAD commit and what\n \twould be committed at the bottom of the commit message\n \ttemplate.  Note that this diff output doesn't have its\n-\tlines prefixed with '#'.\n+\tlines prefixed with '#'.  The `commit.verbose` configuration\n+\tvariable can be set to true to implicitly send this option.\n+\n+--no-verbose::\n+\tDo not show the unified diff at the bottom of the commit message\n+\ttemplate.  This is the default behavior, but can be used to override\n+\tthe `commit.verbose` configuration variable.\n \n -q::\n --quiet::\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 5e2221c..b746dc8 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1503,6 +1503,10 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n \t\tsign_commit = git_config_bool(k, v) ? \"\" : NULL;\n \t\treturn 0;\n \t}\n+\tif (!strcmp(k, \"commit.verbose\")) {\n+\t\tverbose = git_config_bool(k, v);\n+\t\treturn 0;\n+\t}\n \n \tstatus = git_gpg_config(k, v, NULL);\n \tif (status)\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 019026e..b686985 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1980,6 +1980,7 @@ _git_config ()\n \t\tcolor.ui\n \t\tcommit.status\n \t\tcommit.template\n+\t\tcommit.verbose\n \t\tcore.abbrev\n \t\tcore.askpass\n \t\tcore.attributesfile\ndiff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\nindex 35a4d06..471bd8f 100755\n--- a/t/t7507-commit-verbose.sh\n+++ b/t/t7507-commit-verbose.sh\n@@ -7,6 +7,10 @@ write_script check-for-diff <<-'EOF'\n \texec grep '^diff --git' \"$1\"\n EOF\n \n+write_script check-for-no-diff <<-'EOF'\n+\t! check-for-diff\n+EOF\n+\n cat >message <<'EOF'\n subject\n \n@@ -48,6 +52,38 @@ test_expect_success 'verbose diff is stripped out (mnemonicprefix)' '\n \tcheck_message message\n '\n \n+test_expect_success 'commit shows verbose diff with commit.verbose true' '\n+\techo morecontent >>file &&\n+\tgit add file &&\n+\ttest_config commit.verbose true &&\n+\ttest_set_editor \"$PWD/check-for-diff\" &&\n+\tgit commit --amend\n+'\n+\n+test_expect_success 'commit --verbose overrides commit.verbose false' '\n+\techo evenmorecontent >>file &&\n+\tgit add file &&\n+\ttest_config commit.verbose false  &&\n+\ttest_set_editor \"$PWD/check-for-diff\" &&\n+\tgit commit --amend --verbose\n+'\n+\n+test_expect_success 'commit does not show verbose diff with commit.verbose false' '\n+\techo evenmorecontent >>file &&\n+\tgit add file &&\n+\ttest_config commit.verbose false &&\n+\ttest_set_editor \"$PWD/check-for-no-diff\" &&\n+\tgit commit --amend\n+'\n+\n+test_expect_success 'commit --no-verbose overrides commit.verbose true' '\n+\techo evenmorecontent >>file &&\n+\tgit add file &&\n+\ttest_config commit.verbose true &&\n+\ttest_set_editor \"$PWD/check-for-no-diff\" &&\n+\tgit commit --amend --no-verbose\n+'\n+\n cat >diff <<'EOF'\n This is an example commit message that contains a diff.\n \n-- \n2.0.0\n"},{"id":"244485","messageId":"20140617212132.GC13848@sigill.intra.peff.net","threadId":"36939","inReplyTo":"2a0ed28d8ef50ce432c7680c1f01eb0f52891134.1403033723.git.caleb@calebthompson.io","subject":"Re: [PATCH v6 4/4] commit: Add commit.verbose configuration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-06-17T21:21:32Z","receivedAt":"2014-06-17T21:21:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jun 17, 2014 at 02:39:00PM -0500, Caleb Thompson wrote:\n\n> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\n> index 35a4d06..471bd8f 100755\n> --- a/t/t7507-commit-verbose.sh\n> +++ b/t/t7507-commit-verbose.sh\n> @@ -7,6 +7,10 @@ write_script check-for-diff <<-'EOF'\n>  \texec grep '^diff --git' \"$1\"\n>  EOF\n>  \n> +write_script check-for-no-diff <<-'EOF'\n> +\t! check-for-diff\n> +EOF\n\nDon't you need \"$PWD/\" or similar here, since check-for-diff is not in our path?\n\nOtherwise, your tests will always pass (\"! check-for-diff\" is always\ntrue, since we cannot find it). I get (running with \"-v\"):\n\nexpecting success: \n        echo evenmorecontent >>file &&\n        git add file &&\n        test_config commit.verbose true &&\n        test_set_editor \"$PWD/check-for-no-diff\" &&\n        git commit --amend --no-verbose\n\n/home/peff/compile/git/t/trash directory.t7507-commit-verbose/check-for-no-diff: 2: /home/peff/compile/git/t/trash directory.t7507-commit-verbose/check-for-no-diff: check-for-diff: not found\n\nOther than that, the whole series looks OK to me.\n\n-Peff\n"},{"id":"244486","messageId":"xmqq8uovkytq.fsf@gitster.dls.corp.google.com","threadId":"36939","inReplyTo":"a7aa2efcb6a2beba973c389f5c7afbce79ec9747.1403033723.git.caleb@calebthompson.io","subject":"Re: [PATCH v6 1/4] commit test: Use test_config instead of git-config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-06-17T21:31:29Z","receivedAt":"2014-06-17T21:31:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Caleb Thompson <caleb@calebthompson.io> writes:\n\n> Some of the tests in t/t7507-commit-verbose.sh were still using\n> git-config to set configuration. Change them to use the test_config\n> helper.\n\n\"were still using\" is only a half of the story, and we need to be\nmore careful than that, though.\n\n> Signed-off-by: Caleb Thompson <caleb@calebthompson.io>\n> Reviewed-by: Jeremiah Mahler <jmmahler@gmail.com>\n> ---\n>  t/t7507-commit-verbose.sh | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\n> index 2ddf28c..6d778ed 100755\n> --- a/t/t7507-commit-verbose.sh\n> +++ b/t/t7507-commit-verbose.sh\n> @@ -43,7 +43,7 @@ test_expect_success 'verbose diff is stripped out' '\n>  '\n>  \n>  test_expect_success 'verbose diff is stripped out (mnemonicprefix)' '\n> -\tgit config diff.mnemonicprefix true &&\n> +\ttest_config diff.mnemonicprefix true &&\n\nBy switching to test_config, you unconfigure the diff.mnemonicprefix\nconfiguration after this test piece is done.  The next one, \"diff in\nmessage is retained with -v\", used to show the change using c/ and\ni/ as prefixes in the log editor, but now it should be showing a/\nand b/.\n\nHave you thought about the reason why the log message used in that\ntest uses c/ and i/ prefixes as a sample patch to be retained,\ninstead of a/ and b/ prefixes?  It is to make sure that this\nin-message patch looks similar to the diff for \"--verbose\" option,\nand we used to do the latter under mnemonicprefix.  That way, we\nwould be more sure that an incorrect implementation that cuts the\nresult given from the editor at \"diff --git $srcprefix/\" will fail\nthe test.\n\nThis is the kind of thing I mean by \"we need to be more careful\".\n\nIf somebody who is doing \"git config to test_config\" conversion\nunderstands what he is doing, I would have expected to see that\nthese c/ and i/ prefixes in the sample log message are replaced\nto use a/ and b/ prefixes.\n\n>  \tgit commit --amend -v &&\n>  \tcheck_message message\n>  '\n> @@ -71,7 +71,7 @@ test_expect_success 'diff in message is retained with -v' '\n>  '\n>  \n>  test_expect_success 'submodule log is stripped out too with -v' '\n> -\tgit config diff.submodule log &&\n> +\ttest_config diff.submodule log &&\n>  \tgit submodule add ./. sub &&\n>  \tgit commit -m \"sub added\" &&\n>  \t(\n\nCan we make a similar reasoning on possible fallout from this\nchange?  An expected answer would be something like:\n\n    The remaining test pieces after this one does not make any\n    change before running \"commit -a -v\", so having diff.submodule\n    set to log or unset does not make any difference to them.\n"},{"id":"244487","messageId":"xmqq38f3kymg.fsf@gitster.dls.corp.google.com","threadId":"36939","inReplyTo":"xmqq8uovkytq.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v6 1/4] commit test: Use test_config instead of git-config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-06-17T21:35:51Z","receivedAt":"2014-06-17T21:35:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Caleb Thompson <caleb@calebthompson.io> writes:\n>\n>> Some of the tests in t/t7507-commit-verbose.sh were still using\n>> git-config to set configuration. Change them to use the test_config\n>> helper.\n>\n> \"were still using\" is only a half of the story, and we need to be\n> more careful than that, though.\n\nI'd rephrase it like so if I were doing this patch myself:\n\n    Subject: t7507: use test_config instead of git-config\n    \n    Some of the tests in t/t7507-commit-verbose.sh uses git-config\n    to set configuration, but the updated variable setting does not\n    have to be used in later tests.\n    \n    Change them to use the test_config helper.\n"},{"id":"244488","messageId":"xmqqy4wvjjyu.fsf@gitster.dls.corp.google.com","threadId":"36939","inReplyTo":"20140617212132.GC13848@sigill.intra.peff.net","subject":"Re: [PATCH v6 4/4] commit: Add commit.verbose configuration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-06-17T21:37:45Z","receivedAt":"2014-06-17T21:37:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Tue, Jun 17, 2014 at 02:39:00PM -0500, Caleb Thompson wrote:\n>\n>> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\n>> index 35a4d06..471bd8f 100755\n>> --- a/t/t7507-commit-verbose.sh\n>> +++ b/t/t7507-commit-verbose.sh\n>> @@ -7,6 +7,10 @@ write_script check-for-diff <<-'EOF'\n>>  \texec grep '^diff --git' \"$1\"\n>>  EOF\n>>  \n>> +write_script check-for-no-diff <<-'EOF'\n>> +\t! check-for-diff\n>> +EOF\n>\n> Don't you need \"$PWD/\" or similar here, since check-for-diff is not in our path?\n\nI actually would prefer a simpler\n\n\t! grep '^diff --git' \"$1\"\n\nthat does not depend on what other parts of the tests have done.\n"},{"id":"244489","messageId":"20140617213926.GA18994@sigill.intra.peff.net","threadId":"36939","inReplyTo":"xmqqy4wvjjyu.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v6 4/4] commit: Add commit.verbose configuration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-06-17T21:39:28Z","receivedAt":"2014-06-17T21:39:28Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jun 17, 2014 at 02:37:45PM -0700, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > On Tue, Jun 17, 2014 at 02:39:00PM -0500, Caleb Thompson wrote:\n> >\n> >> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh\n> >> index 35a4d06..471bd8f 100755\n> >> --- a/t/t7507-commit-verbose.sh\n> >> +++ b/t/t7507-commit-verbose.sh\n> >> @@ -7,6 +7,10 @@ write_script check-for-diff <<-'EOF'\n> >>  \texec grep '^diff --git' \"$1\"\n> >>  EOF\n> >>  \n> >> +write_script check-for-no-diff <<-'EOF'\n> >> +\t! check-for-diff\n> >> +EOF\n> >\n> > Don't you need \"$PWD/\" or similar here, since check-for-diff is not in our path?\n> \n> I actually would prefer a simpler\n> \n> \t! grep '^diff --git' \"$1\"\n> \n> that does not depend on what other parts of the tests have done.\n\nYeah, if it is that simple, I would agree (I did not even look at the\ndefinition of check-for-diff, and assumed it was more complicated :) ).\n\n-Peff\n"},{"id":"256736","messageId":"20150227091333.GA32617@pvv.ntnu.no","threadId":"36939","inReplyTo":"cover.1403033723.git.caleb@calebthompson.io","subject":"Re: [PATCH v6 0/4] commit: Add commit.verbose configuration","fromName":"Torstein Hegge","fromEmail":"hegge@resisty.net","sentAt":"2015-02-27T09:13:36Z","receivedAt":"2015-02-27T09:13:36Z","isPatch":true,"sender":{"key":"hegge@resisty.net","avatar":"https://avatars.githubusercontent.com/u/26041?v=4"},"body":"On Tue, Jun 17, 2014 at 14:38:56 -0500, Caleb Thompson wrote:\n> This patch allows people to set commit.verbose to implicitly send\n> --verbose to git-commit.\n> \n> It introduces several cleanup patches to t/t7505-commit-verbose.sh to\n> bring it closer to the current state of the tests as they have been\n> explained to me, then adds the verbose config and --no-verbose flag.\n> \n> Since the last version of this patch\n> (http://thread.gmane.org/gmane.comp.version-control.git/251486), there\n> have been a couple of commit message clarifications and the body of the\n> check-for-no-diff script in the last patch was changed to simply negate\n> check-for-diff.\n\nHi Caleb,\n\nDo you intend to work further on this topic? I have been using a similar\n(but less polished) patch, and would like to see this included in Git.\n\nIf you don't have time to work on it, I can incorporate the comments on\nthis version and submit a v7.\n\n\nTorstein\n"},{"id":"256851","messageId":"20150302190233.GB46909@sirius.attlocal.net","threadId":"36939","inReplyTo":"20150227091333.GA32617@pvv.ntnu.no","subject":"Re: [PATCH v6 0/4] commit: Add commit.verbose configuration","fromName":"Caleb Thompson","fromEmail":"caleb@calebthompson.io","sentAt":"2015-03-02T19:02:33Z","receivedAt":"2015-03-02T19:02:33Z","isPatch":true,"sender":{"key":"caleb@calebthompson.io","avatar":"https://gravatar.com/avatar/0440c826b3dfa9dd7f768e4b661935a3a2584612a2fcd261f6914ced0457ab4d?d=mp&s=160"},"body":"Hey Torstein.\n\nI'd planned to come back with a heavily simplified version of this that\ndidn't include any of the related changes, just the feature and the new\ntest, since a lot of that seemed controversial.\n\nThat said, I haven't done so and you're welcome to take a whack at this\nfeedback if you'd like.\n\nCaleb Thompson\n\nOn Fri, Feb 27, 2015 at 10:13:36AM +0100, Torstein Hegge wrote:\n> On Tue, Jun 17, 2014 at 14:38:56 -0500, Caleb Thompson wrote:\n> > This patch allows people to set commit.verbose to implicitly send\n> > --verbose to git-commit.\n> >\n> > It introduces several cleanup patches to t/t7505-commit-verbose.sh to\n> > bring it closer to the current state of the tests as they have been\n> > explained to me, then adds the verbose config and --no-verbose flag.\n> >\n> > Since the last version of this patch\n> > (http://thread.gmane.org/gmane.comp.version-control.git/251486), there\n> > have been a couple of commit message clarifications and the body of the\n> > check-for-no-diff script in the last patch was changed to simply negate\n> > check-for-diff.\n>\n> Hi Caleb,\n>\n> Do you intend to work further on this topic? I have been using a similar\n> (but less polished) patch, and would like to see this included in Git.\n>\n> If you don't have time to work on it, I can incorporate the comments on\n> this version and submit a v7.\n>\n>\n> Torstein\n"}]}