We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db361a3 commit 018e87cCopy full SHA for 018e87c
asyncgit/src/sync/commit.rs
@@ -93,6 +93,7 @@ mod tests {
93
use commit::amend;
94
use git2::Repository;
95
use std::{fs::File, io::Write, path::Path};
96
+ use tempfile::TempDir;
97
98
fn count_commits(repo: &Repository, max: usize) -> usize {
99
let mut items = Vec::new();
@@ -185,4 +186,26 @@ mod tests {
185
186
187
Ok(())
188
}
189
+
190
+ #[test]
191
+ fn test_commit_unknown_signature() {
192
+ let file_path = Path::new("foo");
193
+ let td = TempDir::new().unwrap();
194
+ let repo = Repository::init(td.path()).unwrap();
195
+ let root = repo.path().parent().unwrap();
196
+ let repo_path = root.as_os_str().to_str().unwrap();
197
198
+ File::create(&root.join(file_path))
199
+ .unwrap()
200
+ .write_all(b"test\nfoo")
201
+ .unwrap();
202
203
+ stage_add_file(repo_path, file_path).unwrap();
204
205
+ let id = commit(repo_path, "commit msg").unwrap();
206
207
+ let details = get_commit_details(repo_path, id).unwrap();
208
209
+ assert_eq!(details.author.name, "unknown");
210
+ }
211
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments