Skip to content

Commit d90412b

Browse files
committed
fix!: rename entry::Kind::NonFile to entry::Kind::Untrackable.
1 parent c06a57e commit d90412b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

gix-dir/src/entry.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ pub enum Property {
2828
pub enum Kind {
2929
/// Something that is not a regular file, directory, or symbolic link.
3030
///
31-
/// These can only exist in the filesystem, because Git repositories do not support them.
32-
/// They do not appear as blobs in a repository, and their type is not specifiable in a tree object.
31+
/// These can only exist in the filesystem,
32+
/// because Git repositories do not support them, thus they cannot be tracked.
33+
/// Hence, they do not appear as blobs in a repository, and their type is not specifiable in a tree object.
3334
/// Examples include named pipes (FIFOs), character devices, block devices, and sockets.
34-
NonFile,
35+
Untrackable,
3536
/// The entry is a blob, representing a regular file, executable or not.
3637
File,
3738
/// The entry is a symlink.
@@ -163,7 +164,7 @@ impl From<std::fs::FileType> for Kind {
163164
} else if value.is_file() {
164165
Kind::File
165166
} else {
166-
Kind::NonFile
167+
Kind::Untrackable
167168
}
168169
}
169170
}

gix-dir/tests/dir/walk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn one_top_level_fifo() {
6868

6969
assert_eq!(
7070
entries,
71-
&[entry("top", Untracked, NonFile),],
71+
&[entry("top", Untracked, Untrackable),],
7272
"Non-files are like normal files, but with a different state"
7373
);
7474
}
@@ -103,9 +103,9 @@ fn fifo_in_traversal() {
103103
&[
104104
entry_nokind(".git", Pruned).with_property(DotGit).with_match(Always),
105105
entry("dir-with-file/nested-file", Untracked, File),
106-
entry("dir/nested", Untracked, NonFile),
106+
entry("dir/nested", Untracked, Untrackable),
107107
entry("file", Untracked, File),
108-
entry("top", Untracked, NonFile),
108+
entry("top", Untracked, Untrackable),
109109
],
110110
"Non-files only differ by their disk-kind"
111111
);

0 commit comments

Comments
 (0)