git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Refs naming after clone (was: Re: How to create and keep up to date a naked/bare repository?)
Date: Fri, 27 Jan 2006 11:30:50 +0100	[thread overview]
Message-ID: <200601271130.50322.Josef.Weidendorfer@gmx.de> (raw)
In-Reply-To: <7vd5ie735a.fsf@assigned-by-dhcp.cox.net>

Hi,

On Friday 27 January 2006 04:36, Junio wrote:
> The latest git-clone.sh stopped creating both refs/heads/origin
> and remotes/origin.  The former was to prevent common mistake
> when using it as a shared repository, but removal of the latter
> might have been a mistake.  I dunno.

IMHO it is convenient if git-clone remembers the origin repository
in any case.
 
> Let's step back a bit and think about the modes of usage for a
> bare cloned repository.

It would be nice to have a default which is working nice in all cases
(not only bare ones as discussed here).

IMHO the main problem with the current default (creating master and origin
heads after cloning) is that two namespaces are mixed up:
(1) local (possible development) heads
(2) and heads tracking remote heads

Any compatibility issues aside, wouldn't it be better to have another
namespace for (2), similar to the proposed ref namespaces for subprojects,
like refs/remote/<remote-shortcut>/heads/<remote-head> ?
Clone would create a head refs/remote/origin/heads/master to track the
master of the origin remote repo.

In the case of a the mirror discussed here, you would default to
quite cumbersome long head names:
Tracking master of git://git.kernel.org/pub/scm/git/git.git in
the central mirroring repository would be done on "remote/origin/heads/master",
and tracking this mirror head in developer repos would give a head
name "remote/origin/remote/origin/heads/master".

Still, I think this is nice because everybody can see that above head
is tracking a remote head which is tracking itself another remote
head. gitk could give remote tracking heads another color.

Note that I talk only about the default setup, which of course can be
changed by changing .git/remotes/origin.
Eg. in the mirror case, you probably want local and remote namespace
being the same, ie. .git/refs/heads/* -> .git/refs/remote/origin/heads/*

Perhaps a command to rename head names, which automatically updates
pull/push lines of .git/remotes/ accordingly would be nice here.
Also a command to rename remote shortcuts (e.g. origin to gitmain),
renaming above proposed head names accordingly would be nice.

Josef

  reply	other threads:[~2006-01-27 10:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-25 13:00 [RFD] remembering hand resolve Junio C Hamano
2006-01-25 13:45 ` Andreas Ericsson
2006-01-25 23:56   ` Junio C Hamano
2006-01-26 11:12     ` How to create and keep up to date a naked/bare repository? Mathieu Chouquet-Stringer
2006-01-26 12:22       ` Junio C Hamano
2006-01-26 15:11         ` Mathieu Chouquet-Stringer
2006-01-26 18:27         ` Mathieu Chouquet-Stringer
2006-01-27  3:36           ` Junio C Hamano
2006-01-27 10:30             ` Josef Weidendorfer [this message]
2006-01-27 13:34             ` Mathieu Chouquet-Stringer
2006-01-27 18:41               ` Junio C Hamano
2006-01-27 19:01                 ` J. Bruce Fields
2006-01-27 21:00                   ` Junio C Hamano
2006-01-29  9:10 ` [PATCH/RFC] git-rerere: reuse recorded resolve Junio C Hamano

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=200601271130.50322.Josef.Weidendorfer@gmx.de \
    --to=josef.weidendorfer@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).