0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-14 22:55:32 +01:00

fix lint and typos

This commit is contained in:
badhezi 2025-05-14 15:18:18 +03:00
parent 35d23765e2
commit ed642599e8
3 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ func (repo *Repository) GetTreePathLatestCommit(refName, treePath string) (*Comm
return repo.GetCommit(strings.TrimSpace(stdout))
}
// rev-parse parses the output of `git rev-parse` command
// RevParse resolves a revision reference to other git-related objects
func (repo *Repository) RevParse(ref, file string) (string, error) {
stdout, _, err := NewCommand("rev-parse").
AddDynamicArguments(ref+":"+file).

View File

@ -236,7 +236,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
if infoPath == "" {
infos = []string{baseRepo.DefaultBranch, baseRepo.DefaultBranch}
} else {
// check if head is a branch or tag on ly infoPath ends with .diff or .patch
// check if head is a branch or tag only if infoPath ends with .diff or .patch
if strings.HasSuffix(infoPath, ".diff") || strings.HasSuffix(infoPath, ".patch") {
infos = strings.SplitN(infoPath, "...", 2)
if len(infos) != 2 {