gitview

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactCommit

type ArtifactCommit struct {
	Sha1      string   `json:"sha1"`
	Message   string   `json:"message"`
	Author    string   `json:"author"`
	Timestamp int64    `json:"timestamp"`
	Branch    string   `json:"branch"`
	Parents   []string `json:"parents"`
}

type GitView

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

GitView A read-only view of a git repository.

func New

func New(repositoryRoot string) (*GitView, error)

func (*GitView) BranchName

func (gv *GitView) BranchName() (string, error)

BranchName returns the current branch name on a repository, or an error if the repo head is not on a branch

func (*GitView) ChangeLog

func (gv *GitView) ChangeLog(currentCommit, previousCommit string, logger *logger.Logger) ([]*ArtifactCommit, error)

func (*GitView) CommitsBetween

func (gv *GitView) CommitsBetween(oldest, newest string, logger *logger.Logger) ([]*ArtifactCommit, error)

CommitsBetween list all commits that have happened between two commits in a git repo

func (*GitView) RepoUrl

func (gv *GitView) RepoUrl() (string, error)

RepoUrl returns HTTPS URL for the `origin` remote of a repo

Jump to

Keyboard shortcuts

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