aboutsummaryrefslogtreecommitdiff
path: root/src/update/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/update/mod.rs')
-rw-r--r--src/update/mod.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/update/mod.rs b/src/update/mod.rs
index 7b51136..e3cd36a 100644
--- a/src/update/mod.rs
+++ b/src/update/mod.rs
@@ -45,8 +45,13 @@ impl Repo {
let _fetched = self.fetch()?;
let (remote, head) = self.default_remote_head()?;
- self.update_default_branch_ref(remote.clone(), head)?;
- self.checkout(remote, head, &mut progress)?;
+ 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");
// let merged = repo.branches(Some(BranchType::Local))?
// .filter_map(|x| x.ok())