git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Brian Gernhardt <benji@silverinsanity.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: git remote rm non-existant-remote
Date: Sun, 28 Jun 2009 12:11:41 -0400	[thread overview]
Message-ID: <20090628161141.GA7796@sigio.peff.net> (raw)
In-Reply-To: <540FF00B-9DE7-4C89-9EC3-264B5BDD9CDE@silverinsanity.com>

On Sun, Jun 28, 2009 at 10:47:23AM -0400, Brian Gernhardt wrote:

> I was working on updating the remotes for one of my repositories
> (adding a variety of forks) and renamed the origin branch.  When I
> was done, I tried to use "git remote rm origin" to remove the
> branches for the now dead origin.  What git-remote did was remove all
> of my remotes and the merge information for my master branch (which
> was moved off the origin remote).
> 
> This is a data loss bug.  Very bad.  `git remote rm` should either
> refuse to remove a non-existent remote or (preferably) simply remove
> any branches that exist for that remote.

Ouch. That is indeed a serious bug. However, I can't reproduce with
current 'next'; which version of git are you using?

> When time allows I'll look into fixing this, but I thought I'd post
> in case somebody had more tuits than me this week.

I think it would be nice to have it delete partial cruft left over, but
I suspect just changing it to refuse the deletion will be a one-liner.
It would be nice to get at least that out to 'maint' branches as
appropriate.

-Peff

  reply	other threads:[~2009-06-28 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-28 14:47 git remote rm non-existant-remote Brian Gernhardt
2009-06-28 16:11 ` Jeff King [this message]
2009-06-28 23:04   ` Brian Gernhardt
2009-06-29 16:38     ` Jeff King

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=20090628161141.GA7796@sigio.peff.net \
    --to=peff@peff.net \
    --cc=benji@silverinsanity.com \
    --cc=git@vger.kernel.org \
    /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).