ソースを参照

Return errors instead of just logging them.

tags/v0.9.99
Josh Frye 8年前
コミット
7f2733fa1b
1個のファイルの変更2行の追加4行の削除
  1. 2
    4
      models/repo.go

+ 2
- 4
models/repo.go ファイルの表示

@@ -676,13 +676,11 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
// Try to get HEAD branch and set it as default branch.
gitRepo, err := git.OpenRepository(repoPath)
if err != nil {
log.Error(4, "OpenRepository: %v", err)
return repo, nil
return repo, fmt.Errorf("OpenRepository: %v", err)
}
headBranch, err := gitRepo.GetHEADBranch()
if err != nil {
log.Error(4, "GetHEADBranch: %v", err)
return repo, nil
return repo, fmt.Errorf("GetHEADBranch: %v", err)
}
if headBranch != nil {
repo.DefaultBranch = headBranch.Name

読み込み中…
キャンセル
保存