From 5e0e90d81e772e17ba2afc92cf322f5ff1db7634 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 29 Sep 2021 16:00:54 -0700 Subject: [PATCH] MutableRepo: record old checkout abandoned if it's empty Same reasoning as the previous change. With this change, I believe we now record all rewritten and abandoned commits correctly. We're now almost ready to switch the CLI away from using evolution for automatically rebasing commits. --- lib/src/repo.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/repo.rs b/lib/src/repo.rs index c9b879b05..0294c1d18 100644 --- a/lib/src/repo.rs +++ b/lib/src/repo.rs @@ -670,6 +670,7 @@ impl MutableRepo { CommitBuilder::for_rewrite_from(settings, self.store(), ¤t_checkout) .set_pruned(true) .write_to_repo(self); + self.record_abandoned_commit(current_checkout_id); } let store = self.store(); // Create a new tree with any conflicts resolved.