Skip to content

Commit

Permalink
fix: use / for path joining in entries to match the git behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jul 31, 2024
1 parent 9fd5d07 commit 0c517fd
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions git-cliff-core/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ use lazy_regex::{
Regex,
};
use std::io;
use std::path::{
Path,
PathBuf,
};
use std::path::PathBuf;
use url::Url;

/// Regex for replacing the signature part of a tag message.
Expand Down Expand Up @@ -268,15 +265,14 @@ impl Repository {
}

// get the full path of the file
let name =
Path::new(entry.name().expect("Failed to get entry name"));
let name = entry.name().expect("Failed to get entry name");
let entry_path = if dir != "," {
Path::new(dir).join(name)
format!("{}/{}", dir, name)
} else {
name.to_path_buf()
name.to_string()
};

changed_files.push(entry_path);
changed_files.push(entry_path.into());

0
})
Expand Down

0 comments on commit 0c517fd

Please sign in to comment.