git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 5/5] Add test showing git-fetch groks gitfiles
@ 2011-10-05 13:35 Phil Hord
  2011-10-06  3:13 ` Nguyen Thai Ngoc Duy
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Hord @ 2011-10-05 13:35 UTC (permalink / raw)
  To: git@vger.kernel.org, Phil Hord
  Cc: Junio C Hamano, Erik Faye-Lund, Nguyen Thai Ngoc Duy

Add a test for two subtly different cases: 'git fetch path/.git'
and 'git fetch path' to confirm that transport recognizes both
paths as git repositories when using the gitfile mechanism.

Signed-off-by: Phil Hord <hordp@cisco.com>

diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index e810314..87ee016 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -206,6 +206,20 @@ test_expect_success 'clone from .git file' '
 	git clone dst/.git dst2
 '
 
+test_expect_success 'fetch from .git gitfile' '
+	(
+		cd dst2 &&
+		git fetch ../dst/.git
+	)
+'
+
+test_expect_success 'fetch from gitfile parent' '
+	(
+		cd dst2 &&
+		git fetch ../dst
+	)
+'
+
 test_expect_success 'clone separate gitdir where target already exists' '
 	rm -rf dst &&
 	test_must_fail git clone --separate-git-dir realgitdir src dst
-- 
1.7.7.505.ga09f6

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

* Re: [PATCHv3 5/5] Add test showing git-fetch groks gitfiles
  2011-10-05 13:35 [PATCHv3 5/5] Add test showing git-fetch groks gitfiles Phil Hord
@ 2011-10-06  3:13 ` Nguyen Thai Ngoc Duy
  0 siblings, 0 replies; 2+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2011-10-06  3:13 UTC (permalink / raw)
  To: Phil Hord; +Cc: git@vger.kernel.org, Phil Hord, Junio C Hamano, Erik Faye-Lund

On Thu, Oct 6, 2011 at 12:35 AM, Phil Hord <hordp@cisco.com> wrote:
> Add a test for two subtly different cases: 'git fetch path/.git'
> and 'git fetch path' to confirm that transport recognizes both
> paths as git repositories when using the gitfile mechanism.

It'd be interesting to test failed cases too. I can think of two: .git
file is not a valid file and .git points to an invalid repo.
-- 
Duy

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

end of thread, other threads:[~2011-10-06  3:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05 13:35 [PATCHv3 5/5] Add test showing git-fetch groks gitfiles Phil Hord
2011-10-06  3:13 ` Nguyen Thai Ngoc Duy

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).