streamdiff

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: 25 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 streamdiff intercepts streaming Git patches on stdin (git diff, git log -p, git show), fetches the blobs, and renders AST diffs in place of standard patch text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Process

func Process(in io.Reader, out io.Writer, cwd string, cfg StreamConfig) error

Process parses a Git patch stream from in, runs 2-way diffs through the AST pipeline concurrently across a bounded worker pool, and passes everything else straight to out in order.

Types

type StreamConfig

type StreamConfig struct {
	Format         string
	DiffOpts       pipeline.DiffOptions
	UnifiedOpts    unified.RenderOptions
	SideBySideOpts sidebyside.RenderOptions
	// IsActive reports whether the output receiver is still alive and accepting data.
	// If nil, processing continues until EOF.
	IsActive func() bool
	// Pager monitors the terminal pager subprocess, if active.
	Pager *pager.Pager
	// Context cancels streaming when the caller is done.
	Context context.Context
}

StreamConfig configures the streaming diff processor and renderers.

Jump to

Keyboard shortcuts

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