summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/config/tree/sections/author.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix/src/config/tree/sections/author.rs')
-rw-r--r--vendor/gix/src/config/tree/sections/author.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/gix/src/config/tree/sections/author.rs b/vendor/gix/src/config/tree/sections/author.rs
new file mode 100644
index 000000000..4101e3817
--- /dev/null
+++ b/vendor/gix/src/config/tree/sections/author.rs
@@ -0,0 +1,23 @@
+use crate::{
+ config,
+ config::tree::{gitoxide, keys, Author, Key, Section},
+};
+
+impl Author {
+ /// The `author.name` key.
+ pub const NAME: keys::Any =
+ keys::Any::new("name", &config::Tree::AUTHOR).with_fallback(&gitoxide::Author::NAME_FALLBACK);
+ /// The `author.email` key.
+ pub const EMAIL: keys::Any =
+ keys::Any::new("email", &config::Tree::AUTHOR).with_fallback(&gitoxide::Author::EMAIL_FALLBACK);
+}
+
+impl Section for Author {
+ fn name(&self) -> &str {
+ "author"
+ }
+
+ fn keys(&self) -> &[&dyn Key] {
+ &[&Self::NAME, &Self::EMAIL]
+ }
+}