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

Re: What's in git.git and announcing GIT v1.5.0-rc1

From
Junio C Hamano <junkio@cox.net>
Date
Jan 15, 2007, 21:56 UTC
Message-ID
<7vtzys0xag.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<45ABE9FD.4050601@cc.jyu.fi>
lamikr <lamikr@cc.jyu.fi> writes:
Show 7 quoted lines
>> Be careful, this gives you a old-fashioned repository, the repositories
>> created by 1.5.0-rc are different, and 1.4.4.4 doesn't grok them:
>>
>>    * refusing to create funny ref 'remotes/origin/*' locally
>>   
> So that would also not work if one uses git-1.4.4 client for fetching
> from the git-1.5.x repository?

That is untrue. You do not care (nor you would not generally be even to tell) which version the repository at the remote end was prepared with when cloning or fetching from a remote git repository.

A new repository created by 'git-clone' in 1.5.0 will create the repository with default configuration that uses a new feature to allow all (present or future) remote branches tracked.

The feature is "refspec wildcard" and looks like this:

	[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*

1.4.4 and older do not understand this new feature used in the configuration, so if you create a new repository by running 1.5.0 clone, you would need to futz with the configuration file if we want to use that repository with 1.4.4; you would need to specify the branches you would want individually:

	[remote "origin"]
        fetch = +refs/heads/master:refs/remotes/origin/master
        fetch = +refs/heads/next:refs/remotes/origin/next

Even if you are updating to 1.5.0, if you will never be interested in some of the remote branches, the above to exclude unwanted ones is a good trick to know.

Previous: lamikr
Message 3 of 3 in “Re: What's in git.git and announcing GIT v1.5.0-rc1”
  1. Horst H. von BrandJan 15, 2007
  2. lamikrJan 15, 2007
  3. Junio C HamanoJan 15, 2007

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.