From: Junio C Hamano Date: Tue, 21 Mar 2006 00:57:39 GMT Subject: Re: efficient cloning Message-ID: <7v8xr4iph8.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <200603210126.59870.Josef.Weidendorfer@gmx.de> Josef Weidendorfer writes: >> I think what is reasonable is something like this: >> >> - If you start from a repository cloned in the traditional >> way, the upstream "master" is kept track of with your >> "origin", so "diff origin master" would be "my changes on top >> of the upstream". > > Yes. And it would be nice if the same would work with the new layout, > assuming that there is no local "origin" branch, but a .git/remotes/origin > file and .git/refs/remotes/origin directory. My primary aversion comes from that I'd rather avoid teaching the really core stuff about .git/remotes file, and the part that interprets refname is fairly a low-level part. We _could_ record refs/remotes/origin/HEAD that points at refs/remotes/origin/master (or some other branch) upon cloning, and if Pasky wants to do something similar upon fetching, that fetch command could do the same thing.