tdroot

package
v0.74.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tdroot provides utilities for resolving td's root directory and database paths. It handles the .td-root file mechanism used to share a td database across git worktrees.

Index

Constants

View Source
const (
	// TDRootFile is the filename used to link a worktree to a shared td root.
	TDRootFile = ".td-root"
	// TodosDir is the directory containing td's database and related files.
	TodosDir = ".todos"
	// DBFile is the filename of td's SQLite database.
	DBFile = "issues.db"
)

Variables

This section is empty.

Functions

func CreateTDRoot

func CreateTDRoot(worktreePath, targetRoot string) error

CreateTDRoot writes a .td-root file pointing to targetRoot. Used when creating worktrees to share the td database.

func ResolveDBPath

func ResolveDBPath(workDir string) string

ResolveDBPath returns the full path to the td database. Uses .td-root resolution to find the correct database location.

func ResolveTDRoot

func ResolveTDRoot(workDir string) string

ResolveTDRoot reads .td-root file and returns the resolved root path. Returns workDir if no .td-root exists or it's empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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