Skip to content

Commit afae382

Browse files
committed
fix lint and typos
1 parent 72b2ff1 commit afae382

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

modules/git/tree.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (repo *Repository) GetTreePathLatestCommit(refName, treePath string) (*Comm
7474
return repo.GetCommit(strings.TrimSpace(stdout))
7575
}
7676

77-
// rev-parse parses the output of `git rev-parse` command
77+
// RevParse resolves a revision reference to other git-related objects
7878
func (repo *Repository) RevParse(ref, file string) (string, error) {
7979
stdout, _, err := NewCommand("rev-parse").
8080
AddDynamicArguments(ref+":"+file).

routers/web/repo/compare.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
234234
if infoPath == "" {
235235
infos = []string{baseRepo.DefaultBranch, baseRepo.DefaultBranch}
236236
} else {
237-
// check if head is a branch or tag on ly infoPath ends with .diff or .patch
237+
// check if head is a branch or tag only if infoPath ends with .diff or .patch
238238
if strings.HasSuffix(infoPath, ".diff") || strings.HasSuffix(infoPath, ".patch") {
239239
infos = strings.SplitN(infoPath, "...", 2)
240240
if len(infos) != 2 {

templates/repo/diff/options_dropdown.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{else if .Commit.ID.String}}
1111
<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.patch" download="{{ShortSha .Commit.ID.String}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
1212
<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.diff" download="{{ShortSha .Commit.ID.String}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
13-
{{else if $.PageIsCompareDiff }}
13+
{{else if $.PageIsCompareDiff}}
1414
<a class="item" href="{{$.Link}}.patch" download="{{$.BaseBranch}}...{{$.HeadBranch}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
1515
<a class="item" href="{{$.Link}}.diff" download="{{$.BaseBranch}}...{{$.HeadBranch}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
1616
{{end}}

0 commit comments

Comments
 (0)