Conversation
Signed-off-by: tison <wander4096@gmail.com>
| let status_iter = status_platform.into_index_worktree_iter(None)?; | ||
| let status_iter = status_platform.into_iter(None)?; | ||
| let now = gix::date::Time::now_local_or_utc(); | ||
| for item in status_iter { | ||
| let item = item.context("failed to check git status item")?; | ||
| let rel_path = item.rela_path(); | ||
| let rel_path = match &item { | ||
| Item::IndexWorktree(item) => item.rela_path(), | ||
| Item::TreeIndex(item) => item.location(), | ||
| }; |
There was a problem hiding this comment.
As discussed in #199 (comment), the dirty state can be either:
- In the working tree, i.e., not yet
git add-ed - In the index, i.e.,
git add-ed but not yet committed.
into_index_worktree_iter returns only the diff between the index and the working tree, while into_iter returns all the diffs between the head-tree and the index, and the index and the working tree.
Signed-off-by: tison <wander4096@gmail.com>
We would need a release for using, so if it is not to much effort for you, we would love to get it 😄 |
|
@Lorilatschki 6.4.0 Released with all these changes. |
cc @Lorilatschki
This should handle several edge cases as discussed with @Byron in #199 (comment)
I'm going to revise the integration tests and then cut a release, but it may take quite some time until I have spare time. When you need a release for using, please let me know so I can release it as is without other internal refactoring.