Skip to content

Commit

Permalink
take care of the index too
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Jun 24, 2024
1 parent cf1c6c5 commit d3a65e0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions crates/mapdiffbot2/src/git_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,18 @@ fn commit_all_stragglers(repo: &Repository) -> Result<()> {
.statuses(None)?
.into_iter()
.find(|item| {
item.status().is_wt_modified()
|| item.status().is_wt_deleted()
|| item.status().is_wt_new()
|| item.status().is_wt_renamed()
|| item.status().is_wt_typechange()
item.status().contains(
git2::Status::INDEX_NEW
| git2::Status::INDEX_MODIFIED
| git2::Status::INDEX_DELETED
| git2::Status::INDEX_RENAMED
| git2::Status::INDEX_TYPECHANGE
| git2::Status::WT_NEW
| git2::Status::WT_MODIFIED
| git2::Status::WT_DELETED
| git2::Status::WT_RENAMED
| git2::Status::WT_TYPECHANGE,
)
})
.map_or(false, |_| true);
if dirty {
Expand Down

0 comments on commit d3a65e0

Please sign in to comment.