git

package
v0.0.0-...-3473513 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RepositoryIsShallow

func RepositoryIsShallow(cfg *config.Config) bool

RepositoryIsShallow check if the ProjectPath is a shallow repository. A shallow repository is when a repository was cloned using the --depth=N where N is the number of commits that should be cloned.

This git functionality is commonly used by CIs to clone the repository.

For more read https://www.git-scm.com/docs/shallow

Types

type CommitAuthor

type CommitAuthor struct {
	Author     string `json:"author"`
	Email      string `json:"email"`
	CommitHash string `json:"commitHash"`
	Message    string `json:"message"`
	Date       string `json:"date"`
}

CommitAuthor contains commit author information to a given file and line.

type Git

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

func New

func New(cfg *config.Config) *Git

func (*Git) CommitAuthor

func (g *Git) CommitAuthor(line, filePath string) CommitAuthor

Jump to

Keyboard shortcuts

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