git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Tom Lambda <tom.lambda@gmail.com>, git@vger.kernel.org
Subject: Re: Question regarding git fetch
Date: Thu, 27 Aug 2009 17:22:55 +0000	[thread overview]
Message-ID: <32541b130908271022i6a825198i37e2ec82ed5f833c@mail.gmail.com> (raw)
In-Reply-To: <20090827164657.GA17090@atjola.homenet>

2009/8/27 Björn Steinbrink <B.Steinbrink@gmx.de>:
> It would also be pretty hard to implement that. Given the default fetch
> refspec, it would "simply" be a matter of mapping the given ref to the
> refspec, so e.g. "foo" becomes "refs/heads/foo:refs/remotes/origin/foo".
> But even just using "git remote add -t master foo git://..." breaks
> that, as the fetch refspec in the config will no longer be a glob, and
> thus no such mapping is possible.

Hmm, I don't really see why that introduces a problem.  If you use -t
to override explicitly which refs you want to save, then it's not a
problem if git doesn't save other refs, right?

I'd be more concerned about the inconsistency between

   git fetch git://whatever master
and
   git fetch origin master

There's no really good way for the first one to know it needs to
update any branches, even though 'origin' might be an alias for
git://whatever.  So users will still be confused.

Thinking of that also reminds me of another surprise.  If you do:

   git fetch git://whatever

...it seems to do nothing at all, as far as I can see.  Which makes
sense, I guess, since I wouldn't really expect it to be meaningful.
But it seems to connect up to the remote server anyway just in case.

I suppose I have no useful suggestions here, other than an
interpretation of why users find the current behaviour confusing.

Have fun,

Avery

  reply	other threads:[~2009-08-27 17:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 15:30 Question regarding git fetch Tom Lambda
2009-08-27 15:36 ` Avery Pennarun
2009-08-27 16:21   ` Eric Raible
2009-08-27 16:28     ` Avery Pennarun
2009-08-27 16:46   ` Björn Steinbrink
2009-08-27 17:22     ` Avery Pennarun [this message]
2009-08-27 20:48       ` Jeff King
2009-08-27 21:34         ` Jeff King
2009-08-27 21:44           ` Junio C Hamano
2009-08-27 21:50             ` Jeff King
2009-08-27 21:53               ` Jeff King
2009-08-27 22:12               ` Avery Pennarun
2009-08-27 22:16                 ` Jeff King
2009-08-27 22:24                   ` Avery Pennarun
2009-08-27 21:20   ` Junio C Hamano
2009-08-27 21:39     ` Jeff King
2009-08-28 13:24 ` Tom Lambda

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=32541b130908271022i6a825198i37e2ec82ed5f833c@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=B.Steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=tom.lambda@gmail.com \
    /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).