{"thread":{"id":"41973","subject":"[PATCH] rewrite t1500-rev-parse.sh","startedAt":"2016-04-09T11:19:26Z","lastAt":"2016-04-16T10:23:02Z","messageCount":7,"participants":["Michael Rappazzo","Junio C Hamano","Eric Sunshine","Mike Rappazzo","Jeff King","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"283010","messageId":"1460200767-32864-1-git-send-email-rappazzo@gmail.com","threadId":"41973","inReplyTo":null,"subject":"[PATCH] rewrite t1500-rev-parse.sh","fromName":"Michael Rappazzo","fromEmail":"rappazzo@gmail.com","sentAt":"2016-04-09T11:19:26Z","receivedAt":"2016-04-09T11:19:26Z","isPatch":true,"sender":{"key":"rappazzo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/525287?v=4"},"body":"I was working on a simple bug fix[1], and I wanted to add a test to t1500.  I put\nthe new test at the beginning rather than try to decipher what state the test run\nwould be in at the end. In the review, Eric Sunshine described the test:\n\n> this script is ancient and cd's all around the place with wild abandon and\n> leaks environment variables\n\nI decided to rewrite this test in (what I hope is) the modern test format.  In\ndoing so, I expanded the size of the test file greatly, but I think it is much\nclearer to read and understand as you go through it.  This also has the advantage\nof allowing a tester to use verbose options when testing.  As noted in the commit\ncomment, tests which compare text (rather than booleans) were also adjusted to use\nthe test_cmp function.\n\nThis patch is based on 'pu' because of a feature to add `--absolute-git-dir` to\nrev-parse[2].\n\nI considered including this patch as the first commit in the aforementioned bug\nfix, but I wanted to get it out for review to make sure that it is acceptible.\n\n\n[1]http://thread.gmane.org/gmane.comp.version-control.git/290669\n[2]http://article.gmane.org/gmane.comp.version-control.git/287462\n\nMichael Rappazzo (1):\n  t1500-rev-parse: rewrite each test to run in isolation\n\n t/t1500-rev-parse.sh | 607 +++++++++++++++++++++++++++++++++++++++++++++------\n 1 file changed, 545 insertions(+), 62 deletions(-)\n\n-- \n2.8.0\n"},{"id":"283011","messageId":"1460200767-32864-2-git-send-email-rappazzo@gmail.com","threadId":"41973","inReplyTo":"1460200767-32864-1-git-send-email-rappazzo@gmail.com","subject":"[PATCH] t1500-rev-parse: rewrite each test to run in isolation","fromName":"Michael Rappazzo","fromEmail":"rappazzo@gmail.com","sentAt":"2016-04-09T11:19:27Z","receivedAt":"2016-04-09T11:19:27Z","isPatch":true,"sender":{"key":"rappazzo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/525287?v=4"},"body":"t1500-rev-parse has many tests which change directories and leak\nenvironment variables.  This makes it difficult to add new tests without\nminding the environment variables and current directory.\n\nEach test is now setup, executed, and cleaned up without leaving anything\nbehind.  Tests which have textual expectations have been converted to use\ntest_cmp (which will show a diff when the test is run with --verbose).\n\nSigned-off-by: Michael Rappazzo <rappazzo@gmail.com>\n---\n t/t1500-rev-parse.sh | 607 +++++++++++++++++++++++++++++++++++++++++++++------\n 1 file changed, 545 insertions(+), 62 deletions(-)\n\ndiff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\nindex 617fcd8..dffa9f3 100755\n--- a/t/t1500-rev-parse.sh\n+++ b/t/t1500-rev-parse.sh\n@@ -3,88 +3,571 @@\n test_description='test git rev-parse'\n . ./test-lib.sh\n \n-test_rev_parse() {\n-\tname=$1\n-\tshift\n+test_expect_success 'toplevel: is-bare-repository' '\n+\ttest false = \"$(git rev-parse --is-bare-repository)\"\n+'\n \n-\ttest_expect_success \"$name: is-bare-repository\" \\\n-\t\"test '$1' = \\\"\\$(git rev-parse --is-bare-repository)\\\"\"\n-\tshift\n-\t[ $# -eq 0 ] && return\n+test_expect_success 'toplevel: is-inside-git-dir' '\n+\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+'\n \n-\ttest_expect_success \"$name: is-inside-git-dir\" \\\n-\t\"test '$1' = \\\"\\$(git rev-parse --is-inside-git-dir)\\\"\"\n-\tshift\n-\t[ $# -eq 0 ] && return\n+test_expect_success 'toplevel: is-inside-work-tree' '\n+\ttest true = \"$(git rev-parse --is-inside-work-tree)\"\n+'\n \n-\ttest_expect_success \"$name: is-inside-work-tree\" \\\n-\t\"test '$1' = \\\"\\$(git rev-parse --is-inside-work-tree)\\\"\"\n-\tshift\n-\t[ $# -eq 0 ] && return\n+test_expect_success 'toplevel: prefix' '\n+\techo >expected &&\n+\tgit rev-parse --show-prefix >actual &&\n+\ttest_cmp expected actual\n+'\n \n-\ttest_expect_success \"$name: prefix\" \\\n-\t\"test '$1' = \\\"\\$(git rev-parse --show-prefix)\\\"\"\n-\tshift\n-\t[ $# -eq 0 ] && return\n+test_expect_success 'toplevel: git-dir' '\n+\techo .git >expected &&\n+\tgit rev-parse --git-dir >actual &&\n+\ttest_cmp expected actual\n+'\n \n-\ttest_expect_success \"$name: git-dir\" \\\n-\t\"test '$1' = \\\"\\$(git rev-parse --git-dir)\\\"\"\n-\tshift\n-\t[ $# -eq 0 ] && return\n+test_expect_success 'toplevel: absolute-git-dir' '\n+\techo \"$(pwd)/.git\" >expected &&\n+\tgit rev-parse --absolute-git-dir >actual &&\n+\ttest_cmp expected actual\n+'\n \n-\ttest_expect_success \"$name: absolute-git-dir\" \\\n-\t\"verbose test '$1' = \\\"\\$(git rev-parse --absolute-git-dir)\\\"\"\n-}\n+test_expect_success '.git/: is-bare-repository' '\n+\t(cd .git && test false = \"$(git rev-parse --is-bare-repository)\")\n+'\n \n-# label is-bare is-inside-git is-inside-work prefix git-dir absolute-git-dir\n+test_expect_success '.git/: is-inside-git-dir' '\n+\t(cd .git && test true = \"$(git rev-parse --is-inside-git-dir)\")\n+'\n \n-ROOT=$(pwd)\n+test_expect_success '.git/: is-inside-work-tree' '\n+\t(cd .git && test false = \"$(git rev-parse --is-inside-work-tree)\")\n+'\n \n-test_rev_parse toplevel false false true '' .git \"$ROOT/.git\"\n+test_expect_success '.git/: prefix' '\n+\t(\n+\t\tcd .git &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n \n-cd .git || exit 1\n-test_rev_parse .git/ false true false '' . \"$ROOT/.git\"\n-cd objects || exit 1\n-test_rev_parse .git/objects/ false true false '' \"$ROOT/.git\" \"$ROOT/.git\"\n-cd ../.. || exit 1\n+test_expect_success '.git/: git-dir' '\n+\t(\n+\t\tcd .git &&\n+\t\techo . >expected &&\n+\t\tgit rev-parse --git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n \n-mkdir -p sub/dir || exit 1\n-cd sub/dir || exit 1\n-test_rev_parse subdirectory false false true sub/dir/ \"$ROOT/.git\" \"$ROOT/.git\"\n-cd ../.. || exit 1\n+test_expect_success '.git/: absolute-git-dir' '\n+\t(\n+\t\tROOT=$(pwd) &&\n+\t\tcd .git &&\n+\t\techo \"$ROOT/.git\" >expected &&\n+\t\tgit rev-parse --absolute-git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n \n-git config core.bare true\n-test_rev_parse 'core.bare = true' true false false\n+test_expect_success '.git/objects/: is-bare-repository' '\n+\t(cd .git/objects && test false = \"$(git rev-parse --is-bare-repository)\")\n+'\n \n-git config --unset core.bare\n-test_rev_parse 'core.bare undefined' false false true\n+test_expect_success '.git/objects/: is-inside-git-dir' '\n+\t(cd .git/objects && test true = \"$(git rev-parse --is-inside-git-dir)\")\n+'\n \n-mkdir work || exit 1\n-cd work || exit 1\n-GIT_DIR=../.git\n-GIT_CONFIG=\"$(pwd)\"/../.git/config\n-export GIT_DIR GIT_CONFIG\n+test_expect_success '.git/objects/: is-inside-work-tree' '\n+\t(cd .git/objects && test false = \"$(git rev-parse --is-inside-work-tree)\")\n+'\n \n-git config core.bare false\n-test_rev_parse 'GIT_DIR=../.git, core.bare = false' false false true '' \"../.git\" \"$ROOT/.git\"\n+test_expect_success '.git/objects/: prefix' '\n+\t(\n+\t\tcd .git/objects &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n \n-git config core.bare true\n-test_rev_parse 'GIT_DIR=../.git, core.bare = true' true false false ''\n+test_expect_success '.git/objects/: git-dir' '\n+\t(\n+\t\tROOT=$(pwd) &&\n+\t\tcd .git/objects &&\n+\t\techo $ROOT/.git >expected &&\n+\t\tgit rev-parse --git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n \n-git config --unset core.bare\n-test_rev_parse 'GIT_DIR=../.git, core.bare undefined' false false true ''\n+test_expect_success '.git/objects/: absolute-git-dir' '\n+\t(\n+\t\tROOT=$(pwd) &&\n+\t\tcd .git/objects &&\n+\t\techo \"$ROOT/.git\" >expected &&\n+\t\tgit rev-parse --absolute-git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n \n-mv ../.git ../repo.git || exit 1\n-GIT_DIR=../repo.git\n-GIT_CONFIG=\"$(pwd)\"/../repo.git/config\n+test_expect_success 'subdirectory: is-bare-repository' '\n+\tmkdir -p sub/dir &&\n+\ttest_when_finished \"rm -rf sub\" &&\n+\t(cd sub/dir && test false = \"$(git rev-parse --is-bare-repository)\")\n+'\n \n-git config core.bare false\n-test_rev_parse 'GIT_DIR=../repo.git, core.bare = false' false false true '' \"../repo.git\" \"$ROOT/repo.git\"\n+test_expect_success 'subdirectory: is-inside-git-dir' '\n+\tmkdir -p sub/dir &&\n+\ttest_when_finished \"rm -rf sub\" &&\n+\t(cd sub/dir && test false = \"$(git rev-parse --is-inside-git-dir)\")\n+'\n \n-git config core.bare true\n-test_rev_parse 'GIT_DIR=../repo.git, core.bare = true' true false false ''\n+test_expect_success 'subdirectory: is-inside-work-tree' '\n+\tmkdir -p sub/dir &&\n+\ttest_when_finished \"rm -rf sub\" &&\n+\t(cd sub/dir && test true = \"$(git rev-parse --is-inside-work-tree)\")\n+'\n \n-git config --unset core.bare\n-test_rev_parse 'GIT_DIR=../repo.git, core.bare undefined' false false true ''\n+test_expect_success 'subdirectory: prefix' '\n+\tmkdir -p sub/dir &&\n+\ttest_when_finished \"rm -rf sub\" &&\n+\t(cd sub/dir && test sub/dir/ = \"$(git rev-parse --show-prefix)\")\n+'\n+\n+test_expect_success 'subdirectory: git-dir' '\n+\tmkdir -p sub/dir &&\n+\ttest_when_finished \"rm -rf sub\" &&\n+\t(\n+\t\tROOT=$(pwd) &&\n+\t\tcd sub/dir &&\n+\t\techo $ROOT/.git >expected &&\n+\t\tgit rev-parse --git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'subdirectory: absolute-git-dir' '\n+\tmkdir -p sub/dir &&\n+\ttest_when_finished \"rm -rf sub\" &&\n+\t(\n+\t\tROOT=$(pwd) &&\n+\t\tcd sub/dir &&\n+\t\techo $ROOT/.git >expected &&\n+\t\tgit rev-parse --absolute-git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'core.bare = true: is-bare-repository' '\n+\tgit config core.bare true &&\n+\ttest_when_finished \"git config core.bare false\" &&\n+\ttest true = \"$(git rev-parse --is-bare-repository)\"\n+'\n+\n+test_expect_success 'core.bare = true: is-inside-git-dir' '\n+\tgit config core.bare true &&\n+\ttest_when_finished \"git config core.bare false\" &&\n+\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+'\n+\n+test_expect_success 'core.bare = true: is-inside-work-tree' '\n+\tgit config core.bare true &&\n+\ttest_when_finished \"git config core.bare false\" &&\n+\ttest false = \"$(git rev-parse --is-inside-work-tree)\"\n+'\n+\n+test_expect_success 'core.bare undefined: is-bare-repository' '\n+\tgit config --unset core.bare &&\n+\ttest_when_finished \"git config core.bare false\" &&\n+\ttest false = \"$(git rev-parse --is-bare-repository)\"\n+'\n+\n+test_expect_success 'core.bare undefined: is-inside-git-dir' '\n+\tgit config --unset core.bare &&\n+\ttest_when_finished \"git config core.bare false\" &&\n+\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+'\n+\n+test_expect_success 'core.bare undefined: is-inside-work-tree' '\n+\tgit config --unset core.bare &&\n+\ttest_when_finished \"git config core.bare false\" &&\n+\ttest true = \"$(git rev-parse --is-inside-work-tree)\"\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = false: is-bare-repository' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config\n+\t\tgit config core.bare false &&\n+\t\ttest false = \"$(git rev-parse --is-bare-repository)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = false: is-inside-git-dir' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare false &&\n+\t\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = false: is-inside-work-tree' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare false &&\n+\t\ttest true = \"$(git rev-parse --is-inside-work-tree)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = false: prefix' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare false &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = false: git-dir' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare false &&\n+\t\techo ../.git >expected &&\n+\t\tgit rev-parse --git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = false: absolute-git-dir' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tROOT=$(pwd) &&\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare false &&\n+\t\techo $ROOT/.git >expected &&\n+\t\tgit rev-parse --absolute-git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = true: is-bare-repository' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare true &&\n+\t\ttest true = \"$(git rev-parse --is-bare-repository)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = true: is-inside-git-dir' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare true &&\n+\t\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = true: is-inside-work-tree' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare true &&\n+\t\ttest false = \"$(git rev-parse --is-inside-work-tree)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare = true: prefix' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config core.bare true &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare undefined: is-bare-repository' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\ttest false = \"$(git rev-parse --is-bare-repository)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare undefined: is-inside-git-dir' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare undefined: is-inside-work-tree' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\ttest true = \"$(git rev-parse --is-inside-work-tree)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../.git, core.bare undefined: prefix' '\n+\tmkdir work &&\n+\ttest_when_finished \"rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = false: is-bare-repository' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config\n+\t\tgit config core.bare false &&\n+\t\ttest false = \"$(git rev-parse --is-bare-repository)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = false: is-inside-git-dir' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare false &&\n+\t\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = false: is-inside-work-tree' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare false &&\n+\t\ttest true = \"$(git rev-parse --is-inside-work-tree)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = false: prefix' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare false &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = false: git-dir' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare false &&\n+\t\techo ../repo.git >expected &&\n+\t\tgit rev-parse --git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = false: absolute-git-dir' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tROOT=$(pwd) &&\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare false &&\n+\t\techo $ROOT/repo.git >expected &&\n+\t\tgit rev-parse --absolute-git-dir >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = true: is-bare-repository' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare true &&\n+\t\ttest true = \"$(git rev-parse --is-bare-repository)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = true: is-inside-git-dir' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare true &&\n+\t\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = true: is-inside-work-tree' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare true &&\n+\t\ttest false = \"$(git rev-parse --is-inside-work-tree)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare = true: prefix' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config core.bare true &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare undefined: is-bare-repository' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\ttest false = \"$(git rev-parse --is-bare-repository)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare undefined: is-inside-git-dir' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\ttest false = \"$(git rev-parse --is-inside-git-dir)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare undefined: is-inside-work-tree' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\ttest true = \"$(git rev-parse --is-inside-work-tree)\"\n+\t)\n+'\n+\n+test_expect_success 'GIT_DIR=../repo.git, core.bare undefined: prefix' '\n+\tmkdir work &&\n+\tcp -r .git repo.git &&\n+\ttest_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n+\t(\n+\t\tcd work &&\n+\t\texport GIT_DIR=../repo.git &&\n+\t\texport GIT_CONFIG=\"$(pwd)\"/../repo.git/config &&\n+\t\tgit config --unset core.bare &&\n+\t\techo >expected &&\n+\t\tgit rev-parse --show-prefix >actual &&\n+\t\ttest_cmp expected actual\n+\t)\n+'\n \n test_done\n-- \n2.8.0\n"},{"id":"283290","messageId":"xmqqk2k2l0yx.fsf@gitster.mtv.corp.google.com","threadId":"41973","inReplyTo":"1460200767-32864-2-git-send-email-rappazzo@gmail.com","subject":"Re: [PATCH] t1500-rev-parse: rewrite each test to run in isolation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-13T02:03:02Z","receivedAt":"2016-04-13T02:03:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Rappazzo <rappazzo@gmail.com> writes:\n\n> t1500-rev-parse has many tests which change directories and leak\n> environment variables.  This makes it difficult to add new tests without\n> minding the environment variables and current directory.\n>\n> Each test is now setup, executed, and cleaned up without leaving anything\n> behind.  Tests which have textual expectations have been converted to use\n> test_cmp (which will show a diff when the test is run with --verbose).\n>\n> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>\n> ---\n\nApplying this patch on top of sg/completion-updates topic makes the\ntests much more readable.  Given that sg/completion-updates topic is\nplanned to be rerolled ($gmane/287839), I think it would be better\nto do this as a preparatory clean-up patch before it makes the tests\nuglier by doing \"add --absolute-git-dir\" patch in the middle.\n\nGábor, what do you think?\n"},{"id":"283291","messageId":"CAPig+cT8oD1jJdDrk+YPoquGfTh6m3m-ha0J+er42jOoxnVxzg@mail.gmail.com","threadId":"41973","inReplyTo":"1460200767-32864-2-git-send-email-rappazzo@gmail.com","subject":"Re: [PATCH] t1500-rev-parse: rewrite each test to run in isolation","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-04-13T04:54:16Z","receivedAt":"2016-04-13T04:54:16Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sat, Apr 9, 2016 at 7:19 AM, Michael Rappazzo <rappazzo@gmail.com> wrote:\n> t1500-rev-parse has many tests which change directories and leak\n> environment variables.  This makes it difficult to add new tests without\n> minding the environment variables and current directory.\n>\n> Each test is now setup, executed, and cleaned up without leaving anything\n> behind.  Tests which have textual expectations have been converted to use\n> test_cmp (which will show a diff when the test is run with --verbose).\n\nIt might be easier to review this if broken into several cleanup and\nmodernization patches, however, some comments below...\n\n> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>\n> ---\n> diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\n> @@ -3,88 +3,571 @@\n> +test_expect_success '.git/: is-bare-repository' '\n> +       (cd .git && test false = \"$(git rev-parse --is-bare-repository)\")\n> +'\n>\n> -# label is-bare is-inside-git is-inside-work prefix git-dir absolute-git-dir\n> +test_expect_success '.git/: is-inside-git-dir' '\n> +       (cd .git && test true = \"$(git rev-parse --is-inside-git-dir)\")\n\nSimpler:\n\n    test true = \"$(git -C .git rev-parse --is-inside-git-dir)\"\n\n> +'\n>\n> -ROOT=$(pwd)\n> +test_expect_success '.git/: is-inside-work-tree' '\n> +       (cd .git && test false = \"$(git rev-parse --is-inside-work-tree)\")\n\nDitto.\n\n> +'\n>\n> -test_rev_parse toplevel false false true '' .git \"$ROOT/.git\"\n> +test_expect_success '.git/: prefix' '\n> +       (\n> +               cd .git &&\n> +               echo >expected &&\n> +               git rev-parse --show-prefix >actual &&\n> +               test_cmp expected actual\n> +       )\n\nLikewise, you could drop the entire subshell:\n\n    echo >expected &&\n    git -C .git rev-parse --show-prefix >actual &&\n    test_cmp expected actual\n\n> +'\n>\n> +test_expect_success '.git/: git-dir' '\n> +       (\n> +               cd .git &&\n> +               echo . >expected &&\n> +               git rev-parse --git-dir >actual &&\n> +               test_cmp expected actual\n> +       )\n\nSame here and for many subsequent tests (which I won't quote).\n\n> +'\n> +test_expect_success 'core.bare = true: is-bare-repository' '\n> +       git config core.bare true &&\n> +       test_when_finished \"git config core.bare false\" &&\n> +       test true = \"$(git rev-parse --is-bare-repository)\"\n\nSimpler:\n\n    test_config core.bare true\n\nand then you can drop 'test_when_finished' altogether. However, even simpler:\n\n    test true = \"$(git -c core.bare=false rev-parse --is-bare-repository)\"\n\nwhich allows you to drop 'test_config', as well.\n\nDitto for subsequent tests (which I won't quote).\n\n> +'\n> +test_expect_success 'core.bare undefined: is-bare-repository' '\n> +       git config --unset core.bare &&\n\n    test_unconfig core.bare\n\n> +       test_when_finished \"git config core.bare false\" &&\n\nWhy does this need to re-instate core.bare?\n\nSame comments for subsequent tests.\n\n> +       test false = \"$(git rev-parse --is-bare-repository)\"\n> +'\n> +test_expect_success 'GIT_DIR=../.git, core.bare = false: is-bare-repository' '\n> +       mkdir work &&\n> +       test_when_finished \"rm -rf work && git config core.bare false\" &&\n> +       (\n> +               cd work &&\n> +               export GIT_DIR=../.git &&\n> +               export GIT_CONFIG=\"$(pwd)\"/../.git/config\n> +               git config core.bare false &&\n> +               test false = \"$(git rev-parse --is-bare-repository)\"\n> +       )\n> +'\n\nSame comments about -C to avoid the subshell and -c for configuration.\n\nAlso, you can do one-shot environment variable setting for the command\ninvocation, so the subshell goes away, and everything inside the\nsubshell collapses to:\n\n    test false = \"$(GIT_DIR=... GIT_CONFIG=...\n        git -C work -c core.bare=false rev-parse ...)\"\n\nAdditionally, I'm confused about why this test \"reverts\" the\ncore.bare=false by setting core.bare=false in 'test_when_finished'.\n\nDitto for subsequent tests.\n\n> +test_expect_success 'GIT_DIR=../repo.git, core.bare = false: is-bare-repository' '\n> +       mkdir work &&\n> +       cp -r .git repo.git &&\n> +       test_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n\nIf 'cp' fails, then 'test_when_finished' will never be invoked, which\nmeans that the cleanup will never happen; thus 'test_when_finished'\nneeds to be called earlier. Ditto for subsequent tests.\n\n> +       (\n> +               cd work &&\n> +               export GIT_DIR=../repo.git &&\n> +               export GIT_CONFIG=\"$(pwd)\"/../repo.git/config\n> +               git config core.bare false &&\n> +               test false = \"$(git rev-parse --is-bare-repository)\"\n> +       )\n> +'\n\nClosing comments:\n\nBy using -C, -c, and one-shot environment variables, you can ditch the\nsubshells, and most of these tests should collapse to one or two\nlines.\n\nThere seems to be a lot of repetition here. To reduce the repetition,\nhave you considered encoding the state which varies between tests into\na table and making the tests table-driven. Or, by encoding the varying\nstate in some nested for-loops? The nice thing about driving the tests\nfrom a table or for-loops is that it is easier to see at a glance if\nall cases are covered.\n"},{"id":"283315","messageId":"CANoM8SWAj-rkEAEG2Woha0OErW8JEPWt7iypnBV5ko6GKinO6A@mail.gmail.com","threadId":"41973","inReplyTo":"CAPig+cT8oD1jJdDrk+YPoquGfTh6m3m-ha0J+er42jOoxnVxzg@mail.gmail.com","subject":"Re: [PATCH] t1500-rev-parse: rewrite each test to run in isolation","fromName":"Mike Rappazzo","fromEmail":"rappazzo@gmail.com","sentAt":"2016-04-13T12:21:15Z","receivedAt":"2016-04-13T12:21:15Z","isPatch":true,"sender":{"key":"rappazzo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/525287?v=4"},"body":"On Wed, Apr 13, 2016 at 12:54 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> On Sat, Apr 9, 2016 at 7:19 AM, Michael Rappazzo <rappazzo@gmail.com> wrote:\n>> t1500-rev-parse has many tests which change directories and leak\n>> environment variables.  This makes it difficult to add new tests without\n>> minding the environment variables and current directory.\n>>\n>> Each test is now setup, executed, and cleaned up without leaving anything\n>> behind.  Tests which have textual expectations have been converted to use\n>> test_cmp (which will show a diff when the test is run with --verbose).\n>\n> It might be easier to review this if broken into several cleanup and\n> modernization patches, however, some comments below...\n\nI felt that the changes are repetitive enough that it did not\nnecessitate separate patches.  Perhaps after simplifying based on your\nsuggestions, it will be even smaller.\n\n>\n>> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>\n>> ---\n>> diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\n>> @@ -3,88 +3,571 @@\n>> +test_expect_success '.git/: is-bare-repository' '\n>> +       (cd .git && test false = \"$(git rev-parse --is-bare-repository)\")\n>> +'\n>>\n>> -# label is-bare is-inside-git is-inside-work prefix git-dir absolute-git-dir\n>> +test_expect_success '.git/: is-inside-git-dir' '\n>> +       (cd .git && test true = \"$(git rev-parse --is-inside-git-dir)\")\n>\n> Simpler:\n>\n>     test true = \"$(git -C .git rev-parse --is-inside-git-dir)\"\n>\n>> +'\n>>\n>> -ROOT=$(pwd)\n>> +test_expect_success '.git/: is-inside-work-tree' '\n>> +       (cd .git && test false = \"$(git rev-parse --is-inside-work-tree)\")\n>\n> Ditto.\n>\n>> +'\n>>\n>> -test_rev_parse toplevel false false true '' .git \"$ROOT/.git\"\n>> +test_expect_success '.git/: prefix' '\n>> +       (\n>> +               cd .git &&\n>> +               echo >expected &&\n>> +               git rev-parse --show-prefix >actual &&\n>> +               test_cmp expected actual\n>> +       )\n>\n> Likewise, you could drop the entire subshell:\n>\n>     echo >expected &&\n>     git -C .git rev-parse --show-prefix >actual &&\n>     test_cmp expected actual\n>\n>> +'\n>>\n>> +test_expect_success '.git/: git-dir' '\n>> +       (\n>> +               cd .git &&\n>> +               echo . >expected &&\n>> +               git rev-parse --git-dir >actual &&\n>> +               test_cmp expected actual\n>> +       )\n>\n> Same here and for many subsequent tests (which I won't quote).\n>\n>> +'\n>> +test_expect_success 'core.bare = true: is-bare-repository' '\n>> +       git config core.bare true &&\n>> +       test_when_finished \"git config core.bare false\" &&\n>> +       test true = \"$(git rev-parse --is-bare-repository)\"\n>\n> Simpler:\n>\n>     test_config core.bare true\n>\n> and then you can drop 'test_when_finished' altogether. However, even simpler:\n>\n>     test true = \"$(git -c core.bare=false rev-parse --is-bare-repository)\"\n>\n> which allows you to drop 'test_config', as well.\n>\n> Ditto for subsequent tests (which I won't quote).\n>\n>> +'\n>> +test_expect_success 'core.bare undefined: is-bare-repository' '\n>> +       git config --unset core.bare &&\n>\n>     test_unconfig core.bare\n>\n>> +       test_when_finished \"git config core.bare false\" &&\n>\n> Why does this need to re-instate core.bare?\n>\n> Same comments for subsequent tests.\n>\n>> +       test false = \"$(git rev-parse --is-bare-repository)\"\n>> +'\n>> +test_expect_success 'GIT_DIR=../.git, core.bare = false: is-bare-repository' '\n>> +       mkdir work &&\n>> +       test_when_finished \"rm -rf work && git config core.bare false\" &&\n>> +       (\n>> +               cd work &&\n>> +               export GIT_DIR=../.git &&\n>> +               export GIT_CONFIG=\"$(pwd)\"/../.git/config\n>> +               git config core.bare false &&\n>> +               test false = \"$(git rev-parse --is-bare-repository)\"\n>> +       )\n>> +'\n>\n> Same comments about -C to avoid the subshell and -c for configuration.\n>\n> Also, you can do one-shot environment variable setting for the command\n> invocation, so the subshell goes away, and everything inside the\n> subshell collapses to:\n>\n>     test false = \"$(GIT_DIR=... GIT_CONFIG=...\n>         git -C work -c core.bare=false rev-parse ...)\"\n>\n> Additionally, I'm confused about why this test \"reverts\" the\n> core.bare=false by setting core.bare=false in 'test_when_finished'.\n>\n> Ditto for subsequent tests.\n>\n>> +test_expect_success 'GIT_DIR=../repo.git, core.bare = false: is-bare-repository' '\n>> +       mkdir work &&\n>> +       cp -r .git repo.git &&\n>> +       test_when_finished \"rm -r repo.git && rm -rf work && git config core.bare false\" &&\n>\n> If 'cp' fails, then 'test_when_finished' will never be invoked, which\n> means that the cleanup will never happen; thus 'test_when_finished'\n> needs to be called earlier. Ditto for subsequent tests.\n>\n>> +       (\n>> +               cd work &&\n>> +               export GIT_DIR=../repo.git &&\n>> +               export GIT_CONFIG=\"$(pwd)\"/../repo.git/config\n>> +               git config core.bare false &&\n>> +               test false = \"$(git rev-parse --is-bare-repository)\"\n>> +       )\n>> +'\n>\n> Closing comments:\n>\n> By using -C, -c, and one-shot environment variables, you can ditch the\n> subshells, and most of these tests should collapse to one or two\n> lines.\n\nI follow, and I can make that adjustment.  Thanks for the review.\n\n>\n> There seems to be a lot of repetition here. To reduce the repetition,\n> have you considered encoding the state which varies between tests into\n> a table and making the tests table-driven. Or, by encoding the varying\n> state in some nested for-loops? The nice thing about driving the tests\n> from a table or for-loops is that it is easier to see at a glance if\n> all cases are covered.\n\nI was aiming for readability and the ability to test an individual\ncase.  The previous version was driven by a function, which did reduce\nthe repetition, but it made it not simple to run an individual test in\nthe case of a failure.  Would your table implementation be much\ndifferent from the function, in terms of readability?\n"},{"id":"283398","messageId":"20160413182928.GA31787@sigill.intra.peff.net","threadId":"41973","inReplyTo":"CAPig+cT8oD1jJdDrk+YPoquGfTh6m3m-ha0J+er42jOoxnVxzg@mail.gmail.com","subject":"Re: [PATCH] t1500-rev-parse: rewrite each test to run in isolation","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-04-13T18:29:29Z","receivedAt":"2016-04-13T18:29:29Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 13, 2016 at 12:54:16AM -0400, Eric Sunshine wrote:\n\n> > -# label is-bare is-inside-git is-inside-work prefix git-dir absolute-git-dir\n> > +test_expect_success '.git/: is-inside-git-dir' '\n> > +       (cd .git && test true = \"$(git rev-parse --is-inside-git-dir)\")\n> \n> Simpler:\n> \n>     test true = \"$(git -C .git rev-parse --is-inside-git-dir)\"\n\nWhile we are modernizing, I wonder if it is a good idea to drop the use\nof \"test\" for string comparisons here. We usually save output to a file\nand use test_cmp, for two reasons:\n\n  1. It tests the exit code of the command substitution.\n\n  2. It's easier to debug when it goes wrong (the test produces useful\n     output, and the state is left in the filesystem).\n\nIt is more verbose to do so, but we could easily wrap that in:\n\n  test_stdout \"true\" git -C .git rev-parse --is-inside-git-dir\n\nor something. The other problem is that it uses an extra process to do\nthe test_cmp, which might make the tests slower (especially on Windows).\nWe could do something like:\n\n  test_stdout () {\n          expect=$1; shift\n\t  if ! actual=$(\"$@\")\n\t  then\n\t\techo >&2 \"test_stdout: command failed: $*\"\n\t\treturn 1\n\t  fi\n\t  if test \"$expect\" != \"$actual\"\n\t  then\n\t          echo >&2 \"test_stdout: unexpected output for $*\"\n\t\t  echo >&2 \"test_stdout: $expect != $actual\"\n\t\t  return 1\n\t  fi\n\t  return 0\n  }\n\nwhich is more thorough without incurring extra processes (we lose the\nnice diff output of test_cmp, but since this interface is only useful\nfor short outputs anyway, I don't think that's a big deal.\n\n-Peff\n"},{"id":"283642","messageId":"20160416122302.Horde.jjsXp-czGdXN7lDuc-Vg6pE@webmail.informatik.kit.edu","threadId":"41973","inReplyTo":"xmqqk2k2l0yx.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] t1500-rev-parse: rewrite each test to run in isolation","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2016-04-16T10:23:02Z","receivedAt":"2016-04-16T10:23:02Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\nQuoting Junio C Hamano <gitster@pobox.com>:\n\n> Applying this patch on top of sg/completion-updates topic makes the\n> tests much more readable.  Given that sg/completion-updates topic is\n> planned to be rerolled ($gmane/287839), I think it would be better\n> to do this as a preparatory clean-up patch before it makes the tests\n> uglier by doing \"add --absolute-git-dir\" patch in the middle.\n>\n> Gábor, what do you think?\n\nSure, go ahead.  A standalone test cleanup patch could graduate to master\nfaster than a 20+ patch series, so it shouldn't be held hostage.\n\nThe reroll of sg/completion-updates is almost ready.  \"Almost\", because the\nrefs completion speedup series (another 10+ patches...) is almost ready as\nwell, but needs some final polishing and I want to trickle down some of the\ntest updates into sg/completion-updates.  Unfortunately, I don't expect to\nhave time to finish it up in the next few days...  but fortunately that'll\nleave you time to agree on how to rewrite t1500 and Michael to do the\nreroll ;)\n\nAnyway, if Michael rerolls based on master and you have troubles you don't\nwant to deal with with the conflicts between the reroll and my series, I\nwould say just discard sg/completion-updates for the time being.\n\n\nGábor\n"}]}