{"thread":{"id":"46545","subject":"[PATCH] t1200: remove t1200-tutorial.sh","startedAt":"2017-08-08T23:43:20Z","lastAt":"2017-08-10T19:39:12Z","messageCount":9,"participants":["Stefan Beller","Jonathan Nieder","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"325880","messageId":"20170808234308.25565-1-sbeller@google.com","threadId":"46545","inReplyTo":null,"subject":"[PATCH] t1200: remove t1200-tutorial.sh","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-08-08T23:43:08Z","receivedAt":"2017-08-08T23:43:20Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Nowadays there are better tutorials out there such as \"Git from bottom up\"\nor others, easily found online. Additionally to that a tutorial in our\ntest suite is not as easy to discover as e.g. online tutorials.\n\nThis test/tutorial was discovered by the patch author in the effort to\nmigrate our tests in preparation to switch the hashing function.\nTransforming this tutorial to be agnostic of the underlying hash function\nwould hurt its readability, hence being even less useful as a tutorial.\n\nInstead delete this test as\n(a) the functionality is tested elsewhere as well and\n(b) reducing the test suite to its core improves performance, which\n    aids developers in keeping their development velocity.\n\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n t/t1200-tutorial.sh | 268 ----------------------------------------------------\n 1 file changed, 268 deletions(-)\n delete mode 100755 t/t1200-tutorial.sh\n\ndiff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh\ndeleted file mode 100755\nindex 397ccb6909..0000000000\n--- a/t/t1200-tutorial.sh\n+++ /dev/null\n@@ -1,268 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2005 Johannes Schindelin\n-#\n-\n-test_description='A simple turial in the form of a test case'\n-\n-. ./test-lib.sh\n-\n-test_expect_success 'blob'  '\n-\techo \"Hello World\" > hello &&\n-\techo \"Silly example\" > example &&\n-\n-\tgit update-index --add hello example &&\n-\n-\ttest blob = \"$(git cat-file -t 557db03)\"\n-'\n-\n-test_expect_success 'blob 557db03' '\n-\ttest \"Hello World\" = \"$(git cat-file blob 557db03)\"\n-'\n-\n-echo \"It's a new day for git\" >>hello\n-cat > diff.expect << EOF\n-diff --git a/hello b/hello\n-index 557db03..263414f 100644\n---- a/hello\n-+++ b/hello\n-@@ -1 +1,2 @@\n- Hello World\n-+It's a new day for git\n-EOF\n-\n-test_expect_success 'git diff-files -p' '\n-\tgit diff-files -p > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-test_expect_success 'git diff' '\n-\tgit diff > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-test_expect_success 'tree' '\n-\ttree=$(git write-tree 2>/dev/null) &&\n-\ttest 8988da15d077d4829fc51d8544c097def6644dbb = $tree\n-'\n-\n-test_expect_success 'git diff-index -p HEAD' '\n-\ttest_tick &&\n-\ttree=$(git write-tree) &&\n-\tcommit=$(echo \"Initial commit\" | git commit-tree $tree) &&\n-\tgit update-ref HEAD $commit &&\n-\tgit diff-index -p HEAD > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-test_expect_success 'git diff HEAD' '\n-\tgit diff HEAD > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-cat > whatchanged.expect << EOF\n-commit VARIABLE\n-Author: VARIABLE\n-Date:   VARIABLE\n-\n-    Initial commit\n-\n-diff --git a/example b/example\n-new file mode 100644\n-index 0000000..f24c74a\n---- /dev/null\n-+++ b/example\n-@@ -0,0 +1 @@\n-+Silly example\n-diff --git a/hello b/hello\n-new file mode 100644\n-index 0000000..557db03\n---- /dev/null\n-+++ b/hello\n-@@ -0,0 +1 @@\n-+Hello World\n-EOF\n-\n-test_expect_success 'git whatchanged -p --root' '\n-\tgit whatchanged -p --root |\n-\t\tsed -e \"1s/^\\(.\\{7\\}\\).\\{40\\}/\\1VARIABLE/\" \\\n-\t\t-e \"2,3s/^\\(.\\{8\\}\\).*$/\\1VARIABLE/\" \\\n-\t> whatchanged.output &&\n-\ttest_cmp whatchanged.expect whatchanged.output\n-'\n-\n-test_expect_success 'git tag my-first-tag' '\n-\tgit tag my-first-tag &&\n-\ttest_cmp .git/refs/heads/master .git/refs/tags/my-first-tag\n-'\n-\n-test_expect_success 'git checkout -b mybranch' '\n-\tgit checkout -b mybranch &&\n-\ttest_cmp .git/refs/heads/master .git/refs/heads/mybranch\n-'\n-\n-cat > branch.expect <<EOF\n-  master\n-* mybranch\n-EOF\n-\n-test_expect_success 'git branch' '\n-\tgit branch > branch.output &&\n-\ttest_cmp branch.expect branch.output\n-'\n-\n-test_expect_success 'git resolve now fails' '\n-\tgit checkout mybranch &&\n-\techo \"Work, work, work\" >>hello &&\n-\ttest_tick &&\n-\tgit commit -m \"Some work.\" -i hello &&\n-\n-\tgit checkout master &&\n-\n-\techo \"Play, play, play\" >>hello &&\n-\techo \"Lots of fun\" >>example &&\n-\ttest_tick &&\n-\tgit commit -m \"Some fun.\" -i hello example &&\n-\n-\ttest_must_fail git merge -m \"Merge work in mybranch\" mybranch\n-'\n-\n-cat > hello << EOF\n-Hello World\n-It's a new day for git\n-Play, play, play\n-Work, work, work\n-EOF\n-\n-cat > show-branch.expect << EOF\n-* [master] Merge work in mybranch\n- ! [mybranch] Some work.\n---\n--  [master] Merge work in mybranch\n-*+ [mybranch] Some work.\n-*  [master^] Some fun.\n-EOF\n-\n-test_expect_success 'git show-branch' '\n-\ttest_tick &&\n-\tgit commit -m \"Merge work in mybranch\" -i hello &&\n-\tgit show-branch --topo-order --more=1 master mybranch \\\n-\t\t> show-branch.output &&\n-\ttest_cmp show-branch.expect show-branch.output\n-'\n-\n-cat > resolve.expect << EOF\n-Updating VARIABLE..VARIABLE\n-FASTFORWARD (no commit created; -m option ignored)\n- example | 1 +\n- hello   | 1 +\n- 2 files changed, 2 insertions(+)\n-EOF\n-\n-test_expect_success 'git resolve' '\n-\tgit checkout mybranch &&\n-\tgit merge -m \"Merge upstream changes.\" master |\n-\t\tsed -e \"1s/[0-9a-f]\\{7\\}/VARIABLE/g\" \\\n-\t\t-e \"s/^Fast[- ]forward /FASTFORWARD /\" >resolve.output\n-'\n-\n-test_expect_success 'git resolve output' '\n-\ttest_i18ncmp resolve.expect resolve.output\n-'\n-\n-cat > show-branch2.expect << EOF\n-! [master] Merge work in mybranch\n- * [mybranch] Merge work in mybranch\n---\n--- [master] Merge work in mybranch\n-EOF\n-\n-test_expect_success 'git show-branch (part 2)' '\n-\tgit show-branch --topo-order master mybranch > show-branch2.output &&\n-\ttest_cmp show-branch2.expect show-branch2.output\n-'\n-\n-cat > show-branch3.expect << EOF\n-! [master] Merge work in mybranch\n- * [mybranch] Merge work in mybranch\n---\n--- [master] Merge work in mybranch\n-+* [master^2] Some work.\n-+* [master^] Some fun.\n-EOF\n-\n-test_expect_success 'git show-branch (part 3)' '\n-\tgit show-branch --topo-order --more=2 master mybranch \\\n-\t\t> show-branch3.output &&\n-\ttest_cmp show-branch3.expect show-branch3.output\n-'\n-\n-test_expect_success 'rewind to \"Some fun.\" and \"Some work.\"' '\n-\tgit checkout mybranch &&\n-\tgit reset --hard master^2 &&\n-\tgit checkout master &&\n-\tgit reset --hard master^\n-'\n-\n-cat > show-branch4.expect << EOF\n-* [master] Some fun.\n- ! [mybranch] Some work.\n---\n-*  [master] Some fun.\n- + [mybranch] Some work.\n-*+ [master^] Initial commit\n-EOF\n-\n-test_expect_success 'git show-branch (part 4)' '\n-\tgit show-branch --topo-order > show-branch4.output &&\n-\ttest_cmp show-branch4.expect show-branch4.output\n-'\n-\n-test_expect_success 'manual merge' '\n-\tmb=$(git merge-base HEAD mybranch) &&\n-\tgit name-rev --name-only --tags $mb > name-rev.output &&\n-\ttest \"my-first-tag\" = $(cat name-rev.output) &&\n-\n-\tgit read-tree -m -u $mb HEAD mybranch\n-'\n-\n-cat > ls-files.expect << EOF\n-100644 7f8b141b65fdcee47321e399a2598a235a032422 0\texample\n-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1\thello\n-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2\thello\n-100644 cc44c73eb783565da5831b4d820c962954019b69 3\thello\n-EOF\n-\n-test_expect_success 'git ls-files --stage' '\n-\tgit ls-files --stage > ls-files.output &&\n-\ttest_cmp ls-files.expect ls-files.output\n-'\n-\n-cat > ls-files-unmerged.expect << EOF\n-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1\thello\n-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2\thello\n-100644 cc44c73eb783565da5831b4d820c962954019b69 3\thello\n-EOF\n-\n-test_expect_success 'git ls-files --unmerged' '\n-\tgit ls-files --unmerged > ls-files-unmerged.output &&\n-\ttest_cmp ls-files-unmerged.expect ls-files-unmerged.output\n-'\n-\n-test_expect_success 'git-merge-index' '\n-\ttest_must_fail git merge-index git-merge-one-file hello\n-'\n-\n-test_expect_success 'git ls-files --stage (part 2)' '\n-\tgit ls-files --stage > ls-files.output2 &&\n-\ttest_cmp ls-files.expect ls-files.output2\n-'\n-\n-test_expect_success 'git repack' 'git repack'\n-test_expect_success 'git prune-packed' 'git prune-packed'\n-test_expect_success '-> only packed objects' '\n-\tgit prune && # Remove conflict marked blobs\n-\ttest $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0\n-'\n-\n-test_done\n-- \n2.14.0.rc0.3.g6c2e499285\n\n"},{"id":"325884","messageId":"20170809000742.GG169894@aiede.mtv.corp.google.com","threadId":"46545","inReplyTo":"20170808234308.25565-1-sbeller@google.com","subject":"Re: [PATCH] t1200: remove t1200-tutorial.sh","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2017-08-09T00:07:42Z","receivedAt":"2017-08-09T00:07:51Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nStefan Beller wrote:\n\n> Nowadays there are better tutorials out there such as \"Git from bottom up\"\n> or others, easily found online. Additionally to that a tutorial in our\n> test suite is not as easy to discover as e.g. online tutorials.\n>\n> This test/tutorial was discovered by the patch author in the effort to\n> migrate our tests in preparation to switch the hashing function.\n> Transforming this tutorial to be agnostic of the underlying hash function\n> would hurt its readability, hence being even less useful as a tutorial.\n>\n> Instead delete this test as\n> (a) the functionality is tested elsewhere as well and\n> (b) reducing the test suite to its core improves performance, which\n>     aids developers in keeping their development velocity.\n>\n> Signed-off-by: Stefan Beller <sbeller@google.com>\n> ---\n>  t/t1200-tutorial.sh | 268 ----------------------------------------------------\n>  1 file changed, 268 deletions(-)\n>  delete mode 100755 t/t1200-tutorial.sh\n\nInteresting.  When I first saw the diffstat I assumed you were talking\nabout a test that validates the examples in some manpage are correct.\nBut this is not that.\n\nThere indeed appear to be other good tests for these commands, even\n\"git whatchanged\", so for what it's worth,\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"},{"id":"325885","messageId":"CAGZ79kZ45=2ngM437fdj8KCJjJo5h0R7FtmEBBG+VVkm0pTLrw@mail.gmail.com","threadId":"46545","inReplyTo":"20170809000742.GG169894@aiede.mtv.corp.google.com","subject":"Re: [PATCH] t1200: remove t1200-tutorial.sh","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-08-09T00:13:45Z","receivedAt":"2017-08-09T00:13:51Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Aug 8, 2017 at 5:07 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Hi,\n>\n> Stefan Beller wrote:\n>\n>> Nowadays there are better tutorials out there such as \"Git from bottom up\"\n>> or others, easily found online. Additionally to that a tutorial in our\n>> test suite is not as easy to discover as e.g. online tutorials.\n>>\n>> This test/tutorial was discovered by the patch author in the effort to\n>> migrate our tests in preparation to switch the hashing function.\n>> Transforming this tutorial to be agnostic of the underlying hash function\n>> would hurt its readability, hence being even less useful as a tutorial.\n>>\n>> Instead delete this test as\n>> (a) the functionality is tested elsewhere as well and\n>> (b) reducing the test suite to its core improves performance, which\n>>     aids developers in keeping their development velocity.\n>>\n>> Signed-off-by: Stefan Beller <sbeller@google.com>\n>> ---\n>>  t/t1200-tutorial.sh | 268 ----------------------------------------------------\n>>  1 file changed, 268 deletions(-)\n>>  delete mode 100755 t/t1200-tutorial.sh\n>\n> Interesting.  When I first saw the diffstat I assumed you were talking\n> about a test that validates the examples in some manpage are correct.\n> But this is not that.\n>\n> There indeed appear to be other good tests for these commands, even\n> \"git whatchanged\", so for what it's worth,\n>\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n>\n> Thanks.\n\n2ae6c70674 (Adapt tutorial to cygwin and add test case, 2005-10-13)\nseemed to imply that it was testing some part for Documentation/tutorial.txt\nthough.\n"},{"id":"325886","messageId":"20170809003330.GH169894@aiede.mtv.corp.google.com","threadId":"46545","inReplyTo":"CAGZ79kZ45=2ngM437fdj8KCJjJo5h0R7FtmEBBG+VVkm0pTLrw@mail.gmail.com","subject":"Re: [PATCH] t1200: remove t1200-tutorial.sh","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2017-08-09T00:33:30Z","receivedAt":"2017-08-09T00:33:38Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Stefan Beller wrote:\n> On Tue, Aug 8, 2017 at 5:07 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>> Stefan Beller wrote:\n\n>>> Nowadays there are better tutorials out there such as \"Git from bottom up\"\n>>> or others, easily found online. Additionally to that a tutorial in our\n>>> test suite is not as easy to discover as e.g. online tutorials.\n[...]\n>>> Signed-off-by: Stefan Beller <sbeller@google.com>\n>>> ---\n>>>  t/t1200-tutorial.sh | 268 ----------------------------------------------------\n>>>  1 file changed, 268 deletions(-)\n>>>  delete mode 100755 t/t1200-tutorial.sh\n>>\n>> Interesting.  When I first saw the diffstat I assumed you were talking\n>> about a test that validates the examples in some manpage are correct.\n>> But this is not that.\n[...]\n> 2ae6c70674 (Adapt tutorial to cygwin and add test case, 2005-10-13)\n> seemed to imply that it was testing some part for Documentation/tutorial.txt\n> though.\n\nOh, good point.\n\nv1.2.0~121 (New tutorial, 2006-01-22) means that the test is no longer\ntesting what is in the tutorial in any meaningful sense.  That's why\nmy search for \"git whatchanged -p --root\" in manpages didn't find\nanything.\n\nSo what your patch does still seems reasonable (we have lived fine\nwithout a test validating the examples in that tutorial, and if we\nreally want a test validating the examples then we should find a way\nto automatically extract it), but the description is misleading.\n\nWith a corrected description, my Reviewed-by would apply.\n\nThanks for catching it.\n\nJonathan\n"},{"id":"325887","messageId":"20170809003841.GI169894@aiede.mtv.corp.google.com","threadId":"46545","inReplyTo":"20170809003330.GH169894@aiede.mtv.corp.google.com","subject":"Re: [PATCH] t1200: remove t1200-tutorial.sh","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2017-08-09T00:38:41Z","receivedAt":"2017-08-09T00:38:50Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Nieder wrote:\n> Stefan Beller wrote:\n>>> Stefan Beller wrote:\n\n>>>> Nowadays there are better tutorials out there such as \"Git from bottom up\"\n>>>> or others, easily found online. Additionally to that a tutorial in our\n>>>> test suite is not as easy to discover as e.g. online tutorials.\n[...]\n>> 2ae6c70674 (Adapt tutorial to cygwin and add test case, 2005-10-13)\n>> seemed to imply that it was testing some part for Documentation/tutorial.txt\n>> though.\n>\n> Oh, good point.\n>\n> v1.2.0~121 (New tutorial, 2006-01-22) means that the test is no longer\n> testing what is in the tutorial in any meaningful sense.  That's why\n> my search for \"git whatchanged -p --root\" in manpages didn't find\n> anything.\n\nCorrection: the tutorial is now called gitcore-tutorial and mostly\nsurvives.  A search for -p --root failed because of v1.5.5.1~19^2\n(core-tutorial.txt: Fix showing the current behaviour, 2008-04-10).\n\nThat said, the conclusion that this test has mostly bitrotted as far\nas its original purpose goes still applies.\n\nAn alternative method of addressing the goal you described would be to\nfuzz object-id shaped things out of the sample output.  I don't have a\nstrong preference, given how little this test contributes to coverage\n(as you mentioned) and how difficult it is to make it continue to\nmatch the documentation it is trying to test.\n\nThanks and sorry for the confusion,\nJonathan\n"},{"id":"325918","messageId":"xmqqh8xh8fcb.fsf@gitster.mtv.corp.google.com","threadId":"46545","inReplyTo":"20170809003841.GI169894@aiede.mtv.corp.google.com","subject":"Re: [PATCH] t1200: remove t1200-tutorial.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-08-09T05:44:52Z","receivedAt":"2017-08-09T05:45:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Correction: the tutorial is now called gitcore-tutorial and mostly\n> survives.  A search for -p --root failed because of v1.5.5.1~19^2\n> (core-tutorial.txt: Fix showing the current behaviour, 2008-04-10).\n\nYeah, I was wondering why neither of you find it while reading your\nexchanges on a phone.\n\n> That said, the conclusion that this test has mostly bitrotted as far\n> as its original purpose goes still applies.\n>\n> An alternative method of addressing the goal you described would be to\n> fuzz object-id shaped things out of the sample output.  I don't have a\n> strong preference, given how little this test contributes to coverage\n> (as you mentioned) and how difficult it is to make it continue to\n> match the documentation it is trying to test.\n>\n> Thanks and sorry for the confusion,\n\nOK, so can one of you give the final version of the patch with\nupdated description?\n\nIt _would_ be nice to have an executable tutorial/documentation or\ndocs with built-in tests like some other systems have, but I realize\nthat it would be a different matter.  We'd need some toolchain to\nmark up tests in our tutorial, extract and run them, and compare the\nresult, which we currently do not have and it won't fit under our\ntest framework very well anyway.\n\nThanks.\n\n"},{"id":"325990","messageId":"20170809212253.27597-1-sbeller@google.com","threadId":"46545","inReplyTo":"xmqqh8xh8fcb.fsf@gitster.mtv.corp.google.com","subject":"[PATCH] t1200: remove t1200-tutorial.sh","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-08-09T21:22:53Z","receivedAt":"2017-08-09T21:23:03Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"v1.2.0~121 (New tutorial, 2006-01-22) rewrote the tutorial such that the\noriginal intent of 2ae6c70674 (Adapt tutorial to cygwin and add test case,\n2005-10-13) to test the examples from the tutorial doesn't hold any more.\n\nThere are dedicated tests for the commands used, even \"git whatchanged\",\nsuch that removing these tests doesn't seem like a reduction in test\ncoverage.\n\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n\n I tried finding bug reports in the archive based on t1200 and found none, \n lots of maintenance patches, though.\n \n Jonathan,  I did not add your reviewed-by yet, as you'd want to decide\n for yourself if this is a corrected description. \n \n Thanks,\n Stefan\n\n t/t1200-tutorial.sh | 268 ----------------------------------------------------\n 1 file changed, 268 deletions(-)\n delete mode 100755 t/t1200-tutorial.sh\n\ndiff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh\ndeleted file mode 100755\nindex 397ccb6909..0000000000\n--- a/t/t1200-tutorial.sh\n+++ /dev/null\n@@ -1,268 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2005 Johannes Schindelin\n-#\n-\n-test_description='A simple turial in the form of a test case'\n-\n-. ./test-lib.sh\n-\n-test_expect_success 'blob'  '\n-\techo \"Hello World\" > hello &&\n-\techo \"Silly example\" > example &&\n-\n-\tgit update-index --add hello example &&\n-\n-\ttest blob = \"$(git cat-file -t 557db03)\"\n-'\n-\n-test_expect_success 'blob 557db03' '\n-\ttest \"Hello World\" = \"$(git cat-file blob 557db03)\"\n-'\n-\n-echo \"It's a new day for git\" >>hello\n-cat > diff.expect << EOF\n-diff --git a/hello b/hello\n-index 557db03..263414f 100644\n---- a/hello\n-+++ b/hello\n-@@ -1 +1,2 @@\n- Hello World\n-+It's a new day for git\n-EOF\n-\n-test_expect_success 'git diff-files -p' '\n-\tgit diff-files -p > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-test_expect_success 'git diff' '\n-\tgit diff > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-test_expect_success 'tree' '\n-\ttree=$(git write-tree 2>/dev/null) &&\n-\ttest 8988da15d077d4829fc51d8544c097def6644dbb = $tree\n-'\n-\n-test_expect_success 'git diff-index -p HEAD' '\n-\ttest_tick &&\n-\ttree=$(git write-tree) &&\n-\tcommit=$(echo \"Initial commit\" | git commit-tree $tree) &&\n-\tgit update-ref HEAD $commit &&\n-\tgit diff-index -p HEAD > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-test_expect_success 'git diff HEAD' '\n-\tgit diff HEAD > diff.output &&\n-\ttest_cmp diff.expect diff.output\n-'\n-\n-cat > whatchanged.expect << EOF\n-commit VARIABLE\n-Author: VARIABLE\n-Date:   VARIABLE\n-\n-    Initial commit\n-\n-diff --git a/example b/example\n-new file mode 100644\n-index 0000000..f24c74a\n---- /dev/null\n-+++ b/example\n-@@ -0,0 +1 @@\n-+Silly example\n-diff --git a/hello b/hello\n-new file mode 100644\n-index 0000000..557db03\n---- /dev/null\n-+++ b/hello\n-@@ -0,0 +1 @@\n-+Hello World\n-EOF\n-\n-test_expect_success 'git whatchanged -p --root' '\n-\tgit whatchanged -p --root |\n-\t\tsed -e \"1s/^\\(.\\{7\\}\\).\\{40\\}/\\1VARIABLE/\" \\\n-\t\t-e \"2,3s/^\\(.\\{8\\}\\).*$/\\1VARIABLE/\" \\\n-\t> whatchanged.output &&\n-\ttest_cmp whatchanged.expect whatchanged.output\n-'\n-\n-test_expect_success 'git tag my-first-tag' '\n-\tgit tag my-first-tag &&\n-\ttest_cmp .git/refs/heads/master .git/refs/tags/my-first-tag\n-'\n-\n-test_expect_success 'git checkout -b mybranch' '\n-\tgit checkout -b mybranch &&\n-\ttest_cmp .git/refs/heads/master .git/refs/heads/mybranch\n-'\n-\n-cat > branch.expect <<EOF\n-  master\n-* mybranch\n-EOF\n-\n-test_expect_success 'git branch' '\n-\tgit branch > branch.output &&\n-\ttest_cmp branch.expect branch.output\n-'\n-\n-test_expect_success 'git resolve now fails' '\n-\tgit checkout mybranch &&\n-\techo \"Work, work, work\" >>hello &&\n-\ttest_tick &&\n-\tgit commit -m \"Some work.\" -i hello &&\n-\n-\tgit checkout master &&\n-\n-\techo \"Play, play, play\" >>hello &&\n-\techo \"Lots of fun\" >>example &&\n-\ttest_tick &&\n-\tgit commit -m \"Some fun.\" -i hello example &&\n-\n-\ttest_must_fail git merge -m \"Merge work in mybranch\" mybranch\n-'\n-\n-cat > hello << EOF\n-Hello World\n-It's a new day for git\n-Play, play, play\n-Work, work, work\n-EOF\n-\n-cat > show-branch.expect << EOF\n-* [master] Merge work in mybranch\n- ! [mybranch] Some work.\n---\n--  [master] Merge work in mybranch\n-*+ [mybranch] Some work.\n-*  [master^] Some fun.\n-EOF\n-\n-test_expect_success 'git show-branch' '\n-\ttest_tick &&\n-\tgit commit -m \"Merge work in mybranch\" -i hello &&\n-\tgit show-branch --topo-order --more=1 master mybranch \\\n-\t\t> show-branch.output &&\n-\ttest_cmp show-branch.expect show-branch.output\n-'\n-\n-cat > resolve.expect << EOF\n-Updating VARIABLE..VARIABLE\n-FASTFORWARD (no commit created; -m option ignored)\n- example | 1 +\n- hello   | 1 +\n- 2 files changed, 2 insertions(+)\n-EOF\n-\n-test_expect_success 'git resolve' '\n-\tgit checkout mybranch &&\n-\tgit merge -m \"Merge upstream changes.\" master |\n-\t\tsed -e \"1s/[0-9a-f]\\{7\\}/VARIABLE/g\" \\\n-\t\t-e \"s/^Fast[- ]forward /FASTFORWARD /\" >resolve.output\n-'\n-\n-test_expect_success 'git resolve output' '\n-\ttest_i18ncmp resolve.expect resolve.output\n-'\n-\n-cat > show-branch2.expect << EOF\n-! [master] Merge work in mybranch\n- * [mybranch] Merge work in mybranch\n---\n--- [master] Merge work in mybranch\n-EOF\n-\n-test_expect_success 'git show-branch (part 2)' '\n-\tgit show-branch --topo-order master mybranch > show-branch2.output &&\n-\ttest_cmp show-branch2.expect show-branch2.output\n-'\n-\n-cat > show-branch3.expect << EOF\n-! [master] Merge work in mybranch\n- * [mybranch] Merge work in mybranch\n---\n--- [master] Merge work in mybranch\n-+* [master^2] Some work.\n-+* [master^] Some fun.\n-EOF\n-\n-test_expect_success 'git show-branch (part 3)' '\n-\tgit show-branch --topo-order --more=2 master mybranch \\\n-\t\t> show-branch3.output &&\n-\ttest_cmp show-branch3.expect show-branch3.output\n-'\n-\n-test_expect_success 'rewind to \"Some fun.\" and \"Some work.\"' '\n-\tgit checkout mybranch &&\n-\tgit reset --hard master^2 &&\n-\tgit checkout master &&\n-\tgit reset --hard master^\n-'\n-\n-cat > show-branch4.expect << EOF\n-* [master] Some fun.\n- ! [mybranch] Some work.\n---\n-*  [master] Some fun.\n- + [mybranch] Some work.\n-*+ [master^] Initial commit\n-EOF\n-\n-test_expect_success 'git show-branch (part 4)' '\n-\tgit show-branch --topo-order > show-branch4.output &&\n-\ttest_cmp show-branch4.expect show-branch4.output\n-'\n-\n-test_expect_success 'manual merge' '\n-\tmb=$(git merge-base HEAD mybranch) &&\n-\tgit name-rev --name-only --tags $mb > name-rev.output &&\n-\ttest \"my-first-tag\" = $(cat name-rev.output) &&\n-\n-\tgit read-tree -m -u $mb HEAD mybranch\n-'\n-\n-cat > ls-files.expect << EOF\n-100644 7f8b141b65fdcee47321e399a2598a235a032422 0\texample\n-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1\thello\n-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2\thello\n-100644 cc44c73eb783565da5831b4d820c962954019b69 3\thello\n-EOF\n-\n-test_expect_success 'git ls-files --stage' '\n-\tgit ls-files --stage > ls-files.output &&\n-\ttest_cmp ls-files.expect ls-files.output\n-'\n-\n-cat > ls-files-unmerged.expect << EOF\n-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1\thello\n-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2\thello\n-100644 cc44c73eb783565da5831b4d820c962954019b69 3\thello\n-EOF\n-\n-test_expect_success 'git ls-files --unmerged' '\n-\tgit ls-files --unmerged > ls-files-unmerged.output &&\n-\ttest_cmp ls-files-unmerged.expect ls-files-unmerged.output\n-'\n-\n-test_expect_success 'git-merge-index' '\n-\ttest_must_fail git merge-index git-merge-one-file hello\n-'\n-\n-test_expect_success 'git ls-files --stage (part 2)' '\n-\tgit ls-files --stage > ls-files.output2 &&\n-\ttest_cmp ls-files.expect ls-files.output2\n-'\n-\n-test_expect_success 'git repack' 'git repack'\n-test_expect_success 'git prune-packed' 'git prune-packed'\n-test_expect_success '-> only packed objects' '\n-\tgit prune && # Remove conflict marked blobs\n-\ttest $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0\n-'\n-\n-test_done\n-- \n2.14.0.rc0.3.g6c2e499285\n\n"},{"id":"325992","messageId":"alpine.DEB.2.21.1.1708092334420.11175@virtualbox","threadId":"46545","inReplyTo":"20170809212253.27597-1-sbeller@google.com","subject":"Re: [PATCH] t1200: remove t1200-tutorial.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-08-09T21:34:54Z","receivedAt":"2017-08-09T21:35:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 9 Aug 2017, Stefan Beller wrote:\n\n> v1.2.0~121 (New tutorial, 2006-01-22) rewrote the tutorial such that the\n> original intent of 2ae6c70674 (Adapt tutorial to cygwin and add test case,\n> 2005-10-13) to test the examples from the tutorial doesn't hold any more.\n> \n> There are dedicated tests for the commands used, even \"git whatchanged\",\n> such that removing these tests doesn't seem like a reduction in test\n> coverage.\n> \n> Signed-off-by: Stefan Beller <sbeller@google.com>\n> ---\n\nACK,\nDscho\n"},{"id":"326076","messageId":"xmqqvalv2ox2.fsf@gitster.mtv.corp.google.com","threadId":"46545","inReplyTo":"alpine.DEB.2.21.1.1708092334420.11175@virtualbox","subject":"Re: [PATCH] t1200: remove t1200-tutorial.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-08-10T19:39:05Z","receivedAt":"2017-08-10T19:39:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Wed, 9 Aug 2017, Stefan Beller wrote:\n>\n>> v1.2.0~121 (New tutorial, 2006-01-22) rewrote the tutorial such that the\n>> original intent of 2ae6c70674 (Adapt tutorial to cygwin and add test case,\n>> 2005-10-13) to test the examples from the tutorial doesn't hold any more.\n>> \n>> There are dedicated tests for the commands used, even \"git whatchanged\",\n>> such that removing these tests doesn't seem like a reduction in test\n>> coverage.\n>> \n>> Signed-off-by: Stefan Beller <sbeller@google.com>\n>> ---\n>\n> ACK,\n> Dscho\n\nThanks, both.\nWill queue.\n"}]}