From 1e4ab6cd75f83dfe7d920da4b23d7bd663a842ea Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 15 May 2023 12:00:12 -0700 Subject: [PATCH] Add index tracking to status --- crates/fs/src/repository.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/fs/src/repository.rs b/crates/fs/src/repository.rs index 51b69b8bc7..4163dbab90 100644 --- a/crates/fs/src/repository.rs +++ b/crates/fs/src/repository.rs @@ -100,9 +100,9 @@ impl GitRepository for LibGitRepository { fn read_status(status: git2::Status) -> Option { if status.contains(git2::Status::CONFLICTED) { Some(GitFileStatus::Conflict) - } else if status.intersects(git2::Status::WT_MODIFIED | git2::Status::WT_RENAMED) { + } else if status.intersects(git2::Status::WT_MODIFIED | git2::Status::WT_RENAMED | git2::Status::INDEX_MODIFIED | git2::Status::INDEX_RENAMED) { Some(GitFileStatus::Modified) - } else if status.intersects(git2::Status::WT_NEW) { + } else if status.intersects(git2::Status::WT_NEW | git2::Status::INDEX_NEW) { Some(GitFileStatus::Added) } else { None