git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-fetch should not strip off ".git" extension

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2008, 18:37 UTC
Message-ID
<7vzlkz2jv7.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<48FC5F1B.1050608@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 37 quoted lines
>>...
>>
>>  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").

Previous: Leo RazoumovNext: Leo Razoumov
Message 4 of 13 in “git-fetch should not strip off ".git" extension”
  1. git-fetch should not strip off ".git" extensionLeo Razoumov, Oct 18, 2008
  2. Andreas EricssonOct 20, 2008
  3. Leo RazoumovOct 20, 2008
  4. Junio C HamanoOct 20, 2008
  5. Leo RazoumovOct 21, 2008
  6. Junio C HamanoOct 21, 2008
  7. Alex RiesenOct 21, 2008
  8. Junio C HamanoOct 21, 2008
  9. Alex RiesenOct 21, 2008
  10. Andreas EricssonOct 22, 2008
  11. Junio C HamanoOct 21, 2008
  12. Leo RazoumovOct 22, 2008
  13. Leo RazoumovOct 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.