From: Junio C Hamano Date: Thu, 04 Apr 2013 17:25:30 GMT Subject: Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients Message-ID: <7v6202jjhx.fsf@alter.siamese.dyndns.org> In-Reply-To: <1365091293-23758-1-git-send-email-jkoleszar@google.com> John Koleszar writes: > @@ -402,7 +404,8 @@ static void get_info_refs(char *arg) > > } else { > select_getanyfile(); > - for_each_ref(show_text_ref, &buf); > + head_ref_namespaced(show_text_ref, &buf); > + for_each_namespaced_ref(show_text_ref, &buf); > send_strbuf("text/plain", &buf); > } Whether we are namespaced or not, we used to do for_each_ref() here, not advertising the HEAD (outside refs/ hierarchy), but we now do, and as the first element in the output. Am I reading the patch correctly? Is that an unrelated but useful bugfix even for people who do not use server namespaces? > diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh > index ef98d95..85a5625 100755 > --- a/t/t5560-http-backend-noserver.sh > +++ b/t/t5560-http-backend-noserver.sh > @@ -26,6 +26,13 @@ GET() { > test_cmp exp act > } > > +GET_BODY() { > + REQUEST_METHOD="GET" && export REQUEST_METHOD && > + run_backend "/repo.git/$1" && > + sane_unset REQUEST_METHOD && > + tr '\015' Q +} > + These "export/unset" in &&-chains will allow a failing test to affect the next test, but that is not a new problem (existing POST already has that problem). Just highlighting, so that interested people may notice and want to clean it up on top of this patch. > POST() { > REQUEST_METHOD="POST" && export REQUEST_METHOD && > CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE && Thanks, will queue.