Re: [PATCH] builtin-remote: make rm operation safer in mirrored repository
On Wed, Feb 04, 2009 at 11:06:07AM -0500, Jay Soffian wrote:
Show 12 quoted lines
> "git remote rm <repo>" 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 <repo>" 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 <jaysoffian@gmail.com>
I like it.
Acked-by: Jeff King <peff@peff.net>
-Peff