From 011b2af8c5e8e19361307424742c099215c9ca89 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Sat, 28 Mar 2015 03:45:09 -0400 Subject: [PATCH] another attempt --- doc/todo/git-annex_support.mdwn | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/todo/git-annex_support.mdwn b/doc/todo/git-annex_support.mdwn index 78219625b..afec8c6b8 100644 --- a/doc/todo/git-annex_support.mdwn +++ b/doc/todo/git-annex_support.mdwn @@ -101,3 +101,37 @@ An alternative implementation, which remains to be detailed but is mentionned in Also note that ikiwiki-hosting has a [patch waiting](https://ikiwiki-hosting.branchable.com/todo/git-annex_support) to allow pushes to work with git-annex. This could potentially be expanded to sync content to the final checkout properly, avoiding some of the problems above (esp. wrt to non-annex bare repos). Combined with the [[underlay]] feature, this could work very nicely indeed... --[[anarcat]] + +Here's an attempt: + +
+cd /home/user
+git clone source.git source.annex
+cd source.annex
+git annex direct
+cd ../source.git
+git annex group . transfer
+git remote add annex ../source.annex
+git annex sync annex
+
+ +Make sure the `hardlink` setting is enabled, and add the annex as an underlay, in `ikiwiki.setup`: + +
+hardlink: 1
+add_underlays:
+- /home/w-anarcat/source.annex
+
+ +Then moving files to the underlay is as simple as running this command in the bare repo: + +
+#!/bin/sh
+
+echo "moving big files to annex repository..."
+git annex move --to annex
+
+ +I have added this as a hook in `$HOME/source.git/hooks/post-receive` (don't forget to `chmod +x`). + +The problem with the above is that the underlay wouldn't work: for some reason it wouldn't copy those files in place properly. Maybe it's freaking out because it's a full copy of the repo... My solution was to make the source repository itself a direct repo, and then add it as a remote to the bare repo. --[[anarcat]] -- 2.39.5