Re: BUG when trying to delete symbolic refs
- From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Oct 18, 2012, 11:59 UTC
- Message-ID
- <507FEF0B.1060309@lsrfire.ath.cx>
- In-Reply-To
- <7vr4oytn4q.fsf@alter.siamese.dyndns.org>
Am 16.10.2012 18:09, schrieb Junio C Hamano:
Show 5 quoted lines
> Having said all that, I think your patch is going in the right > direction. If somebody had a symbolic ref in refs/heads/, the > removal should remove it, not the pointee, which may not even > exist. Does "branch -d sym" work correctly with your patch when > refs/heads/sym is pointing at something that does not exist?
No, it doesn't, neither with nor without the patch. But we can make it work, and also address a UI issue. This series starts with two patches that only move code around, then follows the patch you commented on, a patch addressing dangling symrefs and finally a change to the way deleted symrefs are reported by git branch.
branch: factor out check_branch_commit() branch: factor out delete_branch_config() branch: delete symref branch, not its target branch: skip commit checks when deleting symref branches branch: show targets of deleted symrefs, not sha1s
builtin/branch.c | 75 ++++++++++++++++++++++++++++++++++++------------------- t/t3200-branch.sh | 19 ++++++++++++++ 2 files changed, 68 insertions(+), 26 deletions(-)
-- 1.7.12