+14
-0
lines changedFilter options
+14
-0
lines changed Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
1
1
use crate::{
2
2
bstr::{BString, ByteSlice},
3
3
clone::PrepareFetch,
4
+
config::tree::gitoxide,
4
5
};
5
6
6
7
/// The error returned by [`PrepareFetch::fetch_only()`].
@@ -80,6 +81,19 @@ impl PrepareFetch {
80
81
.as_mut()
81
82
.expect("user error: multiple calls are allowed only until it succeeds");
82
83
84
+
if repo.committer().is_none() {
85
+
let mut config = gix_config::File::new(gix_config::file::Metadata::api());
86
+
config
87
+
.set_raw_value(&gitoxide::Committer::NAME_FALLBACK, "no name configured during fetch")
88
+
.expect("works - statically known");
89
+
config
90
+
.set_raw_value(&gitoxide::Committer::EMAIL_FALLBACK, "noEmailAvailable@example.com")
91
+
.expect("works - statically known");
92
+
let mut repo_config = repo.config_snapshot_mut();
93
+
repo_config.append(config);
94
+
repo_config.commit().expect("configuration is still valid");
95
+
}
96
+
83
97
if !self.config_overrides.is_empty() {
84
98
let mut snapshot = repo.config_snapshot_mut();
85
99
snapshot.append_config(&self.config_overrides, gix_config::Source::Api)?;
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4