git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
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: Re: [PATCH] Remove restriction on notes ref base
Date: Thu, 4 Nov 2010 10:58:17 -0400	[thread overview]
Message-ID: <20101104145817.GA27580@sigill.intra.peff.net> (raw)
In-Reply-To: <201011040149.47968.johan@herland.net>

On Thu, Nov 04, 2010 at 01:49:47AM +0100, Johan Herland wrote:

> 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 have often considered that something like that would be simpler, too.
But just specifying

  fetch = refs/tags/*:refs/remotes/$remote/tags/*

would pull down _all_ tags from the remote. Right now we only pull down
tags for things that we are actually fetching (i.e., auto-follow).

Now you could argue that auto-follow is not worth the effort. It is
somewhat confusing, and I can't think of a time when it ever actually
reduced the set of objects I was fetching (as opposed to just fetching
all tags). But maybe others have use cases where it matters.

> We would, for example, extend the ref disambiguation of <name> (as 
> documented in the "SPECIFYING REVISIONS" section of git-rev-parse(1)), so 
> that in the cases where <name> is of the form "<foo>/<bar>" AND <foo> is an 
> existing remote, we also check for the following refs (after none of the 
> existing checks have returned a match):
> 
>   7. refs/remotes/<foo>/tags/<bar>
>   8. refs/remotes/<foo>/heads/<bar>

This codifies that refs for remote $foo are in refs/remotes/$foo, which
is something we have avoided so far. For example, when finding the
"upstream" branch, we have the name of the remote and the merge branch,
look up the fetch refspecs in the config, and then figure out where that
branch would be fetched to. Which of course turns out as you say (as
remotes/$remote_name/$branch) in the default config, but we don't
restrict people to that.

-Peff

  parent reply	other threads:[~2010-11-04 14:57 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                   ` Tag refspecs (was Re: [PATCH] Remove restriction on notes ref base) Marc Branchaud
2010-11-05  1:02                     ` Johan Herland
2010-11-05 15:11                       ` Marc Branchaud
2010-11-04 14:58                   ` Jeff King [this message]
2010-11-05  1:29                     ` [PATCH] Remove restriction on notes ref base 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=20101104145817.GA27580@sigill.intra.peff.net \
    --to=peff@peff.net \
    --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).