We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
entry::Mode::is_submodule()
1 parent 9fe3052 commit 5fd6364Copy full SHA for 5fd6364
gix-index/src/entry/mode.rs
@@ -1,11 +1,16 @@
1
use crate::entry::Mode;
2
3
impl Mode {
4
- /// Return true if this is a sparse entry, as it points to a directory which usually isn't what an 'unsparse' index tracks.
+ /// Return `true` if this is a sparse entry, as it points to a directory which usually isn't what an 'unsparse' index tracks.
5
pub fn is_sparse(&self) -> bool {
6
*self == Self::DIR
7
}
8
9
+ /// Return `true` if this is a submodule entry.
10
+ pub fn is_submodule(&self) -> bool {
11
+ *self == Self::DIR | Self::SYMLINK
12
+ }
13
+
14
/// Compares this mode to the file system version ([`std::fs::symlink_metadata`])
15
/// and returns the change needed to update this mode to match the file.
16
///
0 commit comments