From 70916ec7713442a1f9b80f394b980ac2ab5a92df Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 21 Feb 2026 13:29:38 +0800 Subject: diff/trees: Add tree-diffing routines --- diff/trees/entry.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 diff/trees/entry.go (limited to 'diff/trees/entry.go') 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 +} -- cgit v1.3.1-10-gc9f91