gitinspect

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inspector

type Inspector struct {
	Run gitrun.Runner
}

Inspector performs read-only git inspection in a repository directory.

func NewInspector

func NewInspector(cred auth.Credential) *Inspector

NewInspector returns an inspector with the given credentials.

func (*Inspector) OriginURL

func (in *Inspector) OriginURL(ctx context.Context, dir string) (string, error)

OriginURL returns the origin remote URL when present.

func (*Inspector) WorktreeStatus

func (in *Inspector) WorktreeStatus(ctx context.Context, dir string) ([]string, error)

WorktreeStatus returns porcelain status lines (empty when clean).

type RemoteRef

type RemoteRef struct {
	Host string // github | gitlab
	Path string // owner/repo (no .git)
}

RemoteRef is a forge identity parsed from a git remote URL.

func ParseRemoteURL

func ParseRemoteURL(raw string) (RemoteRef, bool)

ParseRemoteURL maps common GitHub/GitLab clone URLs to host+path.

Jump to

Keyboard shortcuts

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