From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Leo Razoumov" Subject: Re: [PATCH] git-fetch should not strip off ".git" extension Date: Tue, 21 Oct 2008 06:23:57 -0400 Message-ID: References: <48FC5F1B.1050608@op5.se> <7vzlkz2jv7.fsf@gitster.siamese.dyndns.org> Reply-To: SLONIK.AZ@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Andreas Ericsson" , git@vger.kernel.org To: "Junio C Hamano" X-From: git-owner@vger.kernel.org Tue Oct 21 12:25:19 2008 connect(): Connection refused Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1KsEQR-0006QS-3l for gcvg-git-2@gmane.org; Tue, 21 Oct 2008 12:25:19 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752238AbYJUKYE (ORCPT ); Tue, 21 Oct 2008 06:24:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752542AbYJUKYE (ORCPT ); Tue, 21 Oct 2008 06:24:04 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:27303 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbYJUKX7 (ORCPT ); Tue, 21 Oct 2008 06:23:59 -0400 Received: by fg-out-1718.google.com with SMTP id 19so1725709fgg.17 for ; Tue, 21 Oct 2008 03:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=9yrOL0fYU5cwsC+CUvQw7evJf7rjUIRKlmO9rtGLr7Y=; b=RhIcwl993SqQYQ8aKzCiFHqlDrxIlk6ZFVq1hhLlK4Az3Z4WzyG/uXnfSERdoafT0p PEuJTYzlsPC+sxshidsTMI83oA3Mg7IhDxngPMujZegH2NhmTx6oyAnVzSvvUSALCS4p XjP7WRcJSpw5uGxyk2DVcrNcCf2ZfWkM1IO+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=Z3Cn6+CFU1Pl1qGnzzawLOF+I+Z/orIpSWO45H3CpwpgPNu5IV9a74jDfyzvDuWmxo +4JLI4b7yBZfGjkUxTSOERWgplyABi6345xLuu/AYPOSiRUsh/MqB/eBPaTM+55CPYnY Erzu8NkAJPIJpNzWFIiHWhUqeUOeUCSJVi2Ck= Received: by 10.187.227.5 with SMTP id e5mr1280938far.63.1224584637559; Tue, 21 Oct 2008 03:23:57 -0700 (PDT) Received: by 10.187.193.16 with HTTP; Tue, 21 Oct 2008 03:23:57 -0700 (PDT) In-Reply-To: <7vzlkz2jv7.fsf@gitster.siamese.dyndns.org> Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On 10/20/08, Junio C Hamano wrote: > Andreas Ericsson writes: > > >>... > > >> > >> builtin-fetch--tool.c | 2 -- > >> builtin-fetch.c | 2 -- > >> 2 files changed, 0 insertions(+), 4 deletions(-) > >> > >> diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c > >> index 7460ab7..5d0b95f 100644 > >> --- a/builtin-fetch--tool.c > >> +++ b/builtin-fetch--tool.c > >> @@ -160,8 +160,6 @@ static int append_fetch_head(FILE *fp, > >> for (i = remote_len - 1; remote[i] == '/' && 0 <= i; i--) > >> ; > >> remote_len = i + 1; > >> - if (4 < i && !strncmp(".git", remote + i - 3, 4)) > >> - remote_len = i - 3; > >> > >> note_len = 0; > >> if (*what) { > >> diff --git a/builtin-fetch.c b/builtin-fetch.c > >> index ee93d3a..28123a5 100644 > >> --- a/builtin-fetch.c > >> +++ b/builtin-fetch.c > >> @@ -348,8 +348,6 @@ static int store_updated_refs(const char *url, > >> const char *remote_name, > >> for (i = url_len - 1; url[i] == '/' && 0 <= i; i--) > >> ; > >> url_len = i + 1; > >> - if (4 < i && !strncmp(".git", url + i - 3, 4)) > >> - url_len = i - 3; > >> > > > > Will this still play nicely with > > > > git clone foo.git > > > > ? > > > I think it would. > > As far as I can tell, the only thing the patch changes is to disable the > long established "repository name clean-up" feature in the autogenerated > merge messages (iow, input to "fmt-merge-msg"). Even though the old behavior is "long established", it introduces unnecessary ambiguity. If I have two repos (1) Foo #private repo where I do my daily work (2) Foo.git #exported public repo the current behavior makes git messages confuse the repos. --Leo--