From: Junio C Hamano <junkio@cox.net>
To: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Cogito: Support for implicit remote branches in cloned repositories
Date: Fri, 04 Nov 2005 09:43:04 -0800 [thread overview]
Message-ID: <7vvez8wbpz.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200511041701.48881.Josef.Weidendorfer@gmx.de> (Josef Weidendorfer's message of "Fri, 4 Nov 2005 17:01:48 +0100")
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
> ... One difference of cloning with GIT vs. with
> Cogito is that Git always clones all remote branches. This can
> be limiting if you want to work with multiple repositories,
> but allows you to immediatly work with all the branches.
Three points, and two footnotes.
. After a git clone, you can still fetch from non-origin
repository; you can also set up .git/remotes/somewhere-else if
you pull from the non-origin repository regularly, so it is
not really "limiting". It is just being slightly less
convenient, in that setting up for the origin is done for you
by clone [*1*] while you have to arrange for non-origin
repository yourself afterwards.
. The namespace under refs/heads is and always will be an issue.
It is a local matter and how remote branches are named should
not dictate what local branch names you can use in your
repository, but that essentially is what happens after
git-clone to users who do not rename those branches from the
initial cloning.
I once considered to give an option to clone to map the origin
heads to .git/refs/heads/origin/{master,maint,pu,...}. In
hindsight that might have been cleaner. Instead I just followed
what Cogito already established, and mapped remote "master" to
"origin".
. The namespace under refs/tags theoretically also has the same
issue, but I suspect it would not matter too much in practice.
The tags people fetches from remote tend to be release-point
tags (e.g. v2.6.14) whose names implicitly follow an obvious
(to humans) naming convention; when you name your temporary
anchor points using lightweight tags, you can easily avoid
name clashes with those "for other people" tags [*2*].
[Footnotes]
*1* Actually, even the setting up for the origin is done only
halfway -- it only arranges 'git fetch/pull' to fetch from the
master branch, and other branches are not tracked unless you
explicitly arrange them to be. This is somewhat deliberate; the
refs/ namespace management is a local matter and you do not
necessarily want to keep tracking all the branches from origin.
*2* This becomes somewhat problematic when the tool
automatically follows/fetches tags, and that is why git-core
barebone Porcelainish requires an explicit 'git fetch --tags'.
next prev parent reply other threads:[~2005-11-04 17:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 16:01 [PATCH] Cogito: Support for implicit remote branches in cloned repositories Josef Weidendorfer
2005-11-04 17:43 ` Junio C Hamano [this message]
2005-11-04 18:38 ` Josef Weidendorfer
2005-11-04 21:08 ` Petr Baudis
2005-11-04 21:50 ` Junio C Hamano
2005-11-04 22:07 ` Linus Torvalds
2005-11-06 9:11 ` Junio C Hamano
2005-11-07 23:21 ` Petr Baudis
2005-11-07 23:45 ` Junio C Hamano
2005-11-08 16:46 ` Josef Weidendorfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vvez8wbpz.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Josef.Weidendorfer@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).