jj

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package jj implements the jj (Jujutsu) VCS backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register()

Register registers the jj backend with the backend registry.

Types

type Backend

type Backend struct{}

Backend implements backend.Backend for jj repositories.

func (*Backend) Detect

func (*Backend) Detect(path string) (bool, error)

Detect returns true if path contains a .jj directory.

func (*Backend) Name

func (*Backend) Name() string

Name returns the backend identifier "jj".

func (*Backend) Priority

func (*Backend) Priority() int

Priority returns the jj detection priority.

func (*Backend) Run

func (*Backend) Run(
	ctx context.Context,
	path string,
	args []string,
	interactive bool,
) (backend.RunResult, error)

Run executes jj args in path. Multi-step ops (pull, etc.) run each step sequentially, stopping on the first failure.

func (*Backend) Status

func (*Backend) Status(ctx context.Context, path string) (backend.RepoStatus, error)

Status queries jj for the current change, all local bookmark tracking states, working-copy cleanliness, and conflicts.

Subprocess calls:

  1. jj log -r @ → change ID, dirty flag, conflict flag
  2. jj bookmark list --all-remotes <head> → structured bookmark tracking data
  3. jj bookmark list --all-remotes + jj log ×2 (only when HEAD bookmark has no tracking remote but a @remote counterpart exists — colocated repos)

func (*Backend) SubcommandArgs added in v0.3.0

func (*Backend) SubcommandArgs(op string) []string

Jump to

Keyboard shortcuts

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