# Doctor: Unable to get merge base for closed PR with deleted branch

**URL:** <https://forum.gitea.com/t/doctor-unable-to-get-merge-base-for-closed-pr-with-deleted-branch/8229>\
**Category:** Gitea Usages\
**Created:** [December 1, 2023, 8:59am UTC](https://forum.gitea.com/t/doctor-unable-to-get-merge-base-for-closed-pr-with-deleted-branch/8229 "2023-12-01T08:59:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TJvV](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@TJvV](https://forum.gitea.com/u/TJvV)\
**Post date:** [December 1, 2023, 8:59am UTC](https://forum.gitea.com/t/doctor-unable-to-get-merge-base-for-closed-pr-with-deleted-branch/8229/1 "2023-12-01T08:59:24Z")

</div>

Hi,

I am looking into upgrading my gitea instance (running in docker, backed by postgres).

To ensure everything goes smoothly, I ran `docker-compose exec --user git gitea gitea doctor --all`.  
This gives me a number of warnings for closed Pull Requests where the branch has been deleted.  
These warnings take the form of

```auto
[W] Unable to get merge base for PR ID <pr_id>, #<pr_number> onto <branch> in <repo>. Error exit status 128 - fatal: Not a valid object name <branch>
  - fatal: Not a valid object name <branch>
  & exit status 128 - fatal: ambiguous argument 'refs/heads/<branch>': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
  - fatal: ambiguous argument 'refs/heads/<branch>': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

```

It’s still possible to view the pull requests on the site, but obviously the source and target branch links are broken.  
It also shows " This pull request cannot be reopened because the branch was deleted. " as expected.

It’s very easy to lose track of actual issues because of all these reports.  
Is there a way to make `gitea doctor` accept these kinds of pull request?
