Re: [BUG?] git remote rm repo nukes local refs for mirror repo
- From
Samuel Tardieu <sam@rfc1149.net>
- Date
- Oct 14, 2008, 10:55 UTC
- Message-ID
- <2008-10-14-12-55-13+trackit+sam@rfc1149.net>
- In-Reply-To
- <alpine.DEB.1.00.0810141131130.22125@pacific.mpi-cbg.de.mpi-cbg.de>
Michael> I just noticed the hard way that "git remote rm repo" nukes Michael> all local (mirrored) refs if repo had been setup with "git Michael> remote add --mirror repo url". Some may argue that this Michael> behaviour fits the description "deletes all remote tracking Michael> branches" but I would claim it does not: mirrored branches Michael> are not remote tracking branches in the proper sense.
Johannes> Count me into the former group. If you set up a "--mirror" Johannes> repository, it defeats the purpose to mix that with _true_ Johannes> local branches.
IMO it should exit with an error and force to use "--force" to perform the operation. The scenario I envision is a mirror becoming the primary repository because the original source has disappeared. You would want to remove the now-useless reference to the source, and silently nuking all branches is wrong.
Sam
-- Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/