26 pageSize = 30
27 }
28
29 gitRepo, err := git.Open(c.Repo.Repository.RepoPath()) 30 if err != nil {
31 c.Error(err, "open repository")
32 return
78}
79
80func GetReferenceSHA(c *context.APIContext) {
81 gitRepo, err := git.Open(c.Repo.Repository.RepoPath()) 82 if err != nil {
83 c.Error(err, "open repository")
84 return
154 URL: conf.Server.ExternalURL + c.Link[1:],
155 SHA: commit.ID.String(),
156 },
157 HTMLURL: c.Repo.Repository.HTMLURL() + "/commits/" + commit.ID.String(),158 RepoCommit: &api.RepoCommit{
159 URL: conf.Server.ExternalURL + c.Link[1:],
160 Author: &api.CommitUser{
59 return
60 }
61
62 gitRepo, err := git.Open(c.Repo.Repository.RepoPath()) 63 if err != nil {
64 c.Error(err, "open repository")
65 return
541 Modified: nameStatus.Modified,
542 },
543 },
544 Repo: c.Repo.Repository.APIFormatLegacy(nil),545 Pusher: apiUser,
546 Sender: apiUser,
547 }
Sometimes a function, variable, constant, field, or whole package becomes redundant or unnecessary but must be kept for compatibility with existing programs. These should not be used except for compatibility with legacy systems.