Skip to content

Commit a3de6a2

Browse files
authored
Allow absolute paths for Repository::is_path_ignored. (#554)
1 parent df643b0 commit a3de6a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/repo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,7 @@ impl Repository {
25972597

25982598
/// Test if the ignore rules apply to a given path.
25992599
pub fn is_path_ignored<P: AsRef<Path>>(&self, path: P) -> Result<bool, Error> {
2600-
let path = path_to_repo_path(path.as_ref())?;
2600+
let path = util::cstring_to_repo_path(path.as_ref())?;
26012601
let mut ignored: c_int = 0;
26022602
unsafe {
26032603
try_call!(raw::git_ignore_path_is_ignored(

0 commit comments

Comments
 (0)