[BUG?] git remote rm repo nukes local refs for mirror repo
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Oct 14, 2008, 09:05 UTC
- Message-ID
- <48F460DB.9030209@drmicha.warpmail.net>
I just noticed the hard way that "git remote rm repo" nukes all local (mirrored) refs if repo had been setup with "git remote add --mirror repo url". Some may argue that this behaviour fits the description "deletes all remote tracking branches" but I would claim it does not: mirrored branches are not remote tracking branches in the proper sense.
So: - Is this behaviour intended? - If yes, how else would I remove a remote mirror configuration without destroying a local repo? git config, I know, but that can't be the way.
Michael
Technical: remote_find_tracking() in remote.c returns "branch" as the remote tracking branch of "branch" (itself) in a mirror setup. Is this the right thing to do?