summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/repository/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
commit10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch)
treebdffd5d80c26cf4a7a518281a204be1ace85b4c1 /vendor/gix/src/repository/mod.rs
parentReleasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff)
downloadrustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz
rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix/src/repository/mod.rs')
-rw-r--r--vendor/gix/src/repository/mod.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/gix/src/repository/mod.rs b/vendor/gix/src/repository/mod.rs
new file mode 100644
index 000000000..31199e22d
--- /dev/null
+++ b/vendor/gix/src/repository/mod.rs
@@ -0,0 +1,36 @@
+//!
+
+/// Internal
+impl crate::Repository {
+ #[inline]
+ pub(crate) fn free_buf(&self) -> Vec<u8> {
+ self.bufs.borrow_mut().pop().unwrap_or_default()
+ }
+
+ /// This method is commonly called from the destructor of objects that previously claimed an entry
+ /// in the free-list with `free_buf()`.
+ /// They are welcome to take out the data themselves, for instance when the object is detached, to avoid
+ /// it to be reclaimed.
+ #[inline]
+ pub(crate) fn reuse_buffer(&self, data: &mut Vec<u8>) {
+ if data.capacity() > 0 {
+ self.bufs.borrow_mut().push(std::mem::take(data));
+ }
+ }
+}
+
+mod cache;
+mod config;
+pub(crate) mod identity;
+mod impls;
+mod init;
+mod location;
+mod object;
+pub(crate) mod permissions;
+mod reference;
+mod remote;
+mod revision;
+mod snapshots;
+mod state;
+mod thread_safe;
+mod worktree;