git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: Stefan Beller <sbeller@google.com>,
	Johannes.Schindelin@gmx.de, Jens.Lehmann@web.de,
	git@vger.kernel.org
Subject: [PATCH] t1020: cleanup subdirectory tests a little
Date: Mon, 18 May 2015 11:13:37 -0700	[thread overview]
Message-ID: <1431972817-18178-1-git-send-email-sbeller@google.com> (raw)

When looking through existing tests to point out good style I came across
t1020, which has a test commented out and the comment wasn't helping me
either of what the test should accomplish in the future. The code of the
test is the same as the test before except setting GIT_DIR=. explicitly,
so it did not ring a bell for me as well.

This removes the test, which may have been confusing readers since 2010.

Additionally moves the "rm -fr foo.git" of the next test (where it is
unrelated) to the previous test, where it makes sense as a cleanup.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 t/t1020-subdirectory.sh | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 2edb4f2..4470ede 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -163,6 +163,7 @@ test_expect_success 'no file/rev ambiguity check inside .git' '
 '
 
 test_expect_success 'no file/rev ambiguity check inside a bare repo' '
+	test_when_finished "rm -fr foo.git" &&
 	git clone -s --bare .git foo.git &&
 	(
 		cd foo.git &&
@@ -170,17 +171,7 @@ test_expect_success 'no file/rev ambiguity check inside a bare repo' '
 	)
 '
 
-# This still does not work as it should...
-: test_expect_success 'no file/rev ambiguity check inside a bare repo' '
-	git clone -s --bare .git foo.git &&
-	(
-		cd foo.git &&
-		git show -s HEAD
-	)
-'
-
 test_expect_success SYMLINKS 'detection should not be fooled by a symlink' '
-	rm -fr foo.git &&
 	git clone -s .git another &&
 	ln -s another yetanother &&
 	(
-- 
2.4.0.194.gc518059

             reply	other threads:[~2015-05-18 18:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 18:13 Stefan Beller [this message]
2015-05-18 18:29 ` [PATCH] t1020: cleanup subdirectory tests a little Junio C Hamano
2015-05-18 18:30   ` Junio C Hamano
2015-05-18 18:36     ` Stefan Beller
2015-05-18 19:08       ` Junio C Hamano
2015-05-18 21:10         ` [PATCH] subdirectory tests: code cleanup, uncomment test Stefan Beller
2015-05-18 21:21           ` Junio C Hamano
2015-05-18 21:29             ` Stefan Beller
2015-05-18 22:03               ` Jonathan Nieder
2015-05-19 21:45               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431972817-18178-1-git-send-email-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=Jens.Lehmann@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).