From 9430e026a8cc8e6113af98ea1c89b8af1b122083 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Sat, 7 Dec 2013 21:56:20 -0400 Subject: [PATCH 1/1] --- doc/todo/git-annex_support.mdwn | 38 ++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/doc/todo/git-annex_support.mdwn b/doc/todo/git-annex_support.mdwn index b6d814d91..923a245fe 100644 --- a/doc/todo/git-annex_support.mdwn +++ b/doc/todo/git-annex_support.mdwn @@ -19,25 +19,43 @@ The crucial steps are: 1. setup a git annex remote in `$srcdir` - cd $srcdir - git annex init + 2. configure direct mode because ikiwiki ignores symlinks for [[security]] reasons: + + cd $srcdir + git annex init + git annex direct + + 3. configure files to be considered by git-annex (those will be not committed into git directly): + + git config annex.largefiles 'largerthan=100kb and not (include=*.mdwn or include=*.txt)' 2. make the bare repository (the remote of `$srcdir`) ignored by git-annex: - cd $srcdir - git config remote.origin.annex-ignore true - git config remote.origin.annex-sync false + cd $srcdir + git config remote.origin.annex-ignore true + git config remote.origin.annex-sync false (!) This needs to be done on *ANY* clone of the repository, which is annoying, but it's important because we don't want to see git-annex stuff in the bare repo. (why?) - 3. enable direct mode on `$srcdir` because ikiwiki ignores symlinks for [[security]] reasons: +This assumes you know what `srcdir`, `repository` and so on mean, if you forgot (like me), see this reference: [[rcs/git/]]. + +What doesn't work +----------------- - cd $srcdir - git annex direct +With a recent version of git-annex: mostly everything. :) Since git-annex in `direct` mode now [sets the repository as bare](http://git-annex.branchable.com/devblog/day_48__direct_mode_guard_design/), *nothing* gets committed at all. -This assumes you know what `srcdir`, `repository` and so on mean, if you forgot (like me), see this reference: [[rcs/git/]]. +What would need to happen in ikiwiki would be to detect that `$srcdir` is running git-annex in direct mode and then do some magic. Here is a tentative incantation in shell: + + if [ $(git config core.bare) == 'true' ] && + [ $(git config annex.direct) == 'true' ]; then + git annex add --auto + git -c core.bare=false commit -m'testing git-annex with ikiwiki' + fi + +This probably needs to happen around line 571 of `git.pm` or, more likely, in a new `git-annex` plugin. -What remains to be clarified: +What remains to be clarified +---------------------------- * how do files get pushed to the `$srcdir`? Only through the web interface? * why do we ignore the bare repository? -- 2.44.0