mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-12-23 05:36:47 +00:00
Use Repository::discover instead of open_from_env
This commit is contained in:
parent
32ae1b539b
commit
5f1f2dc554
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ fn main() {
|
|||
}
|
||||
|
||||
fn read_commit() -> Result<String, git2::Error> {
|
||||
let repo = git2::Repository::open_from_env()?;
|
||||
let repo = git2::Repository::discover(".")?;
|
||||
let hash = repo.head()?.peel_to_commit()?.id().to_string();
|
||||
Ok(hash)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue