mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 22:04:41 +00:00
Fix issues found by godot linter
This commit is contained in:
@@ -65,7 +65,7 @@ func Clone(opts *CloneOpts) (*Repo, error) {
|
||||
return Repo, err
|
||||
}
|
||||
|
||||
// Fetch preforms a git fetch on all remotes
|
||||
// Fetch preforms a git fetch on all remotes.
|
||||
func (r *Repo) Fetch() error {
|
||||
err := run.Git("fetch", "--all").OnRepo(r.path).AndShutUp()
|
||||
return err
|
||||
|
||||
@@ -160,22 +160,22 @@ func (s *Status) Branches() []string {
|
||||
return branches
|
||||
}
|
||||
|
||||
// BranchStatus returns status of a given branch
|
||||
// BranchStatus returns status of a given branch.
|
||||
func (s *Status) BranchStatus(branch string) string {
|
||||
return s.branches[branch]
|
||||
}
|
||||
|
||||
// WorkTreeStatus returns status of a worktree
|
||||
// WorkTreeStatus returns status of a worktree.
|
||||
func (s *Status) WorkTreeStatus() string {
|
||||
return s.worktree
|
||||
}
|
||||
|
||||
// Remote returns URL to remote repository
|
||||
// Remote returns URL to remote repository.
|
||||
func (s *Status) Remote() string {
|
||||
return s.remote
|
||||
}
|
||||
|
||||
// Errors is a slice of errors that occurred when loading repo status
|
||||
// Errors is a slice of errors that occurred when loading repo status.
|
||||
func (s *Status) Errors() []string {
|
||||
return s.errors
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ func checkFatal(t *testing.T, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
// removeTestDir removes a test directory
|
||||
// removeTestDir removes a test directory.
|
||||
func removeTestDir(t *testing.T, dir string) {
|
||||
// Skip cleanup on Windows to avoid file locking issues in CI
|
||||
// The CI runner environment is destroyed after tests anyway
|
||||
|
||||
@@ -172,7 +172,7 @@ func RepoWithBranchAheadAndBehind(t *testing.T) *Repo {
|
||||
return r
|
||||
}
|
||||
|
||||
// RepoWithEmptyConfig creates a git repo with empty .git/config file
|
||||
// RepoWithEmptyConfig creates a git repo with empty .git/config file.
|
||||
func RepoWithEmptyConfig(t *testing.T) *Repo {
|
||||
r := RepoEmpty(t)
|
||||
r.writeFile(filepath.Join(".git", "config"), "")
|
||||
@@ -180,7 +180,7 @@ func RepoWithEmptyConfig(t *testing.T) *Repo {
|
||||
return r
|
||||
}
|
||||
|
||||
// RepoWithValidConfig creates a git repo with valid content in .git/config file
|
||||
// RepoWithValidConfig creates a git repo with valid content in .git/config file.
|
||||
func RepoWithValidConfig(t *testing.T) *Repo {
|
||||
r := RepoEmpty(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user