mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor!: return sets of git type flags instead of integers
This commit is contained in:
parent
050c0eb57a
commit
7618f944c0
12 changed files with 459 additions and 191 deletions
|
@ -208,7 +208,10 @@ class IndexEntry {
|
|||
String get sha => _oidToHex(_indexEntryPointer.ref.id);
|
||||
|
||||
/// Returns the UNIX file attributes of a index entry.
|
||||
GitFilemode get mode => intToGitFilemode(_indexEntryPointer.ref.mode);
|
||||
GitFilemode get mode {
|
||||
final modeInt = _indexEntryPointer.ref.mode;
|
||||
return GitFilemode.values.singleWhere((mode) => modeInt == mode.value);
|
||||
}
|
||||
|
||||
/// Sets the UNIX file attributes of a index entry.
|
||||
set mode(GitFilemode mode) => _indexEntryPointer.ref.mode = mode.value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue