Skip to content

Commit 6dec1f5

Browse files
fix list branches
Signed-off-by: stoneshi-yunify <stoneshi@kubesphere.io>
1 parent f39db97 commit 6dec1f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • pkg/kapis/devops/v1alpha3/gitops

pkg/kapis/devops/v1alpha3/gitops/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ func (s *gitRepoService) ListBranches(ctx context.Context, input *ListBranchesIn
737737
hash = head.Hash()
738738
}
739739
commit, err := s.repo.CommitObject(hash)
740-
if err != nil {
740+
if err != nil && !errors.Is(err, plumbing.ErrObjectNotFound) {
741741
return nil, err
742742
}
743743
branch := &BranchInfo{

0 commit comments

Comments
 (0)