patch

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Overview

SPDX-License-Identifier: MIT Package patch provides helpers for handling bounded commit patch/diff text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumePatchBudget

func ConsumePatchBudget(patch string, budget int) (string, bool, int)

ConsumePatchBudget truncates patch text to a remaining byte budget. It returns the (possibly truncated) patch, a flag indicating whether truncation occurred, and the budget remaining after consumption.

This is used by both the GitHub and GitLab clients to enforce max_diff_bytes uniformly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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