From: Marc Branchaud <marcnarc@xiplink.com>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org, Sverre Rabbelier <srabbelier@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Shawn Pearce <spearce@spearce.org>, Kenny Root <kroot@google.com>,
Thomas Rast <trast@student.ethz.ch>
Subject: Tag refspecs (was Re: [PATCH] Remove restriction on notes ref base)
Date: Thu, 04 Nov 2010 10:35:06 -0400 [thread overview]
Message-ID: <4CD2C49A.8010309@xiplink.com> (raw)
In-Reply-To: <201011040149.47968.johan@herland.net>
On 10-11-03 08:49 PM, Johan Herland wrote:
> On Wednesday 03 November 2010, Sverre Rabbelier wrote:
>> On Wed, Nov 3, 2010 at 17:17, Junio C Hamano <gitster@pobox.com> wrote:
>>> I was actually thinking more along the lines of "not keeping track of
>>> remote state at all". We don't do that for tags either.
>>
>> I would rather see us go the other way (and make the tags refspec put
>> tags under refs/tags/remotes/.../). I can understand not scoping tags
>> (since they're supposed to be immutable, and are usually global), but
>> I don't think the same holds for notes. Notes _are_ versioned, and
>> it's expected that users will collaborate.
>
> Agreed. I don't see how you can easily share and manipulate notes between
> repos _without_ keeping the remote state separate from the local state.
>
>
> I'm probably gonna be flamed for this, but I'd like to go even further, and
> - for a future major version of Git - reconsider Git's default refspecs.
> Currently we have:
>
> Remote repo -> Local repo
> ------------------------------------------------
> refs/heads/* refs/remotes/$remote/*
> refs/tags/* refs/tags/*
> refs/notes/* ???
>
> Of these, the first is specified in the config, the second is
> implicit/magic, and the third would be specified in the config.
>
> I'd probably suggest a more straightforward (and hopefully less confusing)
> setup like this:
>
> Remote repo -> Local repo
> ------------------------------------------------
> refs/heads/* refs/remotes/$remote/heads/*
> refs/tags/* refs/remotes/$remote/tags/*
> refs/notes/* refs/remotes/$remote/notes/*
>
> ...and these would all be set in the config, i.e. no implicit/magic
> refspecs.
I'll second this proposal, at least as far as tags go. I can offer two
reasons to support this.
First, I think the assumption that tags are immutable is too strong. In our
repo, we try to keep our topic branches mergeable into both the "master" and
"maintenance-of-the-latest-release" branches.
This means the topic branches need to be based at the point where the
maintenance and master branches diverged. Making this rule easy to follow is
best accomplished with a tag, e.g. "topic-base", but that tag will move when
we create a new maintenance branch for a new release. With the current tag
semantics, when that happens everyone has to delete their local topic-base
tags and get the new one from the common/shared repo. People who forget to
do this end up basing their topics on outdated code, with predictable results.
It would be much easier to be able to just use an "origin/topic-base" tag
instead, one that that tracks the topic-base tag in the origin repo.
Second, I agree with Johan that the current semantics are confusing. I'm
basically the git guru here at work, so it falls to me to teach people how
git works and how to use it. I find that once people wrap their minds around
the concept of remote and local branches, they get tripped up by the way tags
work.
IMHO it would be more intuitive if tags used the same local/remote semantics
as branches.
M.
next prev parent reply other threads:[~2010-11-04 14:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 0:16 [PATCH] Remove restriction on notes ref base Kenny Root
2010-11-02 6:52 ` Jonathan Nieder
2010-11-02 8:48 ` Johan Herland
2010-11-02 14:11 ` Shawn Pearce
2010-11-02 14:29 ` Jeff King
2010-11-02 15:24 ` Johan Herland
2010-11-02 17:41 ` Junio C Hamano
2010-11-02 22:58 ` Johan Herland
2010-11-02 23:28 ` Chris Forbes
2010-11-03 6:41 ` Jonathan Nieder
2010-11-03 16:17 ` Junio C Hamano
2010-11-03 16:30 ` Sverre Rabbelier
2010-11-04 0:49 ` Johan Herland
2010-11-04 1:00 ` Sverre Rabbelier
2010-11-04 14:35 ` Marc Branchaud [this message]
2010-11-05 1:02 ` Tag refspecs (was Re: [PATCH] Remove restriction on notes ref base) Johan Herland
2010-11-05 15:11 ` Marc Branchaud
2010-11-04 14:58 ` [PATCH] Remove restriction on notes ref base Jeff King
2010-11-05 1:29 ` Johan Herland
2010-11-05 14:55 ` Jeff King
2010-11-03 16:35 ` Jonathan Nieder
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=4CD2C49A.8010309@xiplink.com \
--to=marcnarc@xiplink.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johan@herland.net \
--cc=jrnieder@gmail.com \
--cc=kroot@google.com \
--cc=spearce@spearce.org \
--cc=srabbelier@gmail.com \
--cc=trast@student.ethz.ch \
/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).