diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-01-24 17:14:46 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-24 17:14:46 (GMT) |
commit | c6e19e47a60c0174f805db8e1624db38ff889523 (patch) | |
tree | 5528f62eb204380d4586f83653d0382c640c0c2b /builtin | |
parent | 7ea759cf9b8a4789e6fb3d12b618b3b9a005765a (diff) | |
parent | 519947b69a9ea1461d5f5afc762823835295b3b2 (diff) | |
download | git-c6e19e47a60c0174f805db8e1624db38ff889523.zip git-c6e19e47a60c0174f805db8e1624db38ff889523.tar.gz git-c6e19e47a60c0174f805db8e1624db38ff889523.tar.bz2 |
Merge branch 'ab/checkout-branch-info-leakfix'
We added an unrelated sanity checking that leads to a BUG() while
plugging a leak, which triggered in a repository with symrefs in
the local branch namespace that point at a ref outside. Partially
revert the change to avoid triggering the BUG().
* ab/checkout-branch-info-leakfix:
checkout: avoid BUG() when hitting a broken repository
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/checkout.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 0bc2e63..cc804ba 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1094,9 +1094,6 @@ static int switch_branches(const struct checkout_opts *opts, const char *p; if (skip_prefix(old_branch_info.path, prefix, &p)) old_branch_info.name = xstrdup(p); - else - BUG("should be able to skip past '%s' in '%s'!", - prefix, old_branch_info.path); } if (opts->new_orphan_branch && opts->orphan_from_empty_tree) { |