From: Jeff King Date: Wed, 04 Feb 2009 16:18:25 GMT Subject: Re: [PATCH] builtin-remote: make rm operation safer in mirrored repository Message-ID: <20090204161825.GA9428@sigill.intra.peff.net> In-Reply-To: <1233763567-6155-1-git-send-email-jaysoffian@gmail.com> On Wed, Feb 04, 2009 at 11:06:07AM -0500, Jay Soffian wrote: > "git remote rm " is happy to remove non-remote refs (and their > reflogs in the case of branches). This may be okay if the repository truely is a mirror, but if the > user had done "git remote add --mirror " by accident and was just > undoing their mistake, then they are left in a situation that is difficult to > recover from. > > After this commit, "git remote rm" skips over non-remote refs. The user is > advised on how remove branches using "git branch -d", which itself has nice > safety checks wrt to branch removal lacking from "git remote rm". Non-remote > non-branch refs are skipped silently. > > Signed-off-by: Jay Soffian I like it. Acked-by: Jeff King -Peff