sourcerev

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 9 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 sourcerev reads the version-control revision of the directory a job runs from, so a run can record which code it executed. It supports jj and git; a jj repository colocated with git is read as jj, because git's HEAD there is the working-copy commit's parent.

Index

Constants

View Source
const Timeout = 30 * time.Second

Timeout bounds each version-control command.

Variables

This section is empty.

Functions

func Read

func Read(dir string) (model.SourceRevision, bool)

Read returns the revision of the repository containing dir, and false when dir is in no jj or git repository. Reading a jj repository snapshots its working copy, which records one jj operation, so the commit ID covers the files as they are now. A failure to read the revision is reported in the result's Error rather than dropped, so the record says the code is unknown.

func ReadAll

func ReadAll(dirs []string) model.RunSources

ReadAll reads the repositories containing dirs, once per repository, in the order their first directory appears.

Types

This section is empty.

Jump to

Keyboard shortcuts

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