git_diff_parser

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 7 Imported by: 4 modules, 1 package

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

Index

Constants

View Source
const (
	ContentChangeTypeAdd    = contentChangeTypeAdd
	ContentChangeTypeDelete = contentChangeTypeDelete
	ContentChangeTypeModify = contentChangeTypeModify
	ContentChangeTypeNOOP   = contentChangeTypeNOOP

	FileDiffTypeAdded    = fileDiffTypeAdded
	FileDiffTypeDeleted  = fileDiffTypeDeleted
	FileDiffTypeModified = fileDiffTypeModified
)

Variables

View Source
var ErrPatchConflict = errors.New("patch conflict")

Functions

func ApplyFile added in v0.1.0

func ApplyFile(pristine, patchData []byte) ([]byte, error)

func ApplyFileWithConflicts added in v0.1.0

func ApplyFileWithConflicts(pristine, patchData []byte) ([]byte, error)

func ApplyPatchset added in v0.1.0

func ApplyPatchset(tree map[string][]byte, patchData []byte) (map[string][]byte, error)

func SignificantChange

func SignificantChange(diff string, isSignificant func(*FileDiff, *ContentChange) (bool, string)) (significant bool, msg string, err error)

Types

type ContentChange

type ContentChange = contentChange

type ContentChangeType

type ContentChangeType = contentChangeType

type FileDiff

type FileDiff = fileDiff

type FileDiffType

type FileDiffType = fileDiffType

Jump to

Keyboard shortcuts

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