diff options
author | Jay Soffian <jaysoffian@gmail.com> | 2009-02-04 11:06:07 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-04 08:47:57 -0800 |
commit | 441adf0ccf571a9fe15658fdfcd856d2aabc01cb (patch) | |
tree | a62a0da5285f95c265e33329929d8a62b7fa4ec9 /t/t6002-rev-list-bisect.sh | |
parent | builtin-remote: make rm() use properly named variable to hold return value (diff) | |
download | tgif-441adf0ccf571a9fe15658fdfcd856d2aabc01cb.tar.xz |
builtin-remote: make rm operation safer in mirrored repository
"git remote rm <repo>" happily removes non-remote refs and their reflogs.
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>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6002-rev-list-bisect.sh')
0 files changed, 0 insertions, 0 deletions