Skip to content

Commit 27b663e

Browse files
committed
feat: add objects::tree::Editor::detach() to get the underlying editor back.
This can be useful to have more control over what gets written, or how.
1 parent 1f9556a commit 27b663e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gix/src/object/tree/editor.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ impl<'repo> super::Editor<'repo> {
6363
repo,
6464
})
6565
}
66+
67+
/// Detach all extras and return the underlying plumbing editor, which won't perform validation
68+
/// when writing the tree.
69+
pub fn detach(self) -> gix_object::tree::Editor<'repo> {
70+
self.inner
71+
}
6672
}
6773

6874
/// Tree editing

0 commit comments

Comments
 (0)