Skip to content

Commit

Permalink
Assure that the recently added worktree_mode actually represents it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jan 16, 2025
1 parent 4c8200f commit d0c8f45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions gix-index/src/entry/mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ impl Mode {
Mode::COMMIT
} else if executable_bit && stat.is_executable() {
Mode::FILE_EXECUTABLE
} else if has_symlinks && stat.is_symlink() {
Mode::SYMLINK
} else {
Mode::FILE
};
Expand Down
4 changes: 2 additions & 2 deletions gix-status/tests/status/index_as_worktree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ fn refresh() {
BStr::new(b"empty"),
3,
Change::Type {
worktree_mode: entry::Mode::FILE
worktree_mode: entry::Mode::SYMLINK
}
.into()
),
Expand Down Expand Up @@ -707,7 +707,7 @@ fn modified() {
BStr::new(b"empty"),
3,
Change::Type {
worktree_mode: entry::Mode::FILE,
worktree_mode: entry::Mode::SYMLINK,
}
.into(),
),
Expand Down

0 comments on commit d0c8f45

Please sign in to comment.