git

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitService

type GitService struct {
	// contains filtered or unexported fields
}

GitService implements Git operations for the stevedore tool

func (*GitService) GetCommitHash

func (g *GitService) GetCommitHash() (string, error)

GetCommitHash returns the current HEAD commit hash

func (*GitService) GetCurrentUserEmail

func (g *GitService) GetCurrentUserEmail() string

GetCurrentUserEmail returns the current git user's email

func (*GitService) GetFileBlame

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

GetFileBlame retrieves git blame information for a file

func (*GitService) GetOrganization

func (g *GitService) GetOrganization() string

GetOrganization returns the git organization name

func (*GitService) GetRelativePath

func (g *GitService) GetRelativePath(absPath string) (string, error)

GetRelativePath computes the relative file path from the git root

func (*GitService) GetRemoteURL

func (g *GitService) GetRemoteURL() string

GetRemoteURL returns the git remote URL

func (*GitService) GetRepoName

func (g *GitService) GetRepoName() string

GetRepoName returns the repository name

type Service

type Service interface {
	GetCommitHash() (string, error)
	GetOrganization() string
	GetRepoName() string
	GetRelativePath(absPath string) (string, error)
	GetRemoteURL() string
	GetFileBlame(filePath string) (*git.BlameResult, error)
	GetCurrentUserEmail() string
}

Service defines the interface for Git operations

func NewGitService

func NewGitService(rootDir string) (Service, error)

NewGitService creates a new GitService instance by walking up the directory tree to find the git repository root

Jump to

Keyboard shortcuts

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