"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/code.gitea.io/sdk/gitea/repo_file.go" between
gitea-1.13.1.tar.gz and gitea-1.13.2.tar.gz

About: Gitea allows to set up a self-hosted code hosting Git service (a fork of Gogs).

repo_file.go  (gitea-1.13.1):repo_file.go  (gitea-1.13.2)
skipping to change at line 185 skipping to change at line 185
} }
if status != 200 && status != 204 { if status != 200 && status != 204 {
return resp, fmt.Errorf("unexpected Status: %d", status) return resp, fmt.Errorf("unexpected Status: %d", status)
} }
return resp, nil return resp, nil
} }
func (c *Client) setDefaultBranchForOldVersions(owner, repo, branch string) (str ing, error) { func (c *Client) setDefaultBranchForOldVersions(owner, repo, branch string) (str ing, error) {
if len(branch) == 0 { if len(branch) == 0 {
// Gitea >= 1.12.0 Use DefaultBranch on "", mimic this for older versions // Gitea >= 1.12.0 Use DefaultBranch on "", mimic this for older versions
if c.CheckServerVersionConstraint(">=1.12.0") != nil { if c.checkServerVersionGreaterThanOrEqual(version1_12_0) != nil {
r, _, err := c.GetRepo(owner, repo) r, _, err := c.GetRepo(owner, repo)
if err != nil { if err != nil {
return "", err return "", err
} }
return r.DefaultBranch, nil return r.DefaultBranch, nil
} }
} }
return branch, nil return branch, nil
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)