Recent comments posted to this site:
The Haskell Platform installer for OSX uses GHC 7.0.4, which doesn't seem able to support the current version of git-annex.
Cabal throws a very cryptic error about not being able to use the proper base package.
I was able to install it by
- cloning the repo
- merging the ghc7.0 branch
- resolving merge conflicts in git-annex.cabal
- cabal install git-annex.cabal
(Note I also tried this with homebrew and had similar results)
.zshrc
is only read for interactive shells, so ssh mybox 'echo $PATH'
displayed /usr/bin:/bin:/usr/sbin:/sbin
. Using .zshenv
, which is used even for non-interactive shells, did the trick. Thanks!
It doesn't need to be installed into the system PATH; just the user PATH. Which you should be able to control.
Exactly how to do this surely varies, but here I have a ~/.bashrc
containing PATH=$HOME/bin:$PATH; export PATH
and I keep git-annex-shell in bin and it's available to eg "ssh mybox git-annex-shell"
Suppose you do that to repos A and B. Now, in A, you git annex drop
a file that is only present in those repositories. A checks B to make sure it still has a copy of the file. It sees the (same) file there, so assumes it's safe to drop. The file is removed from A, also removing it from B, and losing data.
It is possible to configure A and B to mutually distrust one-another and avoid this problem, but there will be other problems too.
Instead, git-annex supports using cp --reflink=auto
, which on filesystems supporting Copy On Write (eg, btrfs), avoids duplicating contents when A and B are on the same filesystem.
I've made git-annex-shell run the git hooks/annex-content
after content is received or dropped.
Note that the clients need to be running at least git-annex version 3.20120227 , which runs git-annex-shell commit, which runs the hook.
windows support has everything I know about making a windows port. This badly needs someone who understand Windows to dive into it. The question of how to create a symbolic link (or the relevant Windows equivilant) from haskell on Windows is a good starting point..
Here's another handy command-line which annexes all files in repo B which have already been annexed in repo A:
The 'T' outputted by git status for these files indicates a type change: it's a symlink to the annex in repo A, but a normal file in repo B.