fix: simplify repository opening logic in append_date_and_git_hash function
Some checks failed
Continuous Integration / Build and Test on ubuntu-latest (push) Failing after 2m17s
Some checks failed
Continuous Integration / Build and Test on ubuntu-latest (push) Failing after 2m17s
This commit is contained in:
@@ -104,7 +104,7 @@ fn append_date_and_git_hash(output_path: &mut Option<PathBuf>, config: &Config)
|
|||||||
|
|
||||||
if config.append_git_hash {
|
if config.append_git_hash {
|
||||||
for dir in &config.directory {
|
for dir in &config.directory {
|
||||||
match Repository::open(&dir) {
|
match Repository::open(dir) {
|
||||||
Ok(repo) => {
|
Ok(repo) => {
|
||||||
let head = repo.head().context("Failed to get repository HEAD")?;
|
let head = repo.head().context("Failed to get repository HEAD")?;
|
||||||
if let Some(oid) = head.target() {
|
if let Some(oid) = head.target() {
|
||||||
|
Reference in New Issue
Block a user