From 7f1d7cffb1bf269f819689a88fda44efb45128eb Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 15 Sep 2020 21:05:47 +0100 Subject: lorry: Set migrated working repositories to be bare Since commit 50383f3bcce7 "lorry: Crash-proof updates to working git repos with A/B switching", prepare_working_repos assumes that the existing working repositories are bare. migrate_oldstyle_repos did not ensure that, although it did discard any working tree. Run "git config" to set the core.bare and core.logallrefupdates flags appropriately. --- lorry | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lorry') diff --git a/lorry b/lorry index e37261c..279a175 100755 --- a/lorry +++ b/lorry @@ -423,6 +423,13 @@ class Lorry(cliapp.Application): if not os.path.exists(old_gitdir): old_gitdir = old_repo + # Ensure that it's bare + self.run_program(['git', 'config', 'core.bare', 'true'], + cwd=old_gitdir) + self.run_program(['git', 'config', 'core.logallrefupdates', + 'false'], + cwd=old_gitdir) + self.write_update_count(old_gitdir, 1) # Move it to new name, and remove top-level directory if we -- cgit v1.2.1