git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: John Koleszar <jkoleszar@google.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Shawn Pearce <spearce@spearce.org>,
	Josh Triplett <josh@joshtriplett.org>
Subject: Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients
Date: Wed, 3 Apr 2013 12:16:01 -0400	[thread overview]
Message-ID: <20130403161600.GC16885@sigill.intra.peff.net> (raw)
In-Reply-To: <20130403161038.GB16885@sigill.intra.peff.net>

On Wed, Apr 03, 2013 at 12:10:38PM -0400, Jeff King wrote:

> Hmm. This is testing just the ref advertisement. It would be nice to see
> a complete transaction tested with namespaces turned on. Something like
> this (squashed into your patch) seems to work for me:

Actually, I guess the point of your patch was to fix the
dumb-via-http-backend transport. So this would be more complete:

diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh
index 47eb769..b5032bd 100755
--- a/t/t5551-http-fetch.sh
+++ b/t/t5551-http-fetch.sh
@@ -162,6 +162,28 @@ test_expect_success 'invalid Content-Type rejected' '
 	grep "not valid:" actual
 '
 
+test_expect_success 'create namespaced refs' '
+	test_commit namespaced &&
+	git push public HEAD:refs/namespaces/ns/refs/heads/master
+'
+
+test_expect_success 'smart clone respects namespace' '
+	git clone --bare "$HTTPD_URL/smart_namespace/repo.git" ns-smart.git &&
+	echo namespaced >expect &&
+	git --git-dir=ns-smart.git log -1 --format=%s >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'dumb clone via http-backend respects namespace' '
+	git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
+		config http.getanyfile true &&
+	GIT_SMART_HTTP=0 git clone --bare \
+		"$HTTPD_URL/smart_namespace/repo.git" ns-dumb.git &&
+	echo namespaced >expect &&
+	git --git-dir=ns-dumb.git log -1 --format=%s >actual &&
+	test_cmp expect actual
+'
+
 test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
 
 test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '

  reply	other threads:[~2013-04-03 16:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28  4:58 [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients John Koleszar
2013-03-28  6:02 ` Junio C Hamano
2013-03-28 15:49   ` Josh Triplett
2013-03-28 14:43 ` Junio C Hamano
     [not found]   ` <CAAvHm8NAqVHLz1wjNN-3ocpYzWfO-PDo0PAJ6pZO7KrMkhJ6Jw@mail.gmail.com>
2013-03-28 15:54     ` John Koleszar
2013-03-28 16:46       ` Junio C Hamano
2013-04-03 15:52       ` John Koleszar
2013-04-03 16:10         ` Jeff King
2013-04-03 16:16           ` Jeff King [this message]
2013-04-03 18:05             ` Junio C Hamano
2013-04-04 15:34               ` John Koleszar
2013-04-04 16:01                 ` John Koleszar
2013-04-04 17:25                   ` Junio C Hamano
2013-04-05  1:22                     ` John Koleszar
2013-04-05  2:35                       ` Josh Triplett
2013-04-05  2:56                         ` Jeff King
2013-04-05  5:34                           ` Junio C Hamano
2013-04-05  5:43                             ` Jeff King
2013-04-06  0:54                               ` John Koleszar
2013-04-10  0:55                                 ` [PATCH v4] " John Koleszar
2013-04-10  1:09                                   ` Junio C Hamano
2013-04-10  4:18                                   ` Jeff King
2013-04-08 21:25                   ` [PATCH] " Thomas Rast
2013-04-08 21:45                     ` Jeff King
2013-04-09 22:13                       ` John Koleszar
2013-04-03 18:04         ` 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=20130403161600.GC16885@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jkoleszar@google.com \
    --cc=josh@joshtriplett.org \
    --cc=spearce@spearce.org \
    /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).