From 86235efcf77346ff4b012497004dccc7380d70ac Mon Sep 17 00:00:00 2001 From: Max Audron Date: Wed, 26 Mar 2025 15:19:00 +0100 Subject: delete files removed from index during checkout --- src/update/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/update') diff --git a/src/update/mod.rs b/src/update/mod.rs index e3cd36a..e5e9f4c 100644 --- a/src/update/mod.rs +++ b/src/update/mod.rs @@ -46,13 +46,14 @@ impl Repo { let _fetched = self.fetch()?; let (remote, head) = self.default_remote_head()?; debug!("default remote and head: {:?} {:?}", remote, head); - // TODO do not update if there are unpushed commits - self.update_default_branch_ref(&remote, head)?; - debug!("updated default branch reference"); // TODO check out only if the default branch is currently checked out self.checkout(&remote, head, &mut progress)?; debug!("finished checkout"); + // TODO do not update if there are unpushed commits + self.update_default_branch_ref(&remote, head)?; + debug!("updated default branch reference"); + // let merged = repo.branches(Some(BranchType::Local))? // .filter_map(|x| x.ok()) // .try_fold(false, |mut merged, (mut branch, _)| { -- cgit v1.2.3