Class GitDetachedHeadException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.atlassian.bitbucket.ServiceException
com.atlassian.bitbucket.scm.git.GitException
com.atlassian.bitbucket.scm.git.GitDetachedHeadException
All Implemented Interfaces:
Serializable

public class GitDetachedHeadException extends GitException
Exception thrown to indicate the bare clone backing a repository has a detached HEAD, which is an unsupported configuration.

Note: The only way the bare clone backing a repository can end up in a detached HEAD state is if it is directly modified on disk. The system will never produce this configuration during normal operation.

See Also:
  • Constructor Details

    • GitDetachedHeadException

      public GitDetachedHeadException(com.atlassian.bitbucket.i18n.KeyedMessage message, String commitId)
  • Method Details

    • getCommitId

      @Nullable public String getCommitId()
      Retrieves the ID of the commit referenced by the detached head.
      Returns:
      the detached commit ID