diff --git a/modules/git/tree.go b/modules/git/tree.go index ac87e3259b..9135a1edc9 100644 --- a/modules/git/tree.go +++ b/modules/git/tree.go @@ -74,7 +74,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). diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index a206f8deb6..351236ac29 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -234,7 +234,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 { diff --git a/templates/repo/diff/options_dropdown.tmpl b/templates/repo/diff/options_dropdown.tmpl index a8a6c2ac10..03519165db 100644 --- a/templates/repo/diff/options_dropdown.tmpl +++ b/templates/repo/diff/options_dropdown.tmpl @@ -10,7 +10,7 @@ {{else if .Commit.ID.String}} {{ctx.Locale.Tr "repo.diff.download_patch"}} {{ctx.Locale.Tr "repo.diff.download_diff"}} - {{else if $.PageIsCompareDiff }} + {{else if $.PageIsCompareDiff}} {{ctx.Locale.Tr "repo.diff.download_patch"}} {{ctx.Locale.Tr "repo.diff.download_diff"}} {{end}}