gitservice

package
v0.0.0-...-c6a0b50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGitUserEmail

func GetGitUserEmail() string

func GetPreviousBlameResult

func GetPreviousBlameResult(gitSvc *GitService, filePath string) (*git.BlameResult, *object.Commit)

Types

type GitBlame

type GitBlame struct {
	GitOrg        string
	GitRepository string
	BlamesByLine  map[int]*git.Line
	FilePath      string
	GitUserEmail  string
}

func NewGitBlame

func NewGitBlame(relativeFilePath string, filePath string, lines structure.Lines, blameResult *git.BlameResult, gitSvc *GitService) *GitBlame

func (*GitBlame) GetLatestCommit

func (g *GitBlame) GetLatestCommit() (latestCommit *git.Line)

type GitService

type GitService struct {
	BlameByFile         *sync.Map
	PreviousBlameByFile *sync.Map
	// contains filtered or unexported fields
}

func NewGitService

func NewGitService(rootDir string) (*GitService, error)

func (*GitService) ComputeRelativeFilePath

func (g *GitService) ComputeRelativeFilePath(fp string) string

func (*GitService) GetBlameForFileLines

func (g *GitService) GetBlameForFileLines(filePath string, lines structure.Lines) (*GitBlame, error)

func (*GitService) GetFileBlame

func (g *GitService) GetFileBlame(filePath string) (*git.BlameResult, error)

func (*GitService) GetOrganization

func (g *GitService) GetOrganization() string

func (*GitService) GetRepoName

func (g *GitService) GetRepoName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL