git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t1200: remove t1200-tutorial.sh
@ 2017-08-08 23:43 Stefan Beller
  2017-08-09  0:07 ` Jonathan Nieder
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Beller @ 2017-08-08 23:43 UTC (permalink / raw)
  To: Johannes.Schindelin; +Cc: git, Stefan Beller

Nowadays there are better tutorials out there such as "Git from bottom up"
or others, easily found online. Additionally to that a tutorial in our
test suite is not as easy to discover as e.g. online tutorials.

This test/tutorial was discovered by the patch author in the effort to
migrate our tests in preparation to switch the hashing function.
Transforming this tutorial to be agnostic of the underlying hash function
would hurt its readability, hence being even less useful as a tutorial.

Instead delete this test as
(a) the functionality is tested elsewhere as well and
(b) reducing the test suite to its core improves performance, which
    aids developers in keeping their development velocity.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 t/t1200-tutorial.sh | 268 ----------------------------------------------------
 1 file changed, 268 deletions(-)
 delete mode 100755 t/t1200-tutorial.sh

diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
deleted file mode 100755
index 397ccb6909..0000000000
--- a/t/t1200-tutorial.sh
+++ /dev/null
@@ -1,268 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2005 Johannes Schindelin
-#
-
-test_description='A simple turial in the form of a test case'
-
-. ./test-lib.sh
-
-test_expect_success 'blob'  '
-	echo "Hello World" > hello &&
-	echo "Silly example" > example &&
-
-	git update-index --add hello example &&
-
-	test blob = "$(git cat-file -t 557db03)"
-'
-
-test_expect_success 'blob 557db03' '
-	test "Hello World" = "$(git cat-file blob 557db03)"
-'
-
-echo "It's a new day for git" >>hello
-cat > diff.expect << EOF
-diff --git a/hello b/hello
-index 557db03..263414f 100644
---- a/hello
-+++ b/hello
-@@ -1 +1,2 @@
- Hello World
-+It's a new day for git
-EOF
-
-test_expect_success 'git diff-files -p' '
-	git diff-files -p > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-test_expect_success 'git diff' '
-	git diff > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-test_expect_success 'tree' '
-	tree=$(git write-tree 2>/dev/null) &&
-	test 8988da15d077d4829fc51d8544c097def6644dbb = $tree
-'
-
-test_expect_success 'git diff-index -p HEAD' '
-	test_tick &&
-	tree=$(git write-tree) &&
-	commit=$(echo "Initial commit" | git commit-tree $tree) &&
-	git update-ref HEAD $commit &&
-	git diff-index -p HEAD > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-test_expect_success 'git diff HEAD' '
-	git diff HEAD > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-cat > whatchanged.expect << EOF
-commit VARIABLE
-Author: VARIABLE
-Date:   VARIABLE
-
-    Initial commit
-
-diff --git a/example b/example
-new file mode 100644
-index 0000000..f24c74a
---- /dev/null
-+++ b/example
-@@ -0,0 +1 @@
-+Silly example
-diff --git a/hello b/hello
-new file mode 100644
-index 0000000..557db03
---- /dev/null
-+++ b/hello
-@@ -0,0 +1 @@
-+Hello World
-EOF
-
-test_expect_success 'git whatchanged -p --root' '
-	git whatchanged -p --root |
-		sed -e "1s/^\(.\{7\}\).\{40\}/\1VARIABLE/" \
-		-e "2,3s/^\(.\{8\}\).*$/\1VARIABLE/" \
-	> whatchanged.output &&
-	test_cmp whatchanged.expect whatchanged.output
-'
-
-test_expect_success 'git tag my-first-tag' '
-	git tag my-first-tag &&
-	test_cmp .git/refs/heads/master .git/refs/tags/my-first-tag
-'
-
-test_expect_success 'git checkout -b mybranch' '
-	git checkout -b mybranch &&
-	test_cmp .git/refs/heads/master .git/refs/heads/mybranch
-'
-
-cat > branch.expect <<EOF
-  master
-* mybranch
-EOF
-
-test_expect_success 'git branch' '
-	git branch > branch.output &&
-	test_cmp branch.expect branch.output
-'
-
-test_expect_success 'git resolve now fails' '
-	git checkout mybranch &&
-	echo "Work, work, work" >>hello &&
-	test_tick &&
-	git commit -m "Some work." -i hello &&
-
-	git checkout master &&
-
-	echo "Play, play, play" >>hello &&
-	echo "Lots of fun" >>example &&
-	test_tick &&
-	git commit -m "Some fun." -i hello example &&
-
-	test_must_fail git merge -m "Merge work in mybranch" mybranch
-'
-
-cat > hello << EOF
-Hello World
-It's a new day for git
-Play, play, play
-Work, work, work
-EOF
-
-cat > show-branch.expect << EOF
-* [master] Merge work in mybranch
- ! [mybranch] Some work.
---
--  [master] Merge work in mybranch
-*+ [mybranch] Some work.
-*  [master^] Some fun.
-EOF
-
-test_expect_success 'git show-branch' '
-	test_tick &&
-	git commit -m "Merge work in mybranch" -i hello &&
-	git show-branch --topo-order --more=1 master mybranch \
-		> show-branch.output &&
-	test_cmp show-branch.expect show-branch.output
-'
-
-cat > resolve.expect << EOF
-Updating VARIABLE..VARIABLE
-FASTFORWARD (no commit created; -m option ignored)
- example | 1 +
- hello   | 1 +
- 2 files changed, 2 insertions(+)
-EOF
-
-test_expect_success 'git resolve' '
-	git checkout mybranch &&
-	git merge -m "Merge upstream changes." master |
-		sed -e "1s/[0-9a-f]\{7\}/VARIABLE/g" \
-		-e "s/^Fast[- ]forward /FASTFORWARD /" >resolve.output
-'
-
-test_expect_success 'git resolve output' '
-	test_i18ncmp resolve.expect resolve.output
-'
-
-cat > show-branch2.expect << EOF
-! [master] Merge work in mybranch
- * [mybranch] Merge work in mybranch
---
--- [master] Merge work in mybranch
-EOF
-
-test_expect_success 'git show-branch (part 2)' '
-	git show-branch --topo-order master mybranch > show-branch2.output &&
-	test_cmp show-branch2.expect show-branch2.output
-'
-
-cat > show-branch3.expect << EOF
-! [master] Merge work in mybranch
- * [mybranch] Merge work in mybranch
---
--- [master] Merge work in mybranch
-+* [master^2] Some work.
-+* [master^] Some fun.
-EOF
-
-test_expect_success 'git show-branch (part 3)' '
-	git show-branch --topo-order --more=2 master mybranch \
-		> show-branch3.output &&
-	test_cmp show-branch3.expect show-branch3.output
-'
-
-test_expect_success 'rewind to "Some fun." and "Some work."' '
-	git checkout mybranch &&
-	git reset --hard master^2 &&
-	git checkout master &&
-	git reset --hard master^
-'
-
-cat > show-branch4.expect << EOF
-* [master] Some fun.
- ! [mybranch] Some work.
---
-*  [master] Some fun.
- + [mybranch] Some work.
-*+ [master^] Initial commit
-EOF
-
-test_expect_success 'git show-branch (part 4)' '
-	git show-branch --topo-order > show-branch4.output &&
-	test_cmp show-branch4.expect show-branch4.output
-'
-
-test_expect_success 'manual merge' '
-	mb=$(git merge-base HEAD mybranch) &&
-	git name-rev --name-only --tags $mb > name-rev.output &&
-	test "my-first-tag" = $(cat name-rev.output) &&
-
-	git read-tree -m -u $mb HEAD mybranch
-'
-
-cat > ls-files.expect << EOF
-100644 7f8b141b65fdcee47321e399a2598a235a032422 0	example
-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1	hello
-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2	hello
-100644 cc44c73eb783565da5831b4d820c962954019b69 3	hello
-EOF
-
-test_expect_success 'git ls-files --stage' '
-	git ls-files --stage > ls-files.output &&
-	test_cmp ls-files.expect ls-files.output
-'
-
-cat > ls-files-unmerged.expect << EOF
-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1	hello
-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2	hello
-100644 cc44c73eb783565da5831b4d820c962954019b69 3	hello
-EOF
-
-test_expect_success 'git ls-files --unmerged' '
-	git ls-files --unmerged > ls-files-unmerged.output &&
-	test_cmp ls-files-unmerged.expect ls-files-unmerged.output
-'
-
-test_expect_success 'git-merge-index' '
-	test_must_fail git merge-index git-merge-one-file hello
-'
-
-test_expect_success 'git ls-files --stage (part 2)' '
-	git ls-files --stage > ls-files.output2 &&
-	test_cmp ls-files.expect ls-files.output2
-'
-
-test_expect_success 'git repack' 'git repack'
-test_expect_success 'git prune-packed' 'git prune-packed'
-test_expect_success '-> only packed objects' '
-	git prune && # Remove conflict marked blobs
-	test $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0
-'
-
-test_done
-- 
2.14.0.rc0.3.g6c2e499285


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-08 23:43 [PATCH] t1200: remove t1200-tutorial.sh Stefan Beller
@ 2017-08-09  0:07 ` Jonathan Nieder
  2017-08-09  0:13   ` Stefan Beller
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Nieder @ 2017-08-09  0:07 UTC (permalink / raw)
  To: Stefan Beller; +Cc: Johannes.Schindelin, git

Hi,

Stefan Beller wrote:

> Nowadays there are better tutorials out there such as "Git from bottom up"
> or others, easily found online. Additionally to that a tutorial in our
> test suite is not as easy to discover as e.g. online tutorials.
>
> This test/tutorial was discovered by the patch author in the effort to
> migrate our tests in preparation to switch the hashing function.
> Transforming this tutorial to be agnostic of the underlying hash function
> would hurt its readability, hence being even less useful as a tutorial.
>
> Instead delete this test as
> (a) the functionality is tested elsewhere as well and
> (b) reducing the test suite to its core improves performance, which
>     aids developers in keeping their development velocity.
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
>  t/t1200-tutorial.sh | 268 ----------------------------------------------------
>  1 file changed, 268 deletions(-)
>  delete mode 100755 t/t1200-tutorial.sh

Interesting.  When I first saw the diffstat I assumed you were talking
about a test that validates the examples in some manpage are correct.
But this is not that.

There indeed appear to be other good tests for these commands, even
"git whatchanged", so for what it's worth,

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-09  0:07 ` Jonathan Nieder
@ 2017-08-09  0:13   ` Stefan Beller
  2017-08-09  0:33     ` Jonathan Nieder
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Beller @ 2017-08-09  0:13 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Johannes Schindelin, git@vger.kernel.org

On Tue, Aug 8, 2017 at 5:07 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Hi,
>
> Stefan Beller wrote:
>
>> Nowadays there are better tutorials out there such as "Git from bottom up"
>> or others, easily found online. Additionally to that a tutorial in our
>> test suite is not as easy to discover as e.g. online tutorials.
>>
>> This test/tutorial was discovered by the patch author in the effort to
>> migrate our tests in preparation to switch the hashing function.
>> Transforming this tutorial to be agnostic of the underlying hash function
>> would hurt its readability, hence being even less useful as a tutorial.
>>
>> Instead delete this test as
>> (a) the functionality is tested elsewhere as well and
>> (b) reducing the test suite to its core improves performance, which
>>     aids developers in keeping their development velocity.
>>
>> Signed-off-by: Stefan Beller <sbeller@google.com>
>> ---
>>  t/t1200-tutorial.sh | 268 ----------------------------------------------------
>>  1 file changed, 268 deletions(-)
>>  delete mode 100755 t/t1200-tutorial.sh
>
> Interesting.  When I first saw the diffstat I assumed you were talking
> about a test that validates the examples in some manpage are correct.
> But this is not that.
>
> There indeed appear to be other good tests for these commands, even
> "git whatchanged", so for what it's worth,
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>
> Thanks.

2ae6c70674 (Adapt tutorial to cygwin and add test case, 2005-10-13)
seemed to imply that it was testing some part for Documentation/tutorial.txt
though.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-09  0:13   ` Stefan Beller
@ 2017-08-09  0:33     ` Jonathan Nieder
  2017-08-09  0:38       ` Jonathan Nieder
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Nieder @ 2017-08-09  0:33 UTC (permalink / raw)
  To: Stefan Beller; +Cc: Johannes Schindelin, git@vger.kernel.org

Stefan Beller wrote:
> On Tue, Aug 8, 2017 at 5:07 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Stefan Beller wrote:

>>> Nowadays there are better tutorials out there such as "Git from bottom up"
>>> or others, easily found online. Additionally to that a tutorial in our
>>> test suite is not as easy to discover as e.g. online tutorials.
[...]
>>> Signed-off-by: Stefan Beller <sbeller@google.com>
>>> ---
>>>  t/t1200-tutorial.sh | 268 ----------------------------------------------------
>>>  1 file changed, 268 deletions(-)
>>>  delete mode 100755 t/t1200-tutorial.sh
>>
>> Interesting.  When I first saw the diffstat I assumed you were talking
>> about a test that validates the examples in some manpage are correct.
>> But this is not that.
[...]
> 2ae6c70674 (Adapt tutorial to cygwin and add test case, 2005-10-13)
> seemed to imply that it was testing some part for Documentation/tutorial.txt
> though.

Oh, good point.

v1.2.0~121 (New tutorial, 2006-01-22) means that the test is no longer
testing what is in the tutorial in any meaningful sense.  That's why
my search for "git whatchanged -p --root" in manpages didn't find
anything.

So what your patch does still seems reasonable (we have lived fine
without a test validating the examples in that tutorial, and if we
really want a test validating the examples then we should find a way
to automatically extract it), but the description is misleading.

With a corrected description, my Reviewed-by would apply.

Thanks for catching it.

Jonathan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-09  0:33     ` Jonathan Nieder
@ 2017-08-09  0:38       ` Jonathan Nieder
  2017-08-09  5:44         ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Nieder @ 2017-08-09  0:38 UTC (permalink / raw)
  To: Stefan Beller; +Cc: Johannes Schindelin, git@vger.kernel.org

Jonathan Nieder wrote:
> Stefan Beller wrote:
>>> Stefan Beller wrote:

>>>> Nowadays there are better tutorials out there such as "Git from bottom up"
>>>> or others, easily found online. Additionally to that a tutorial in our
>>>> test suite is not as easy to discover as e.g. online tutorials.
[...]
>> 2ae6c70674 (Adapt tutorial to cygwin and add test case, 2005-10-13)
>> seemed to imply that it was testing some part for Documentation/tutorial.txt
>> though.
>
> Oh, good point.
>
> v1.2.0~121 (New tutorial, 2006-01-22) means that the test is no longer
> testing what is in the tutorial in any meaningful sense.  That's why
> my search for "git whatchanged -p --root" in manpages didn't find
> anything.

Correction: the tutorial is now called gitcore-tutorial and mostly
survives.  A search for -p --root failed because of v1.5.5.1~19^2
(core-tutorial.txt: Fix showing the current behaviour, 2008-04-10).

That said, the conclusion that this test has mostly bitrotted as far
as its original purpose goes still applies.

An alternative method of addressing the goal you described would be to
fuzz object-id shaped things out of the sample output.  I don't have a
strong preference, given how little this test contributes to coverage
(as you mentioned) and how difficult it is to make it continue to
match the documentation it is trying to test.

Thanks and sorry for the confusion,
Jonathan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-09  0:38       ` Jonathan Nieder
@ 2017-08-09  5:44         ` Junio C Hamano
  2017-08-09 21:22           ` Stefan Beller
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2017-08-09  5:44 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Stefan Beller, Johannes Schindelin, git@vger.kernel.org

Jonathan Nieder <jrnieder@gmail.com> writes:

> Correction: the tutorial is now called gitcore-tutorial and mostly
> survives.  A search for -p --root failed because of v1.5.5.1~19^2
> (core-tutorial.txt: Fix showing the current behaviour, 2008-04-10).

Yeah, I was wondering why neither of you find it while reading your
exchanges on a phone.

> That said, the conclusion that this test has mostly bitrotted as far
> as its original purpose goes still applies.
>
> An alternative method of addressing the goal you described would be to
> fuzz object-id shaped things out of the sample output.  I don't have a
> strong preference, given how little this test contributes to coverage
> (as you mentioned) and how difficult it is to make it continue to
> match the documentation it is trying to test.
>
> Thanks and sorry for the confusion,

OK, so can one of you give the final version of the patch with
updated description?

It _would_ be nice to have an executable tutorial/documentation or
docs with built-in tests like some other systems have, but I realize
that it would be a different matter.  We'd need some toolchain to
mark up tests in our tutorial, extract and run them, and compare the
result, which we currently do not have and it won't fit under our
test framework very well anyway.

Thanks.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-09  5:44         ` Junio C Hamano
@ 2017-08-09 21:22           ` Stefan Beller
  2017-08-09 21:34             ` Johannes Schindelin
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Beller @ 2017-08-09 21:22 UTC (permalink / raw)
  To: gitster; +Cc: Johannes.Schindelin, git, jrnieder, sbeller

v1.2.0~121 (New tutorial, 2006-01-22) rewrote the tutorial such that the
original intent of 2ae6c70674 (Adapt tutorial to cygwin and add test case,
2005-10-13) to test the examples from the tutorial doesn't hold any more.

There are dedicated tests for the commands used, even "git whatchanged",
such that removing these tests doesn't seem like a reduction in test
coverage.

Signed-off-by: Stefan Beller <sbeller@google.com>
---

 I tried finding bug reports in the archive based on t1200 and found none, 
 lots of maintenance patches, though.
 
 Jonathan,  I did not add your reviewed-by yet, as you'd want to decide
 for yourself if this is a corrected description. 
 
 Thanks,
 Stefan

 t/t1200-tutorial.sh | 268 ----------------------------------------------------
 1 file changed, 268 deletions(-)
 delete mode 100755 t/t1200-tutorial.sh

diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
deleted file mode 100755
index 397ccb6909..0000000000
--- a/t/t1200-tutorial.sh
+++ /dev/null
@@ -1,268 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2005 Johannes Schindelin
-#
-
-test_description='A simple turial in the form of a test case'
-
-. ./test-lib.sh
-
-test_expect_success 'blob'  '
-	echo "Hello World" > hello &&
-	echo "Silly example" > example &&
-
-	git update-index --add hello example &&
-
-	test blob = "$(git cat-file -t 557db03)"
-'
-
-test_expect_success 'blob 557db03' '
-	test "Hello World" = "$(git cat-file blob 557db03)"
-'
-
-echo "It's a new day for git" >>hello
-cat > diff.expect << EOF
-diff --git a/hello b/hello
-index 557db03..263414f 100644
---- a/hello
-+++ b/hello
-@@ -1 +1,2 @@
- Hello World
-+It's a new day for git
-EOF
-
-test_expect_success 'git diff-files -p' '
-	git diff-files -p > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-test_expect_success 'git diff' '
-	git diff > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-test_expect_success 'tree' '
-	tree=$(git write-tree 2>/dev/null) &&
-	test 8988da15d077d4829fc51d8544c097def6644dbb = $tree
-'
-
-test_expect_success 'git diff-index -p HEAD' '
-	test_tick &&
-	tree=$(git write-tree) &&
-	commit=$(echo "Initial commit" | git commit-tree $tree) &&
-	git update-ref HEAD $commit &&
-	git diff-index -p HEAD > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-test_expect_success 'git diff HEAD' '
-	git diff HEAD > diff.output &&
-	test_cmp diff.expect diff.output
-'
-
-cat > whatchanged.expect << EOF
-commit VARIABLE
-Author: VARIABLE
-Date:   VARIABLE
-
-    Initial commit
-
-diff --git a/example b/example
-new file mode 100644
-index 0000000..f24c74a
---- /dev/null
-+++ b/example
-@@ -0,0 +1 @@
-+Silly example
-diff --git a/hello b/hello
-new file mode 100644
-index 0000000..557db03
---- /dev/null
-+++ b/hello
-@@ -0,0 +1 @@
-+Hello World
-EOF
-
-test_expect_success 'git whatchanged -p --root' '
-	git whatchanged -p --root |
-		sed -e "1s/^\(.\{7\}\).\{40\}/\1VARIABLE/" \
-		-e "2,3s/^\(.\{8\}\).*$/\1VARIABLE/" \
-	> whatchanged.output &&
-	test_cmp whatchanged.expect whatchanged.output
-'
-
-test_expect_success 'git tag my-first-tag' '
-	git tag my-first-tag &&
-	test_cmp .git/refs/heads/master .git/refs/tags/my-first-tag
-'
-
-test_expect_success 'git checkout -b mybranch' '
-	git checkout -b mybranch &&
-	test_cmp .git/refs/heads/master .git/refs/heads/mybranch
-'
-
-cat > branch.expect <<EOF
-  master
-* mybranch
-EOF
-
-test_expect_success 'git branch' '
-	git branch > branch.output &&
-	test_cmp branch.expect branch.output
-'
-
-test_expect_success 'git resolve now fails' '
-	git checkout mybranch &&
-	echo "Work, work, work" >>hello &&
-	test_tick &&
-	git commit -m "Some work." -i hello &&
-
-	git checkout master &&
-
-	echo "Play, play, play" >>hello &&
-	echo "Lots of fun" >>example &&
-	test_tick &&
-	git commit -m "Some fun." -i hello example &&
-
-	test_must_fail git merge -m "Merge work in mybranch" mybranch
-'
-
-cat > hello << EOF
-Hello World
-It's a new day for git
-Play, play, play
-Work, work, work
-EOF
-
-cat > show-branch.expect << EOF
-* [master] Merge work in mybranch
- ! [mybranch] Some work.
---
--  [master] Merge work in mybranch
-*+ [mybranch] Some work.
-*  [master^] Some fun.
-EOF
-
-test_expect_success 'git show-branch' '
-	test_tick &&
-	git commit -m "Merge work in mybranch" -i hello &&
-	git show-branch --topo-order --more=1 master mybranch \
-		> show-branch.output &&
-	test_cmp show-branch.expect show-branch.output
-'
-
-cat > resolve.expect << EOF
-Updating VARIABLE..VARIABLE
-FASTFORWARD (no commit created; -m option ignored)
- example | 1 +
- hello   | 1 +
- 2 files changed, 2 insertions(+)
-EOF
-
-test_expect_success 'git resolve' '
-	git checkout mybranch &&
-	git merge -m "Merge upstream changes." master |
-		sed -e "1s/[0-9a-f]\{7\}/VARIABLE/g" \
-		-e "s/^Fast[- ]forward /FASTFORWARD /" >resolve.output
-'
-
-test_expect_success 'git resolve output' '
-	test_i18ncmp resolve.expect resolve.output
-'
-
-cat > show-branch2.expect << EOF
-! [master] Merge work in mybranch
- * [mybranch] Merge work in mybranch
---
--- [master] Merge work in mybranch
-EOF
-
-test_expect_success 'git show-branch (part 2)' '
-	git show-branch --topo-order master mybranch > show-branch2.output &&
-	test_cmp show-branch2.expect show-branch2.output
-'
-
-cat > show-branch3.expect << EOF
-! [master] Merge work in mybranch
- * [mybranch] Merge work in mybranch
---
--- [master] Merge work in mybranch
-+* [master^2] Some work.
-+* [master^] Some fun.
-EOF
-
-test_expect_success 'git show-branch (part 3)' '
-	git show-branch --topo-order --more=2 master mybranch \
-		> show-branch3.output &&
-	test_cmp show-branch3.expect show-branch3.output
-'
-
-test_expect_success 'rewind to "Some fun." and "Some work."' '
-	git checkout mybranch &&
-	git reset --hard master^2 &&
-	git checkout master &&
-	git reset --hard master^
-'
-
-cat > show-branch4.expect << EOF
-* [master] Some fun.
- ! [mybranch] Some work.
---
-*  [master] Some fun.
- + [mybranch] Some work.
-*+ [master^] Initial commit
-EOF
-
-test_expect_success 'git show-branch (part 4)' '
-	git show-branch --topo-order > show-branch4.output &&
-	test_cmp show-branch4.expect show-branch4.output
-'
-
-test_expect_success 'manual merge' '
-	mb=$(git merge-base HEAD mybranch) &&
-	git name-rev --name-only --tags $mb > name-rev.output &&
-	test "my-first-tag" = $(cat name-rev.output) &&
-
-	git read-tree -m -u $mb HEAD mybranch
-'
-
-cat > ls-files.expect << EOF
-100644 7f8b141b65fdcee47321e399a2598a235a032422 0	example
-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1	hello
-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2	hello
-100644 cc44c73eb783565da5831b4d820c962954019b69 3	hello
-EOF
-
-test_expect_success 'git ls-files --stage' '
-	git ls-files --stage > ls-files.output &&
-	test_cmp ls-files.expect ls-files.output
-'
-
-cat > ls-files-unmerged.expect << EOF
-100644 557db03de997c86a4a028e1ebd3a1ceb225be238 1	hello
-100644 ba42a2a96e3027f3333e13ede4ccf4498c3ae942 2	hello
-100644 cc44c73eb783565da5831b4d820c962954019b69 3	hello
-EOF
-
-test_expect_success 'git ls-files --unmerged' '
-	git ls-files --unmerged > ls-files-unmerged.output &&
-	test_cmp ls-files-unmerged.expect ls-files-unmerged.output
-'
-
-test_expect_success 'git-merge-index' '
-	test_must_fail git merge-index git-merge-one-file hello
-'
-
-test_expect_success 'git ls-files --stage (part 2)' '
-	git ls-files --stage > ls-files.output2 &&
-	test_cmp ls-files.expect ls-files.output2
-'
-
-test_expect_success 'git repack' 'git repack'
-test_expect_success 'git prune-packed' 'git prune-packed'
-test_expect_success '-> only packed objects' '
-	git prune && # Remove conflict marked blobs
-	test $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0
-'
-
-test_done
-- 
2.14.0.rc0.3.g6c2e499285


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-09 21:22           ` Stefan Beller
@ 2017-08-09 21:34             ` Johannes Schindelin
  2017-08-10 19:39               ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2017-08-09 21:34 UTC (permalink / raw)
  To: Stefan Beller; +Cc: gitster, git, jrnieder

Hi,

On Wed, 9 Aug 2017, Stefan Beller wrote:

> v1.2.0~121 (New tutorial, 2006-01-22) rewrote the tutorial such that the
> original intent of 2ae6c70674 (Adapt tutorial to cygwin and add test case,
> 2005-10-13) to test the examples from the tutorial doesn't hold any more.
> 
> There are dedicated tests for the commands used, even "git whatchanged",
> such that removing these tests doesn't seem like a reduction in test
> coverage.
> 
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---

ACK,
Dscho

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] t1200: remove t1200-tutorial.sh
  2017-08-09 21:34             ` Johannes Schindelin
@ 2017-08-10 19:39               ` Junio C Hamano
  0 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2017-08-10 19:39 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Stefan Beller, git, jrnieder

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Hi,
>
> On Wed, 9 Aug 2017, Stefan Beller wrote:
>
>> v1.2.0~121 (New tutorial, 2006-01-22) rewrote the tutorial such that the
>> original intent of 2ae6c70674 (Adapt tutorial to cygwin and add test case,
>> 2005-10-13) to test the examples from the tutorial doesn't hold any more.
>> 
>> There are dedicated tests for the commands used, even "git whatchanged",
>> such that removing these tests doesn't seem like a reduction in test
>> coverage.
>> 
>> Signed-off-by: Stefan Beller <sbeller@google.com>
>> ---
>
> ACK,
> Dscho

Thanks, both.
Will queue.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-08-10 19:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08 23:43 [PATCH] t1200: remove t1200-tutorial.sh Stefan Beller
2017-08-09  0:07 ` Jonathan Nieder
2017-08-09  0:13   ` Stefan Beller
2017-08-09  0:33     ` Jonathan Nieder
2017-08-09  0:38       ` Jonathan Nieder
2017-08-09  5:44         ` Junio C Hamano
2017-08-09 21:22           ` Stefan Beller
2017-08-09 21:34             ` Johannes Schindelin
2017-08-10 19:39               ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).