Skip to content

Commit

Permalink
gnostr-add:repo = match Repository::discover(.)
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyMcMillan committed Sep 10, 2024
1 parent 7d92090 commit c290991
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bins/src/bin/gnostr-add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ struct Args {
}

fn run(args: &Args) -> Result<(), git2::Error> {
let repo = Repository::open(&Path::new("."))?;
let repo: Repository;
repo = match Repository::discover(".") {
Ok(repo) => repo,
Err(e) => panic!("failed to init: {}", e),
};

let mut index = repo.index()?;

let cb = &mut |path: &Path, _matched_spec: &[u8]| -> i32 {
Expand Down

0 comments on commit c290991

Please sign in to comment.