Git repository indexing fails because it cannot delete the branch which you are currently on

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

The following appears in the atlassian-fisheye.log:

2013-04-04 17:14:08,986 ERROR - Error removing local branch: [error: Cannot delete the branch 'the_branch_name' which you are currently on.]
com.atlassian.utils.process.ProcessException: While executing: "git branch -D the_branch_name " in [/opt/fisheye/FISHEYE_INST/var/cache/REPO_NAME/clone]
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:262)
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:254)
at com.atlassian.fisheye.git.GitScanner.removeLocalBranch(GitScanner.java:225)
at com.atlassian.fisheye.git.GitScanner.fetchLatest(GitScanner.java:202)
at com.atlassian.fisheye.dvcs.DvcsScanner.updateClone(DvcsScanner.java:153)
at com.atlassian.fisheye.dvcs.DvcsScanner.updateLocalRepoCache(DvcsScanner.java:140)
at com.cenqua.fisheye.rep.BaseRepositoryScanner.ping(BaseRepositoryScanner.java:175)
at com.cenqua.fisheye.rep.BaseRepositoryEngine.doSlurp(BaseRepositoryEngine.java:92)
at com.cenqua.fisheye.rep.RepositoryEngine.slurp(RepositoryEngine.java:382)
at com.cenqua.fisheye.rep.ping.OneOffPingRequest.doRequest(OneOffPingRequest.java:28)
at com.cenqua.fisheye.rep.ping.PingRequest.process(PingRequest.java:58)
at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(RepositoryHandle.java:198)
at com.cenqua.fisheye.rep.RepositoryHandle.access$100(RepositoryHandle.java:50)
at com.cenqua.fisheye.rep.RepositoryHandle$2.run(RepositoryHandle.java:156)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 1
at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:83)
at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:308)
at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:351)
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:259)

Cause

Fisheye is not aware of some commits that have been deleted from one of the repositories. The repository can be identified from the path in the error message, for example in the above stacktrace, the repository is REPO_NAME.

Resolution

A re-clone and re-index of the repository is required. This can be done by performing the following:

  1. Navigate to Administration >> Repository Settings >> Repositories
  2. Select the repository that is affected to bring up the repository Summary Page
  3. Select Maintenance on the left.
  4. Next to Re-clone and Re-index, click on the Start button

This will have Fisheye to re-index all contents related to that repository.

(info) Depending on the size of the repository it may take a lot of time so it is recommended to perform this outside of business hours.

Last modified on Jul 31, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.