From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yaroslav Halchenko Subject: Re: wishlist; unify behavior while cloning non-bare repos over http to be in line with ssh/local Date: Tue, 10 May 2016 18:10:32 -0400 Message-ID: <20160510221032.GV23764@onerussian.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Benjamin Poldrack , Michael Hanke To: Git Gurus hangout X-From: git-owner@vger.kernel.org Wed May 11 00:10:39 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b0FrS-0007Kf-Rj for gcvg-git-2@plane.gmane.org; Wed, 11 May 2016 00:10:39 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbcEJWKf (ORCPT ); Tue, 10 May 2016 18:10:35 -0400 Received: from washoe.dartmouth.edu ([129.170.30.229]:39098 "EHLO smtp.onerussian.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbcEJWKe (ORCPT ); Tue, 10 May 2016 18:10:34 -0400 Received: from smtp.onerussian.com ([192.168.100.6] helo=washoe.onerussian.com) by smtp.onerussian.com with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1b0FrM-0006GA-HG; Tue, 10 May 2016 18:10:32 -0400 Received: from yoh by washoe.onerussian.com with local (Exim 4.84) (envelope-from ) id 1b0FrM-0006G5-7Z; Tue, 10 May 2016 18:10:32 -0400 Content-Disposition: inline In-Reply-To: X-URL: http://www.onerussian.com X-Image-Url: http://www.onerussian.com/img/yoh.png X-PGP-Key: http://www.onerussian.com/gpg-yoh.asc X-fingerprint: C5B9 05F0 E8D9 FD96 68FF 366F A2DE 2350 62DA 33FA User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 192.168.100.6 X-SA-Exim-Rcpt-To: git@vger.kernel.org, benjaminpoldrack@gmail.com, michael.hanke@gmail.com X-SA-Exim-Mail-From: yoh@onerussian.com X-SA-Exim-Scanned: No (on smtp.onerussian.com); SAEximRunCond expanded to false Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Tue, 10 May 2016, Jacob Keller wrote: > > The necessary update to the client might as simple as using > > $GIVEN_URL/.git/ and attempting the request again after seeing the > > probe for $GIVEN_URL/info/refs fails. > I know at least Jenkin's Git plugin has a workaround to solve this > issue that is quite similar. On Tue, 10 May 2016, Junio C Hamano wrote: > >> traverse website since could lead to dangerous places. But .git is under > >> originating url directory, as well as info/ or HEAD or any other object > >> accessed by git, so IMHO this concern is not a concern. > I am afraid that the reason why you saw no response is primarily > because nobody is interested in extending dumb commit-walker HTTP > transport after the world has largely moved on and abandoned it. > The necessary update to the client might as simple as using > $GIVEN_URL/.git/ and attempting the request again after seeing the > probe for $GIVEN_URL/info/refs fails. Sure -- workarounds are possible, and we are at the state that many dependent projects seems are doing that already (as above noted Jenkin's Git plugin, smth along the lines probably done by github for https as well). In my case I even have managed to erect a lovely apache rewrite rule which seems to work, so I can just 'git clone --recursive' a collection of 30 submodules without a hiccup (we are also interested in .git/annex part here ;) ). Citing here if it comes handy for anyone # To overcome http://thread.gmane.org/gmane.comp.version-control.git/293777 # we need to rewrite urls so that there is no need for explicit .git/ RewriteEngine On RewriteCond "!.*/\.git/.*" RewriteRule "(.*?/)((?