Skip to content

Fix initialization with Indexer::new #1160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ impl<'a> Indexer<'a> {
/// can be `None` if no thin pack is expected, in which case missing bases
/// will result in an error.
///
/// `path` is the directory where the packfile should be stored.
///
/// `mode` is the permissions to use for the output files, use `0` for defaults.
///
/// If `verify` is `false`, the indexer will bypass object connectivity checks.
pub fn new(odb: Option<&Odb<'a>>, path: &Path, mode: u32, verify: bool) -> Result<Self, Error> {
crate::init();
let path = path.into_c_string()?;

let odb = odb.map(Binding::raw).unwrap_or_else(ptr::null_mut);
Expand Down