git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] remote: "rename o foo" should not rename ref "origin/bar"
Date: Fri, 2 Sep 2011 11:55:21 -0400	[thread overview]
Message-ID: <20110902155521.GA19690@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1109012022110.7267@debian>

On Thu, Sep 01, 2011 at 08:35:01PM -0400, Martin von Zweigbergk wrote:

> > To be totally correct, shouldn't this check each ref against the RHS of
> > the remote's old refspec, and rename it according to the remote's new
> > refspec?
> 
> That's what I thought too, but was planning on leaving it for a
> separate patch. However, after changing patch 1 to only update the
> fetch refspecs from "refs/remotes/$OLD" to "refs/remotes/$NEW", there
> is no other place in the fetchspec where a remote name can occur and
> 'git remote rename' still understands it. So since we're now being
> more conservative about updating refspecs, I guess we need to be
> equally conservative about updating ref names.

Yeah, I think with the change in patch 1, your patch 2 is very
reasonable. It is admitting that "git remote" is really about tweaking
the default remote config, and punting on config that doesn't appear to
follow it. And doing it consistently. I don't think there's nothing
wrong with that.

-Peff

  reply	other threads:[~2011-09-02 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01  1:50 [PATCH 1/2] remote: write correct fetch spec when renaming remote 'remote' Martin von Zweigbergk
2011-09-01  1:50 ` [PATCH 2/2] remote: "rename o foo" should not rename ref "origin/bar" Martin von Zweigbergk
2011-09-01  2:46   ` Jeff King
2011-09-02  0:35     ` Martin von Zweigbergk
2011-09-02 15:55       ` Jeff King [this message]
2011-09-01  2:42 ` [PATCH 1/2] remote: write correct fetch spec when renaming remote 'remote' Jeff King
2011-09-01  3:18   ` Junio C Hamano
2011-09-02  0:02   ` Martin von Zweigbergk

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=20110902155521.GA19690@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.von.zweigbergk@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).