git

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 12 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

Overview

Package git is the git adapter of the version-control interface: it reads the history of a git repository for Physa through the git command. A Repo only reads. Writes go only through a Writer, for learning's branch: it fetches from origin, makes isolated working copies under Physa's store, moves a branch by compare-and-swap and pushes with a lease. It never changes the person's working copy, index or checked-out branch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Email

func Email(dir string) (string, error)

Email reads user.email from every scope git reads, for the repository at dir or outside any. It is "" with no error when unset: git config exits 1, printing nothing. It never reads user.name.

func Open

func Open(dir string) (vcs.Repo, error)

Open returns the repository that contains dir. It returns vcs.ErrNotRepo when dir is not in one, and a wrapped error when git cannot run.

func OpenHooks

func OpenHooks(dir string) (vcs.Hooks, error)

OpenHooks returns the hooks of the repository that contains dir. Its errors are Open's.

func OpenWriter

func OpenWriter(dir string) (vcs.Writer, error)

OpenWriter returns the repository that contains dir, able to write learning's branch. Its errors are Open's.

Types

This section is empty.

Jump to

Keyboard shortcuts

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