From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: Johannes.Schindelin@gmx.de, Jens.Lehmann@web.de,
git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: [PATCH] subdirectory tests: code cleanup, uncomment test
Date: Mon, 18 May 2015 14:10:26 -0700 [thread overview]
Message-ID: <1431983426-4346-1-git-send-email-sbeller@google.com> (raw)
In-Reply-To: <xmqqlhglbt4k.fsf@gitster.dls.corp.google.com>
Originally the test in t1020 was meant to not include setting the GIT_DIR
when testing inside a bare repository as it did not work without setting
GIT_DIR explicitly.
Nowadays the test as originally intended works, so add it to the test
suite. We'll keep the test, which has been run through all years as another
test for finding regressions.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
Junio, thanks for providing the context!
I tried tracking down when this changes via bisect, though I messed up.
By looking through the code I find these commits most promising to have
fixed the underlying issue (I am no expert on subdirectory treatment)
337e51c (Use git_config_early() instead of git_config() during repo setup, 2010-11-26)
72183cb (Fix gitdir detection when in subdir of gitdir, 2009-01-16)
9951d3b (setup: clean up setup_discovered_git_dir(), 2010-11-26)
t/t1020-subdirectory.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 2edb4f2..022641d 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -162,16 +162,20 @@ test_expect_success 'no file/rev ambiguity check inside .git' '
)
'
-test_expect_success 'no file/rev ambiguity check inside a bare repo' '
+test_expect_success '(historic) 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 &&
+ # older Git needed help by exporting GIT_DIR=.
+ # to realize that it is inside a bare repository.
+ # We keep this test around for regression testing.
GIT_DIR=. git show -s HEAD
)
'
-# This still does not work as it should...
-: test_expect_success 'no file/rev ambiguity check inside a bare repo' '
+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 &&
@@ -180,7 +184,6 @@ test_expect_success 'no file/rev ambiguity check inside a bare repo' '
'
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
next prev parent reply other threads:[~2015-05-18 21:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 18:13 [PATCH] t1020: cleanup subdirectory tests a little Stefan Beller
2015-05-18 18:29 ` 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 ` Stefan Beller [this message]
2015-05-18 21:21 ` [PATCH] subdirectory tests: code cleanup, uncomment test 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=1431983426-4346-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).