NoDefaultBranchException error regarding the default branch - this branch does not exist

その他

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

atlassian-stash.log に次のメッセージが表示される。

2013-01-16 09:36:06,547 ERROR [http-bio-8443-exec-13] XUE2 576x1711x1 hdxjye 10.16.214.10 "GET /projects/INFENG/repos/inspircd/browse HTTP/1.1" c.a.p.web.DefaultWebInterfaceManager Could not evaluate condition 'com.atlassian.plugin.web.conditions.AndCompositeCondition@3c9147c1' for descriptor: com.pirateninjaunicorn.stash.readme-parser:readmeParserTab (Tab in repository view)
com.atlassian.stash.exception.NoDefaultBranchException: refs/heads/master is set as the default branch, but this branch does not exist
...

原因

Some projects do not use "master" as their development branch, preferring to use "trunk" or "development" instead. Such repositories may not even have a "master" branch. However, git's default behavior is for HEAD to point to refs/heads/master, which results in a pretty unpleasant user experience when browsing a repository in Stash. When navigating to the "Files" or "Commits" tabs, Stash displays a warning indicating the default branch does not exist, and the user then has to go select a different branch. Setting the default branch allows Stash to display a useful initial branch, rather than a warning.

Setting the default branch in Stash has only limited control over what you will receive when you clone the repository, due to how git's wire protocol works. The real purpose of the feature is to allow users to control which branch is selected by default in the branch selector.

 

ソリューション

  • Navigate to the affected Repository.
  • Click on "Settings".
  • Under "General Settings" modify the "Default Branch" accordingly.

 

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.