Setting a valid HEAD on your Git repository
Symptoms
Fisheye fails to map your Git committers to Fisheye users automatically and the following error message or similar is logged:
2011-09-09 11:50:13,493 WARN [InitialPinger1 git-ant-2] fisheye.app GitScanner-updateMailMap - Could not create .mailmap file for git repository 'my-repository'. Committers will not be mapped.
com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: fatal: Not a valid object name HEAD
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:214)
at com.atlassian.fisheye.git.GitScanner.updateMailMap(GitScanner.java:242)
at com.atlassian.fisheye.git.GitScanner.slurpCommits(GitScanner.java:934)
at com.atlassian.fisheye.dvcs.DvcsScanner.processBranch(DvcsScanner.java:401)
at com.atlassian.fisheye.dvcs.DvcsScanner.processRevisions(DvcsScanner.java:254)
at com.cenqua.fisheye.rep.BaseRepositoryScanner.slurpRepository(BaseRepositoryScanner.java:255)
at com.cenqua.fisheye.rep.BaseRepositoryScanner.doSlurpTransaction(BaseRepositoryScanner.java:223)
at com.cenqua.fisheye.rep.BaseRepositoryScanner.ping(BaseRepositoryScanner.java:182)
at com.cenqua.fisheye.rep.BaseRepositoryEngine.doSlurp(BaseRepositoryEngine.java:92)
at com.cenqua.fisheye.rep.RepositoryEngine.slurp(RepositoryEngine.java:379)
at com.cenqua.fisheye.rep.ping.OneOffPingRequest.doRequest(OneOffPingRequest.java:28)
at com.cenqua.fisheye.rep.ping.PingRequest.process(PingRequest.java:67)
at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(RepositoryHandle.java:138)
at com.cenqua.fisheye.rep.RepositoryHandle.queuePingRequest(RepositoryHandle.java:128)
at com.cenqua.fisheye.rep.ping.PingRequest.run(PingRequest.java:33)
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:619)
Caused by: com.atlassian.utils.process.ProcessException: While executing: "git ls-tree HEAD – .mailmap "
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.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:212)
... 17 more
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
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)
... 19 more
Cause
The Not a valid object name HEAD
in the message above indicates that your Git HEAD ref is invalid. This means that Fisheye can't determine the revision of the .mailmap
file to use to map your committers.
You can check what your repository's HEAD is currently referencing this by running the following command on the command line from within the git repository being indexed by Fisheye.
git symbolic-ref HEAD
Resolution
To fix this issue, you'll need to update your repository's HEAD to a valid ref, e.g.:
git symbolic-ref HEAD refs/heads/my-branch
Where my-branch is the "default" branch of your repository. This is usually the master, default
or trunk
branch of your repository.
You will then need to re-index your repository.