]> git.draconx.ca Git - homepage.git/commitdiff
Work around git-annex breakage.
authorNick Bowler <nbowler@draconx.ca>
Sun, 14 Feb 2021 00:32:48 +0000 (19:32 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 14 Feb 2021 00:37:40 +0000 (19:37 -0500)
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.

Rules

diff --git a/Rules b/Rules
index 6a8b45a61a19ab725e8dab26aacd784e54b2fd8e..d48f28743b7dc089988e1ddc5f77faa3605003b0 100644 (file)
--- 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/}