Skip to content

Commit

Permalink
Fix signature of git_repository_set_index
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed May 10, 2016
1 parent d393aef commit fa4d9f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libgit2-sys/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ extern {
pub fn git_repository_index(out: *mut *mut git_index,
repo: *mut git_repository) -> c_int;
pub fn git_repository_set_index(repo: *mut git_repository,
index: *mut git_index) -> c_int;
index: *mut git_index);
pub fn git_repository_config(out: *mut *mut git_config,
repo: *mut git_repository) -> c_int;
pub fn git_repository_config_snapshot(out: *mut *mut git_config,
Expand Down
5 changes: 2 additions & 3 deletions src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,11 +676,10 @@ impl Repository {
}

/// Set the Index file for this repository.
pub fn set_index(&self, index: &mut Index) -> Result<(), Error> {
pub fn set_index(&self, index: &mut Index) {
unsafe {
try_call!(raw::git_repository_set_index(self.raw(), index.raw()));
raw::git_repository_set_index(self.raw(), index.raw());
}
Ok(())
}

/// Get the configuration file for this repository.
Expand Down
1 change: 1 addition & 0 deletions systest/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fn main() {
let mut cfg = ctest::TestGenerator::new();
cfg.header("git2.h")
.header("git2/sys/transport.h")
.header("git2/sys/repository.h")
.header("git2/cred_helpers.h")
.include(root.join("include"))
.type_name(|s, _| s.to_string());
Expand Down

0 comments on commit fa4d9f2

Please sign in to comment.