Skip to content

Commit e022096

Browse files
committed
doc: add note about the trust-model.
It should explain why `gix` is happy to open repositories that won't be handled by `git` unless overrides are set.
1 parent 1b1fc25 commit e022096

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gix/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
//! individually. Sometimes it may hide complexity under the assumption that the performance difference doesn't matter
55
//! for all but the fewest tools out there, which would be using the underlying crates directly or file an issue.
66
//!
7+
//! ### The Trust Model
8+
//!
9+
//! It is very simple - based on the ownership of the repository compared to the user of the current process [Trust](sec::Trust)
10+
//! is assigned. This can be [overridden](open::Options::with()) as well. Further, git configuration files track their trust level
11+
//! per section based on and sensitive values like paths to executables or certain values will be skipped if they are from a source
12+
//! that isn't [fully](sec::Trust::Full) trusted.
13+
//!
14+
//! That way, data can safely be obtained without risking to execute untrusted executables.
15+
//!
16+
//! Note that it's possible to let `gix` act like `git` or `git2` by setting the [open::Options::bail_if_untrusted()] option.
17+
//!
718
//! ### The prelude and extensions
819
//!
920
//! With `use git_repository::prelude::*` you should be ready to go as it pulls in various extension traits to make functionality

0 commit comments

Comments
 (0)