We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8d0717 commit e71b65aCopy full SHA for e71b65a
src/repo.rs
@@ -3621,4 +3621,25 @@ mod tests {
3621
// reverting twice restores `foo` file
3622
assert!(foo_file.exists());
3623
}
3624
+
3625
+ #[test]
3626
+ fn smoke_config_write_and_read() {
3627
+ let td = TempDir::new().unwrap();
3628
+ let path = td.path();
3629
3630
+ let repo = Repository::init(path).unwrap();
3631
3632
+ let mut config = repo.config().unwrap();
3633
3634
+ config.set_bool("commit.gpgsign", false).unwrap();
3635
3636
+ let c = fs::read_to_string(path.join(".git").join("config")).unwrap();
3637
3638
+ assert!(c.contains("[commit]"));
3639
+ assert!(c.contains("gpgsign = false"));
3640
3641
+ let config = repo.config().unwrap();
3642
3643
+ assert!(!config.get_bool("commit.gpgsign").unwrap());
3644
+ }
3645
0 commit comments