diff options
| author | 2026-02-21 13:29:38 +0800 | |
|---|---|---|
| committer | 2026-02-21 13:29:38 +0800 | |
| commit | 70916ec7713442a1f9b80f394b980ac2ab5a92df (patch) | |
| tree | 48b64c77008694c6fabe98ffaf6d77d2abfc8359 /diff/trees/entry.go | |
| parent | diff/lines: Line-based diffs via Myers (diff) | |
| signature | No signature | |
diff/trees: Add tree-diffing routines
Diffstat (limited to 'diff/trees/entry.go')
| -rw-r--r-- | diff/trees/entry.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/diff/trees/entry.go b/diff/trees/entry.go new file mode 100644 index 00000000..267c3380 --- /dev/null +++ b/diff/trees/entry.go @@ -0,0 +1,15 @@ +package trees + +import "codeberg.org/lindenii/furgit/object" + +// Entry is one recursive tree difference at a path. +type Entry struct { + // Path is the slash-separated path relative to the diff root. + Path []byte + // Kind is the difference kind for this path. + Kind EntryKind + // Old is the old tree entry (nil when Kind is EntryKindAdded). + Old *object.TreeEntry + // New is the new tree entry (nil when Kind is EntryKindDeleted). + New *object.TreeEntry +} |
