Skip to content

Commit

Permalink
Fixup gix update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Jul 25, 2024
1 parent a8b026a commit 5c17d30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/index/git_remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,12 @@ impl RemoteGitIndex {

let mut config = self.repo.config_snapshot_mut();
config
.set_raw_value("committer", None, "name", "tame-index")
.set_raw_value(&"committer.name", "tame-index")
.map_err(GitError::from)?;
// Note we _have_ to set the email as well, but luckily gix does not actually
// validate if it's a proper email or not :)
config
.set_raw_value("committer", None, "email", "")
.set_raw_value(&"committer.email", "")
.map_err(GitError::from)?;

let repo = config
Expand Down
12 changes: 5 additions & 7 deletions tests/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,20 @@ impl FakeRemote {
fn snapshot(repo: &mut gix::Repository) -> gix::config::CommitAutoRollback<'_> {
let mut config = repo.config_snapshot_mut();
config
.set_raw_value("author", None, "name", "Integration Test")
.set_raw_value(&"author.name", "Integration Test")
.unwrap();
config
.set_raw_value("committer", None, "name", "Integration Test")
.set_raw_value(&"committer.name", "Integration Test")
.unwrap();
config
.set_raw_value("author", None, "email", "[email protected]")
.set_raw_value(&"author.email", "[email protected]")
.unwrap();
config
.set_raw_value("committer", None, "email", "[email protected]")
.set_raw_value(&"committer.email", "[email protected]")
.unwrap();

// Disable GPG signing, it breaks testing if the user has it enabled
config
.set_raw_value("commit", None, "gpgsign", "false")
.unwrap();
config.set_raw_value(&"commit.gpgsign", "false").unwrap();

config.commit_auto_rollback().unwrap()
}
Expand Down

0 comments on commit 5c17d30

Please sign in to comment.