From: Nick Bowler Date: Sun, 14 Feb 2021 00:32:48 +0000 (-0500) Subject: Work around git-annex breakage. X-Git-Url: https://git.draconx.ca/gitweb/homepage.git/commitdiff_plain/6493de72be35a962a45a31059c7e90a8e9c3b737?hp=8227e0fd016c3e213181eb03d96f2d09370e7d2f Work around git-annex breakage. Seems new versions of git annex just bail out when run in a "bare" repository, (at least when git config core.bare return true). Problem is, you can create work trees from bare repositories and then the result is not really "bare" even though git config core.bare will return "true". Since site deployment does this, and then tries to run git annex, we get pointless failures. Simple enough to just manually set core.bare to false when running git annex, which seems sufficient to make things work again. --- diff --git a/Rules b/Rules index 6a8b45a..d48f287 100644 --- a/Rules +++ b/Rules @@ -69,7 +69,8 @@ postprocess do # Register URLs for git-annex keys unless (uribase = ENV['ANNEX_URI_BASE'].to_s.chomp("/")).empty? - Open3.popen2("git", "annex", "registerurl") do |stdin, stdout, result| + Open3.popen2("git", "-c", "core.bare=false", "annex", "registerurl") do + |stdin, stdout, result| @items.each do |item| l = File.readlink(item.raw_filename) next unless l =~ %r{/annex/objects/}