Recent comments posted to this site:

When a push would result in a non-fast-forward merge, git-annex-sync currently fails. Maybe instead, pull and retry pushing? This happens in the context of several processes trying to push to the same git-annex repo.

Also, the docs mention synced/master, but it's synced/current-branch.

Comment by Ilya_Shlyakhter Wed Sep 12 17:56:40 2018

@andrew while it might be possible in theory to set up a rsync special remote that's usable without connecting to the rsync server yet, there are other types of special remotes that do need to connect to the server. S3 comes to mind; it needs to either create a bucket or check if an existing bucket is already being used as a git-annex remote.

So, I don't think this can be supported generally across all special remote implementations. We could try to support it for specific ones like rsync. I don't actually see anywhere in the code for the rsync special remote where initremote will connect to the remote server though.

Comment by joey Tue Sep 11 17:31:53 2018

@Ilya, indeed, this page is talking about filesystem metadata. I've updated it for clarity.

There is not currently a way to switch backend based on file size, although you can use annex.largefiles to make it check eg smaller files directly into git rather than annexing them.

Comment by joey Tue Sep 11 16:52:20 2018

@Ilya, it seems to me you could just configure your localhost webserver to listen on one of the other localnet addresses (eg 127.0.0.2), and only serve up the "safe" files on that address. Then whitelist that address in git-annex.

That seems better than adding user-configured regexps to a security path. (Worth noting that the example regexp you gave also matches port 808, probably by accident! Regexps and security are often not the best combination.)

Also, I don't think it would be possible to implement anything that looks at the whole url in the restricted Http Manager, since the http-client library's interface does not provide the path being requested to the hook that is built on.

Comment by joey Tue Sep 11 16:39:14 2018

The only risk in doing this is that if you somehow later add a file that actually uses that key it will have this metadata.

There's no garbage collection of metadata except for keys that have been marked as dead with git annex dead.

Comment by joey Tue Sep 11 16:33:15 2018

I want to store a simple mapping in git-annex on the git-annex branch, from string keys to values. I figured I can just do git annex metadata --key=WORM-s0-m0--mykey -s myfield+=myvalue and after git annex sync these mappings will propagate to copies of the repo. But the keys won't point to any file in any remote. Will that break anything in git-annex? Will they get garbage-collected automatically in some circumstances?

Comment by https://me.yahoo.com/a/iOGTltEpmOTQ.xZ99NFP5c7Zdcc-#6a7ba Sat Sep 8 22:36:06 2018

It would be good if annex.security.allowed-http-addresses could add an exception not just for any 'localhost' access, but only for URLs matching a given regexp, e.g. only for http://localhost:808?/dnanexus/file-[a-f0-9]+

Comment by https://me.yahoo.com/a/iOGTltEpmOTQ.xZ99NFP5c7Zdcc-#6a7ba Fri Sep 7 21:08:24 2018

Is there a way to drop everything except files under a given path in the repository?

You can use something like git annex drop --exclude='subdir/*'. See man git-annex-matching-options.

Comment by kyle Fri Sep 7 20:13:03 2018

Is there a way to drop everything except files under a given path in the repository? If not, it would be good to add this option. It should also not drop a file if it is outside the path but is pointed to by a relative symlink under the path.

Comment by https://me.yahoo.com/a/iOGTltEpmOTQ.xZ99NFP5c7Zdcc-#6a7ba Fri Sep 7 18:10:05 2018
Is it possible to configure git-annex to use different backends based on file size? I.e. use a faster hash or even WORM for larger files.
Comment by https://me.yahoo.com/a/iOGTltEpmOTQ.xZ99NFP5c7Zdcc-#6a7ba Fri Sep 7 15:59:06 2018