homeignore

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 5 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 homeignore keeps abcd's home out of a git repository in the person's home folder (itd-2610140858048004, adr-2610140859394097).

abcd keeps machine-scoped records in ~/.abcd.noindex: redacted transcripts, private ideate verdicts, run state, labs, backups. A person whose home is a dotfiles repository would stage every one of them with an ordinary `git add -A`. Lay puts a .gitignore holding `*` inside abcd's own folder, which git applies to every path beneath it, so the folder keeps itself out without abcd reading, running or changing anything of the person's repository.

It is laid ONCE. A marker beside it records the lay, and while the marker stands Lay does nothing, so a person who deletes the .gitignore to let their home repository track abcd's home has made a deliberate choice abcd never undoes. A .gitignore the person already keeps there is never overwritten.

The credential store does not rest on this file: it refuses the abcd home inside any git working tree whatever the file says (adr-2610140859394097).

Index

Constants

View Source
const (
	// IgnoreName is the ignore file laid in abcd's home.
	IgnoreName = ".gitignore"
	// MarkerName records that abcd laid IgnoreName, so a deleted ignore file
	// is never laid again.
	MarkerName = "gitignore-laid"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Outcome

type Outcome int

Outcome is what one Lay did.

const (
	// NoHome: abcd's home does not exist yet, so nothing was laid; the
	// command that creates it is followed by another lay.
	NoHome Outcome = iota
	// AlreadyLaid: the marker stands, so nothing was written.
	AlreadyLaid
	// Laid: the ignore file and the marker were written.
	Laid
	// KeptExisting: the person already keeps an ignore file there; it was
	// left as it is and the marker was written beside it.
	KeptExisting
)

func Lay

func Lay(home string) (Outcome, error)

Lay makes sure the ignore file has been laid in abcd's home under home. It never creates the home, never overwrites a file, and never writes through a link: the home is opened through the home-scope walk, a symlinked ~/.abcd.noindex reads as NoHome, and both files are created exclusively, owner-only. An empty or relative home is NoHome: there is no one home it names.

Jump to

Keyboard shortcuts

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