Recent changes to this wiki:

Added a comment
diff --git a/doc/news/version_6.20160808/comment_1_3960d8f1460d6d11a5ab8f27ddee53ca._comment b/doc/news/version_6.20160808/comment_1_3960d8f1460d6d11a5ab8f27ddee53ca._comment
new file mode 100644
index 0000000..a987fdc
--- /dev/null
+++ b/doc/news/version_6.20160808/comment_1_3960d8f1460d6d11a5ab8f27ddee53ca._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://svario.it/gioele"
+ nickname="Gioele"
+ subject="comment 1"
+ date="2016-08-24T17:13:04Z"
+ content="""
+As of 2016-08-24 there is not standalone tarball for 6.20160808. The \"current\" tarball points to 6.20160720-g9f0428e.
+"""]]

Added a comment
diff --git a/doc/bugs/filename_with___34____63____34___causes_unknown_response/comment_1_e5f727ca42cb341c1c8fd7feae184948._comment b/doc/bugs/filename_with___34____63____34___causes_unknown_response/comment_1_e5f727ca42cb341c1c8fd7feae184948._comment
new file mode 100644
index 0000000..e9669a3
--- /dev/null
+++ b/doc/bugs/filename_with___34____63____34___causes_unknown_response/comment_1_e5f727ca42cb341c1c8fd7feae184948._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://openid.stackexchange.com/user/3ee5cf54-f022-4a71-8666-3c2b5ee231dd"
+ nickname="Anthony DeRobertis"
+ subject="comment 1"
+ date="2016-08-24T10:53:05Z"
+ content="""
+Pretty sure that's not a file with a question mark (`0x3f`) in it, that's a file with a carriage return (`0x0d`) in it. In which case see also [git annex import fails on filenames with newlines in them](https://git-annex.branchable.com/bugs/git_annex_import_fails_on_filenames_with_newlines_in_them/).
+"""]]

create bug
diff --git a/doc/bugs/__34__sha256sum_failed__34___for_some_files_with_newest_Android_client.mdwn b/doc/bugs/__34__sha256sum_failed__34___for_some_files_with_newest_Android_client.mdwn
new file mode 100644
index 0000000..111c8e8
--- /dev/null
+++ b/doc/bugs/__34__sha256sum_failed__34___for_some_files_with_newest_Android_client.mdwn
@@ -0,0 +1,55 @@
+### Please describe the problem.
+git annex fsck and git annex get are showing (false?) sha256sum failed messages on Android with the 2016-07-19 android 5.0 build. I haven't seen this before but have been using git-annex on Android, with the same repository for a year, so I'd guess regression.
+
+I ran fsck on the files on another machine (Watt: Debian testing, 6.20160511-1) and no errors occur. Note that isn't the machine that the Android tablet transfers from (Einstein: Debian stable + backports, 5.20151208-1~bpo8+1). The Android shell didn't have a sha256sum command, but it had an md5 command—and I tried one of the files (Management Report.pdf) and the md5 matches on both Watt and the Android tablet.
+
+I also ran git annex fsck on Einstein (the entire repository, since it's a bare repo) and the only problem it found was a single (different) key with an insufficient number of trusted copies.
+
+So I think the file is actually fine.
+
+### What steps will reproduce the problem?
+Unsure. Dropping and re-getting those files didn't help; it showed a sha256 error with get too.
+
+The only difference I can think of between the files that fail and work is the size:
+
+[[!format text """
+u0_a180@manta:/sdcard/Westerley-Board/Board Packets & Reports/2016-08-25 (Regular) $ ls -l
+-rw-rw---- root sdcard_r 116225 2016-08-24 05:40 Agenda 16-08-25.pdf
+-rw-rw---- root sdcard_r 10128521 2016-08-24 06:02 Management Report scan 2 (annotated; Anthony).pdf
+-rw-rw---- root sdcard_r 10128521 2016-08-24 06:02 Management Report scan 2.pdf
+-rw-rw---- root sdcard_r 53313352 2016-08-24 06:02 Management Report.pdf
+-rw-rw---- root sdcard_r 27154 2016-08-24 06:02 WHOA Chart of Accounts Spreadsheet.xlsx
+"""]]
+
+### What version of git-annex are you using? On what operating system?
+
+
+### Please provide any additional information below.
+
+[[!format text """
+u0_a180@manta:/sdcard/Westerley-Board/Board Packets & Reports/2016-08-25 (Regular) $ git annex fsck *
+WARNING: linker: git-annex has text relocations. This is wasting memory and prevents security hardening. Please fix.
+fsck Agenda 16-08-25.pdf (checksum...) ok
+fsck Management Report scan 2 (annotated; Anthony).pdf (checksum...)
+sha256sum failed
+ok
+fsck Management Report scan 2.pdf (checksum...)
+sha256sum failed
+ok
+fsck Management Report.pdf (checksum...)
+sha256sum failed
+ok
+fsck WHOA Chart of Accounts Spreadsheet.xlsx (checksum...) ok
+(recording state in git...)
+__bionic_open_tzdata_path: ANDROID_ROOT not set!
+__bionic_open_tzdata_path: ANDROID_ROOT not set!
+__bionic_open_tzdata_path: ANDROID_ROOT not set!
+__bionic_open_tzdata_path: ANDROID_ROOT not set!
+__bionic_open_tzdata_path: ANDROID_ROOT not set!
+__bionic_open_tzdata_path: ANDROID_ROOT not set!
+u0_a180@manta:/sdcard/Westerley-Board/Board Packets & Reports/2016-08-25 (Regular) $
+"""]]
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+
+Yes, I've been using git annex for I think a year and a half now, on several repositories. It works pretty well. I have a total of around 315GB and 23K annexed keys across them (counting each annex only once, even though they're cloned on a bunch of machines).

diff --git a/doc/bugs/add_fails_with_v6_repo_when_four_levels_deep.mdwn b/doc/bugs/add_fails_with_v6_repo_when_four_levels_deep.mdwn
new file mode 100644
index 0000000..da246cd
--- /dev/null
+++ b/doc/bugs/add_fails_with_v6_repo_when_four_levels_deep.mdwn
@@ -0,0 +1,136 @@
+### Please describe the problem.
+I've noticed that adding a modified file to a version 6 repo will throw a number of errors if 'git annex add' is executed four or more directories deep from the git directory.
+Though it throws a number of errors, it seems the file is still added normally.
+I have also experienced a problem whereby adding a file will replace it with its key (as if I had run 'git annex drop').
+I'm not sure if that problem is related.
+
+### What steps will reproduce the problem?
+In order to cause the exception, a file already in the repo has to be unlocked, edited, and re-added; this re-adding must take place from four levels below the git directory.
+Here is a minimal working example:
+
+    git init
+    git annex init --version=6
+    mkdir -p 1/2/3/4
+    touch 1/2/3/4/foo
+    git annex add 1/2/3/4/foo
+    git annex sync
+    git annex unlock 1/2/3/4/foo
+    echo "bar" >> 1/2/3/4/foo
+    cd 1/2/3/4
+    git annex add foo
+
+Specifically, trying to run 'git annex add foo' will result in the following errors being thrown:
+
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    fatal: '../1/2/3/4/foo' is outside repository
+    git-annex: git check-attr EOF: user error
+    git-annex: smudge: 1 failed
+    error: external filter git-annex smudge --clean %f failed 1
+    error: external filter git-annex smudge --clean %f failed
+    add foo ok
+    (recording state in git...)
+
+
+### What version of git-annex are you using? On what operating system?
+I'm currently running version 6.20160720-g9f0428e on Arch Linux (x86), though I've experienced this problem since at least February.
+
+### Please provide any additional information below.
+
+[[!format sh """
+# If you can, paste a complete transcript of the problem occurring here.
+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
+$ git init; git annex init --version=6
+Initialized empty Git repository in /mnt/.git/
+init  ok 
+(recording state in git...)
+$ mkdir -p 1/2/3/4
+$ touch 1/2/3/4/foo
+$ git annex add 1/2/3/4/foo
+add 1/2/3/4/foo ok
+(recording state in git...)
+$ git annex sync
+commit 
+[master (root-commit) 25e1676] git-annex in
+:/mntt
+ 1 file changed, 1 insertion(+)
+ create mode 120000 1/2/3/4/foo
+ok
+$ git annex unlock 1/2/3/4/foo
+unlock 1/2/3/4/foo ok
+(recording state in git...)
+$ echo "bar" >> 1/2/3/4/foo
+$ cd 1/2/3/4
+$ git annex add foo --debug
+[2016-08-23 14:47:21.764271] read: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","ls-files","--others","--exclude-standard","-z","--","foo"]
+[2016-08-23 14:47:21.766481] read: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","ls-files","--modified","-z","--","foo"]
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+fatal: '../1/2/3/4/foo' is outside repository
+git-annex: git check-attr EOF: user error
+git-annex: smudge: 1 failed
+error: external filter git-annex smudge --clean %f failed 1
+error: external filter git-annex smudge --clean %f failed
+[2016-08-23 14:47:21.806128] chat: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","check-attr","-z","--stdin","annex.backend","annex.numcopies","annex.largefiles","--"]
+[2016-08-23 14:47:21.806624] read: git ["--version"]
+[2016-08-23 14:47:21.809352] process done ExitSuccess
+[2016-08-23 14:47:21.813764] chat: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","cat-file","--batch"]
+add foo [2016-08-23 14:47:21.818268] read: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","symbolic-ref","-q","HEAD"]
+[2016-08-23 14:47:21.82027] process done ExitSuccess
+[2016-08-23 14:47:21.822862] read: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","show-ref","git-annex"]
+[2016-08-23 14:47:21.825102] process done ExitSuccess
+[2016-08-23 14:47:21.825233] read: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","show-ref","--hash","refs/heads/git-annex"]
+[2016-08-23 14:47:21.82715] process done ExitSuccess
+[2016-08-23 14:47:21.828549] chat: git
+["--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","cat-file","--batch"]
+ok
+(recording state in git...)
+[2016-08-23 14:47:21.832848] feed: xargs
+["-0","git","--git-dir=../../../../.git","--work-tree=../../../..","--literal-pathspecs","add","--"]
+[2016-08-23 14:47:21.836822] process done ExitSuccess
+[2016-08-23 14:47:21.837518] chat: git
+["--git-dir=../../../.git","--work-tree=../../../..","--literal-pathspecs","hash-object","-w","--stdin-paths","--no-filters"]
+[2016-08-23 14:47:21.838061] feed: git
+["--git-dir=../../../.git","--work-tree=../../../..","--literal-pathspecs","update-index","-z","--index-info"]
+[2016-08-23 14:47:21.843259] process done ExitSuccess
+[2016-08-23 14:47:21.843444] read: git
+["--git-dir=../../../.git","--work-tree=../../../..","--literal-pathspecs","show-ref","--hash","refs/heads/git-annex"]
+[2016-08-23 14:47:21.847287] process done ExitSuccess
+[2016-08-23 14:47:21.847602] read: git
+["--git-dir=../../../.git","--work-tree=../../../..","--literal-pathspecs","write-tree"]
+[2016-08-23 14:47:21.85106] process done ExitSuccess
+[2016-08-23 14:47:21.851221] chat: git
+["--git-dir=../../../.git","--work-tree=../../../..","--literal-pathspecs","commit-tree","b4a158d15da89e28ef5c2f1782c5b1e3c6f1176c","--no-gpg-sign","-p","refs/heads/git-annex"]
+[2016-08-23 14:47:21.85892] process done ExitSuccess
+[2016-08-23 14:47:21.85907] call: git
+["--git-dir=../../../.git","--work-tree=../../../..","--literal-pathspecs","update-ref","refs/heads/git-annex","68381bac2ba0f559d37214c30b5e41a404b9c98b"]
+[2016-08-23 14:47:21.861978] process done ExitSuccess
+# End of transcript or log.
+"""]]
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+I've been happily using git-annex on my laptop and server for almost a year; it's saved me a great deal of time and effort.
+Thanks for all your work!

removed
diff --git a/doc/bugs/add_fails_with_v6_repo_when_three_levels_deep.mdwn b/doc/bugs/add_fails_with_v6_repo_when_three_levels_deep.mdwn
deleted file mode 100644
index f4307a2..0000000
--- a/doc/bugs/add_fails_with_v6_repo_when_three_levels_deep.mdwn
+++ /dev/null
@@ -1,137 +0,0 @@
-### Please describe the problem.
-I've noticed that adding a modified file to a version 6 repo will throw a number of errors if 'git annex add' is executed three or more directories deep from the git directory.
-Though it throws a number of errors, it seems the file is still added normally.
-I have also experienced a problem whereby adding a file will replace it with its key (as if I had run 'git annex drop').
-I'm not sure if that problem is related.
-
-### What steps will reproduce the problem?
-In order to cause the exception, a file already in the repo has to be unlocked, edited, and re-added; this re-adding must take place from three levels below the git directory.
-Here is a minimal working example:
-
-    git init
-    git annex init --version=6
-    mkdir -p 1/2/3
-    touch 1/2/3/foo
-    git annex add 1/2/3/foo
-    git annex sync
-    git annex unlock 1/2/3/foo
-    echo "bar" >> 1/2/3/foo
-    cd 1/2/3
-    git annex add foo 
-
-Specifically, trying to run 'git annex add foo' will result in the following errors being thrown:
-
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    fatal: '../1/2/3/foo' is outside repository
-    git-annex: git check-attr EOF: user error
-    git-annex: smudge: 1 failed
-    error: external filter git-annex smudge --clean %f failed 1
-    error: external filter git-annex smudge --clean %f failed
-    add foo ok
-    (recording state in git...)
-
-
-### What version of git-annex are you using? On what operating system?
-I'm currently running version 6.20160720-g9f0428e on Arch Linux (x86), though I've experienced this problem since at least February.
-
-### Please provide any additional information below.
-
-[[!format sh """
-# If you can, paste a complete transcript of the problem occurring here.
-# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
-$ git init; git annex init --version=6
-Initialized empty Git repository in /mnt/.git/
-init  ok  
-(recording state in git...)
-$ mkdir -p 1/2/3
-$ touch 1/2/3/foo
-$ git annex add 1/2/3/foo
-add 1/2/3/foo ok
-(recording state in git...)
-$ git annex sync
-commit  
-[master (root-commit) 25e1676] git-annex in
-:/mntt
- 1 file changed, 1 insertion(+)
- create mode 120000 1/2/3/foo
-ok
-$ git annex unlock 1/2/3/foo
-unlock 1/2/3/foo ok
-(recording state in git...)
-$ echo "bar" >> 1/2/3/foo
-$ cd 1/2/3
-$ git annex add foo --debug
-[2016-08-23 14:47:21.764271] read: git 
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","ls-files","--others","--exclude-standard","-z","--","foo"]
-[2016-08-23 14:47:21.766481] read: git 
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","ls-files","--modified","-z","--","foo"]
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-fatal: '../1/2/3/foo' is outside repository
-git-annex: git check-attr EOF: user error
-git-annex: smudge: 1 failed
-error: external filter git-annex smudge --clean %f failed 1
-error: external filter git-annex smudge --clean %f failed
-[2016-08-23 14:47:21.806128] chat: git 
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","check-attr","-z","--stdin","annex.backend","annex.numcopies","annex.largefiles","--"]
-[2016-08-23 14:47:21.806624] read: git ["--version"]
-[2016-08-23 14:47:21.809352] process done ExitSuccess
-[2016-08-23 14:47:21.813764] chat: git 
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","cat-file","--batch"]
-add foo [2016-08-23 14:47:21.818268] read: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","symbolic-ref","-q","HEAD"]
-[2016-08-23 14:47:21.82027] process done ExitSuccess
-[2016-08-23 14:47:21.822862] read: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","show-ref","git-annex"]
-[2016-08-23 14:47:21.825102] process done ExitSuccess
-[2016-08-23 14:47:21.825233] read: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","show-ref","--hash","refs/heads/git-annex"]
-[2016-08-23 14:47:21.82715] process done ExitSuccess
-[2016-08-23 14:47:21.828549] chat: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","cat-file","--batch"]
-ok
-(recording state in git...)
-[2016-08-23 14:47:21.832848] feed: xargs
-["-0","git","--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","add","--"]
-[2016-08-23 14:47:21.836822] process done ExitSuccess
-[2016-08-23 14:47:21.837518] chat: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","hash-object","-w","--stdin-paths","--no-filters"]
-[2016-08-23 14:47:21.838061] feed: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","update-index","-z","--index-info"]
-[2016-08-23 14:47:21.843259] process done ExitSuccess
-[2016-08-23 14:47:21.843444] read: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","show-ref","--hash","refs/heads/git-annex"]
-[2016-08-23 14:47:21.847287] process done ExitSuccess
-[2016-08-23 14:47:21.847602] read: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","write-tree"]
-[2016-08-23 14:47:21.85106] process done ExitSuccess
-[2016-08-23 14:47:21.851221] chat: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","commit-tree","b4a158d15da89e28ef5c2f1782c5b1e3c6f1176c","--no-gpg-sign","-p","refs/heads/git-annex"]
-[2016-08-23 14:47:21.85892] process done ExitSuccess
-[2016-08-23 14:47:21.85907] call: git
-["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","update-ref","refs/heads/git-annex","68381bac2ba0f559d37214c30b5e41a404b9c98b"]
-[2016-08-23 14:47:21.861978] process done ExitSuccess
-# End of transcript or log.
-"""]]
-
-### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
-I've been happily using git-annex on my laptop and server for almost a year; it's saved me a great deal of time and effort.
-Thanks for all your work!
-

diff --git a/doc/bugs/add_fails_with_v6_repo_when_three_levels_deep.mdwn b/doc/bugs/add_fails_with_v6_repo_when_three_levels_deep.mdwn
new file mode 100644
index 0000000..f4307a2
--- /dev/null
+++ b/doc/bugs/add_fails_with_v6_repo_when_three_levels_deep.mdwn
@@ -0,0 +1,137 @@
+### Please describe the problem.
+I've noticed that adding a modified file to a version 6 repo will throw a number of errors if 'git annex add' is executed three or more directories deep from the git directory.
+Though it throws a number of errors, it seems the file is still added normally.
+I have also experienced a problem whereby adding a file will replace it with its key (as if I had run 'git annex drop').
+I'm not sure if that problem is related.
+
+### What steps will reproduce the problem?
+In order to cause the exception, a file already in the repo has to be unlocked, edited, and re-added; this re-adding must take place from three levels below the git directory.
+Here is a minimal working example:
+
+    git init
+    git annex init --version=6
+    mkdir -p 1/2/3
+    touch 1/2/3/foo
+    git annex add 1/2/3/foo
+    git annex sync
+    git annex unlock 1/2/3/foo
+    echo "bar" >> 1/2/3/foo
+    cd 1/2/3
+    git annex add foo 
+
+Specifically, trying to run 'git annex add foo' will result in the following errors being thrown:
+
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    fatal: '../1/2/3/foo' is outside repository
+    git-annex: git check-attr EOF: user error
+    git-annex: smudge: 1 failed
+    error: external filter git-annex smudge --clean %f failed 1
+    error: external filter git-annex smudge --clean %f failed
+    add foo ok
+    (recording state in git...)
+
+
+### What version of git-annex are you using? On what operating system?
+I'm currently running version 6.20160720-g9f0428e on Arch Linux (x86), though I've experienced this problem since at least February.
+
+### Please provide any additional information below.
+
+[[!format sh """
+# If you can, paste a complete transcript of the problem occurring here.
+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
+$ git init; git annex init --version=6
+Initialized empty Git repository in /mnt/.git/
+init  ok  
+(recording state in git...)
+$ mkdir -p 1/2/3
+$ touch 1/2/3/foo
+$ git annex add 1/2/3/foo
+add 1/2/3/foo ok
+(recording state in git...)
+$ git annex sync
+commit  
+[master (root-commit) 25e1676] git-annex in
+:/mntt
+ 1 file changed, 1 insertion(+)
+ create mode 120000 1/2/3/foo
+ok
+$ git annex unlock 1/2/3/foo
+unlock 1/2/3/foo ok
+(recording state in git...)
+$ echo "bar" >> 1/2/3/foo
+$ cd 1/2/3
+$ git annex add foo --debug
+[2016-08-23 14:47:21.764271] read: git 
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","ls-files","--others","--exclude-standard","-z","--","foo"]
+[2016-08-23 14:47:21.766481] read: git 
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","ls-files","--modified","-z","--","foo"]
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+fatal: '../1/2/3/foo' is outside repository
+git-annex: git check-attr EOF: user error
+git-annex: smudge: 1 failed
+error: external filter git-annex smudge --clean %f failed 1
+error: external filter git-annex smudge --clean %f failed
+[2016-08-23 14:47:21.806128] chat: git 
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","check-attr","-z","--stdin","annex.backend","annex.numcopies","annex.largefiles","--"]
+[2016-08-23 14:47:21.806624] read: git ["--version"]
+[2016-08-23 14:47:21.809352] process done ExitSuccess
+[2016-08-23 14:47:21.813764] chat: git 
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","cat-file","--batch"]
+add foo [2016-08-23 14:47:21.818268] read: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","symbolic-ref","-q","HEAD"]
+[2016-08-23 14:47:21.82027] process done ExitSuccess
+[2016-08-23 14:47:21.822862] read: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","show-ref","git-annex"]
+[2016-08-23 14:47:21.825102] process done ExitSuccess
+[2016-08-23 14:47:21.825233] read: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","show-ref","--hash","refs/heads/git-annex"]
+[2016-08-23 14:47:21.82715] process done ExitSuccess
+[2016-08-23 14:47:21.828549] chat: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","cat-file","--batch"]
+ok
+(recording state in git...)
+[2016-08-23 14:47:21.832848] feed: xargs
+["-0","git","--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","add","--"]
+[2016-08-23 14:47:21.836822] process done ExitSuccess
+[2016-08-23 14:47:21.837518] chat: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","hash-object","-w","--stdin-paths","--no-filters"]
+[2016-08-23 14:47:21.838061] feed: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","update-index","-z","--index-info"]
+[2016-08-23 14:47:21.843259] process done ExitSuccess
+[2016-08-23 14:47:21.843444] read: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","show-ref","--hash","refs/heads/git-annex"]
+[2016-08-23 14:47:21.847287] process done ExitSuccess
+[2016-08-23 14:47:21.847602] read: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","write-tree"]
+[2016-08-23 14:47:21.85106] process done ExitSuccess
+[2016-08-23 14:47:21.851221] chat: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","commit-tree","b4a158d15da89e28ef5c2f1782c5b1e3c6f1176c","--no-gpg-sign","-p","refs/heads/git-annex"]
+[2016-08-23 14:47:21.85892] process done ExitSuccess
+[2016-08-23 14:47:21.85907] call: git
+["--git-dir=../../../.git","--work-tree=../../..","--literal-pathspecs","update-ref","refs/heads/git-annex","68381bac2ba0f559d37214c30b5e41a404b9c98b"]
+[2016-08-23 14:47:21.861978] process done ExitSuccess
+# End of transcript or log.
+"""]]
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+I've been happily using git-annex on my laptop and server for almost a year; it's saved me a great deal of time and effort.
+Thanks for all your work!
+

Added a comment: Nevermind - broken symlinks will be fixed on commit
diff --git a/doc/walkthrough/renaming_files/comment_5_bc3e37868b276c52a51586641cdb92ae._comment b/doc/walkthrough/renaming_files/comment_5_bc3e37868b276c52a51586641cdb92ae._comment
new file mode 100644
index 0000000..5ca3bad
--- /dev/null
+++ b/doc/walkthrough/renaming_files/comment_5_bc3e37868b276c52a51586641cdb92ae._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="dusty@dba9614abc02e013134f95c2c59181a6c12a8468"
+ nickname="dusty"
+ subject="Nevermind - broken symlinks will be fixed on commit"
+ date="2016-08-23T21:53:05Z"
+ content="""
+
+Didn't catch this from the docs above: 
+
+\"Notice that, since annexed files are represented by symlinks, the symlink will break when the file is moved into a subdirectory. But, git-annex will fix this up for you when you commit -- it has a pre-commit hook that watches for and corrects broken symlinks.\"
+
+
+"""]]

Added a comment: moving files with git mv can yield broken symlink
diff --git a/doc/walkthrough/renaming_files/comment_4_1cf4cb6be73223755cb611ec097d1498._comment b/doc/walkthrough/renaming_files/comment_4_1cf4cb6be73223755cb611ec097d1498._comment
new file mode 100644
index 0000000..beeccc6
--- /dev/null
+++ b/doc/walkthrough/renaming_files/comment_4_1cf4cb6be73223755cb611ec097d1498._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="dusty@dba9614abc02e013134f95c2c59181a6c12a8468"
+ nickname="dusty"
+ subject="moving files with git mv can yield broken symlink"
+ date="2016-08-23T21:48:59Z"
+ content="""
+Hey Joey,
+
+Just wondering how we rename/move files around into different directories within a repository without breaking the symbolic links. If we move to a different directory and the depth is different than where the files were originally in the repo then the symbolic link is broken.
+
+Thanks
+"""]]

Added a comment: adjusted branche to "focus" on a specific subtree
diff --git a/doc/design/adjusted_branches/comment_5_882520747d41500d0ea8a18ab817121c._comment b/doc/design/adjusted_branches/comment_5_882520747d41500d0ea8a18ab817121c._comment
new file mode 100644
index 0000000..91f5d82
--- /dev/null
+++ b/doc/design/adjusted_branches/comment_5_882520747d41500d0ea8a18ab817121c._comment
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="zack"
+ subject="adjusted branche to "focus" on a specific subtree"
+ date="2016-08-22T14:19:57Z"
+ content="""
+I'm having hard time supporting the following use case with git-annex:
+
+* using git annex so that \"git annex sync --content\" import in batch pictures from a camera SD card
+* destination of the import is a \"pictures/INCOMING\" subdir of a larger \"multimedia archive\" annex
+* I do not want to have all the other folders of the annex (parent and siblings of pictures/INCOMING) present on the SD card
+
+I wonder if adjusted branches might be a solution to this.
+Do I get it right that \"unlocked\" is currently the only supported kind of adjustment?
+
+If so, I'm not sure what would be needed to make the above use case feasible.
+At first sight though, commits int the adjusted branch that \"mounts\" pictures/INCOMING/ are conceptually easy to translate to the main branch: the changes would be the same, only they'll have to be applied in a specific subtree.
+They won't merge cleanly though.
+
+Is this an interesting/worthwhile use case for adjusted branches, or am I looking into the wrong part of git-annex design?
+
+Thanks for this amazing tool!
+"""]]

Added a comment
diff --git a/doc/forum/how_to_disaster_recovery/comment_4_444579d0dac2ca14e6b1cbadcca5fcf3._comment b/doc/forum/how_to_disaster_recovery/comment_4_444579d0dac2ca14e6b1cbadcca5fcf3._comment
new file mode 100644
index 0000000..7ded573
--- /dev/null
+++ b/doc/forum/how_to_disaster_recovery/comment_4_444579d0dac2ca14e6b1cbadcca5fcf3._comment
@@ -0,0 +1,24 @@
+[[!comment format=mdwn
+ username="jd.schroeder@0c8632a8f2bffdd4b0de05a0a3660f32acdfeeca"
+ nickname="jd.schroeder"
+ subject="comment 4"
+ date="2016-08-20T16:17:07Z"
+ content="""
+Unfortunately, I'm not familiar with the errors that git fsck is giving you, so I should defer to someone who knows more. I don't want to tell you something that makes the problem worse :)
+
+If repairing doesn't work, one other thing you could try is cloning the repository that's giving you trouble, and using git annex to move the data into the new clone. This won't modify your original (defective) repository.
+
+    git clone /path/to/repository /path/to/newClone
+    cd /path/to/newClone
+    git annex get --all
+
+If you have files in your original repository that the assistant hasn't committed yet, they won't be in the new clone. So you should look around in /path/to/newClone to see if everything is there. You can run
+
+    cd /path/to/repository
+    git status
+
+to see any files that have not yet been committed in the defective repository, and copy them over manually.
+
+Good luck! Hope you get it working.
+
+"""]]

Added a comment
diff --git a/doc/forum/how_to_disaster_recovery/comment_3_52ad88121efa92d2c64bb2816884d66b._comment b/doc/forum/how_to_disaster_recovery/comment_3_52ad88121efa92d2c64bb2816884d66b._comment
new file mode 100644
index 0000000..c069190
--- /dev/null
+++ b/doc/forum/how_to_disaster_recovery/comment_3_52ad88121efa92d2c64bb2816884d66b._comment
@@ -0,0 +1,67 @@
+[[!comment format=mdwn
+ username="openmedi"
+ subject="comment 3"
+ date="2016-08-20T14:59:17Z"
+ content="""
+Thanks you so much for the suggestions! I tried running `git annex fsck` which yielded no errors and also ran `git fsck` which gave the following output:
+
+```
+error in tree 317eed096daa6d5efde4621ea57b698e17a44827: duplicateEntries: contains duplicate file entries
+error in tree 5d03ab540eb58fef3cba9466d0f404a2f487acbe: duplicateEntries: contains duplicate file entries
+error in tree 8001d121ff90053597e56ee6b9e4dd7d36e5ff25: duplicateEntries: contains duplicate file entries
+error in tree 9eea5dcfc9d0ab387165b91e11ecf6433d501e88: duplicateEntries: contains duplicate file entries
+error in tree c7c1bbde3d9479cbb44a5adbe763e9a90577fcbd: duplicateEntries: contains duplicate file entries
+error in tree f7544950f810acacb43647719ab77427dced34da: duplicateEntries: contains duplicate file entries
+Checking object directories: 100% (256/256), done.
+Checking connectivity: 403770, done.
+dangling blob 0a37708d72fe5cfeb0421372874557c45be3bed5
+dangling blob 7c6e000baabaa9a3b451bc4a058c8a1743598a4b
+dangling tree 8001d121ff90053597e56ee6b9e4dd7d36e5ff25
+dangling blob 7c76f1e9b6c2bc2189d11db526d4d615bfbda98a
+dangling blob f69212b0c58b43e5d935cfc39fdf6b1751cb5286
+dangling blob 3ddcb33a4a10db7a7c5f7baba730515758b47552
+dangling blob 9feae3d7a5786071826d0ec92289178c2fbbf915
+dangling blob 683f54561577372de1083e231e25eede7a978a2a
+dangling blob ffd8254bc8d78f4dfa180b7b3846bd9af7ad4e0a
+dangling blob 20e2b593b9d93cb3b9f39fd9e22dcbe3427cc369
+dangling blob 500da653dfcb37895e64be4959155e03d352fcbb
+dangling blob d61e26a6e41c547ad135ef6b58f64bd00ad0b31f
+dangling blob 38a9462b54afe85ee24e01b0c4d0fbd75eb5a240
+dangling blob 39b6962714399c604a65b350a21795e00e44b4f5
+dangling blob 71f3b6ca386913456a7de6a31b56729d6f8c36c9
+dangling blob dde4a7fea11398020fed287c4d31780909580e5d
+dangling blob 943b98bbee781a7c68befd37700ab8503a17503c
+dangling blob dc99f8b37db7bdc361c6d7973ab863674b2c59b3
+dangling blob 83b7388589b510388e4c08e2963ec10f21355e63
+dangling blob 63c1e85eedc424c297e5f36f6bc705982471fdce
+dangling blob 11d9d8a2c45f4d8b0479513e2f65352cfd0863d0
+dangling blob 9ce519f47e5a7dd8c923fcb55693a22d82e21779
+dangling blob c1ea698236b21eede67d01a8dd52c877962d1845
+dangling blob 24f6096646c9df777f2a81f40bbdef456f0e754d
+dangling blob a4fb09b357878b1cf31cd2151eb9d0fab2f0b452
+dangling blob ff0dda6cd8a6f882fdf81717519b1abb2c347a3e
+dangling blob a0500a7a450c487a3deeba9915c8f0a88f91b538
+dangling blob 31542a921878a024ec2dbe5815f58da6b6b33e2c
+dangling blob 6b6c6a8eb15fbab7f878396d0f084faa22c73382
+dangling tree 5d03ab540eb58fef3cba9466d0f404a2f487acbe
+dangling blob 87319bda4de4424f60e384fe5c3c14c2ce399d10
+dangling blob d8360b3ffc67ccb1478a797370cbb2112589e13a
+dangling blob 90e18b4beb5e5aedefdab98b57ccf636fb77e046
+dangling blob 06e24bc228ae12504a2bcbe9d3d24f263ba0a209
+dangling blob d2eb8b104d2c002ded4ec76e440dee88f5174a39
+dangling blob e7addc9b07f4938d5871eb67278f64c1d15b2cb4
+dangling blob ff02ddf430604f4a60e3bc7b70804ff1f539dedb
+dangling blob 8c04bdb8cef6265ccde6b7491a57f3869c7d6b23
+dangling blob 8d83dd50a078efda7b60de1900736fbd77a2c5a6
+dangling tree 9eea5dcfc9d0ab387165b91e11ecf6433d501e88
+dangling blob 2011ce2b12529ec512b5c6b75bb6acdf3cbc5e82
+dangling blob 8d6d6e3ea481ddc9eb697c7e4c61479b212157c6
+dangling blob 68f62e8d6902b0de28c6f28899be73c6864d58e2
+dangling blob 97f77e273d92ebc908cfcc3b81dbbc28d10ae090
+dangling blob be24efa8af600f0ac331872e0769b18aa36a17c8
+dangling blob cd257f99eef789d2ce8f7f78d2e80c99311bf8b5
+dangling blob 4e973f9d9b9900d01f2d1f1815609e80b1fcf4a5
+```
+
+I'm now running git annex repair through the command line and hoping for the best. I'm sure this will run for a while. The output so far is just `Running git fsck ...` but I can see it's doing something since the terminal application in osx shows what commands it's currently running in the header of the window itself. I'm hoping this repair will finnish until tomorrow morning because I have a flight coming up at 8. Let's see.
+"""]]

diff --git a/doc/forum/Install_git_annex_v6_in_Ubuntu_14.04_Trusty.mdwn b/doc/forum/Install_git_annex_v6_in_Ubuntu_14.04_Trusty.mdwn
new file mode 100644
index 0000000..27d53bd
--- /dev/null
+++ b/doc/forum/Install_git_annex_v6_in_Ubuntu_14.04_Trusty.mdwn
@@ -0,0 +1 @@
+How can I get v6 for ubuntu trusty?

diff --git a/doc/forum/Remote_type_to_make_portable_HDD_like_normal_but_indexed.mdwn b/doc/forum/Remote_type_to_make_portable_HDD_like_normal_but_indexed.mdwn
new file mode 100644
index 0000000..152990a
--- /dev/null
+++ b/doc/forum/Remote_type_to_make_portable_HDD_like_normal_but_indexed.mdwn
@@ -0,0 +1,13 @@
+Hello,
+
+I am pretty paranoid when it comes to my backups. I have a couple of live backups, but also take snapshots now and again and store these on offline hard drives in different places. I would like to use git-annex to keep track of what backup files I have and where. I encrypt all of my backup files, so the hard drive/repository does not need to be encrypted and I would prefer that so that there were fewer things that can go wrong -- I ideally want the files just sitting on the disk as a list of .gpg files, but with git annex able to tell me what I put on there/that the file I need is on there/count it towards any “number of copies” calculations.
+
+I have had a quick play with git annex and it seems I only have a couple of options:
+1) an (encrypted or unencrypted) bare repository, which I’m not keen on because I can’t see my files happily sitting there; or
+2) a clone of the whole git repository, but I’m concerned that this means any access details to things like my box.com account or whatever would be sitting on the drive in plaintext.
+
+Is there something else that I’ve missed or misunderstood?
+
+Many thanks!
+
+Aaron

new OSX autobuilder
diff --git a/doc/install/OSX.mdwn b/doc/install/OSX.mdwn
index 6b333dd..10fc8ba 100644
--- a/doc/install/OSX.mdwn
+++ b/doc/install/OSX.mdwn
@@ -18,9 +18,7 @@ several more. Handy if you don't otherwise have git installed.
 
 ## autobuilds
 
-[[Joey]] autobuilds the app for 10.10 Yosemite
-(also reported to work on 10.9 Mavericks and 10.11 El Capitan).
-Thanks to Kevin McKenzie for hosting the autobuilder.
+Thanks to Dartmouth for hosting the autobuilder.
 
 * [autobuild of git-annex.dmg](https://downloads.kitenet.net/git-annex/autobuild/x86_64-apple-yosemite/git-annex.dmg) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/x86_64-apple-yosemite/))
 

Added a comment
diff --git a/doc/forum/how_to_disaster_recovery/comment_2_31cce673114eb9733e0f1c732c8f08e6._comment b/doc/forum/how_to_disaster_recovery/comment_2_31cce673114eb9733e0f1c732c8f08e6._comment
new file mode 100644
index 0000000..cef32b7
--- /dev/null
+++ b/doc/forum/how_to_disaster_recovery/comment_2_31cce673114eb9733e0f1c732c8f08e6._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="jd.schroeder@0c8632a8f2bffdd4b0de05a0a3660f32acdfeeca"
+ nickname="jd.schroeder"
+ subject="comment 2"
+ date="2016-08-17T21:23:34Z"
+ content="""
+You may want to also try
+
+    git fsck
+
+as well.
+"""]]

Added a comment
diff --git a/doc/forum/how_to_disaster_recovery/comment_1_c8db90fd7af13b9605e152ea884b5241._comment b/doc/forum/how_to_disaster_recovery/comment_1_c8db90fd7af13b9605e152ea884b5241._comment
new file mode 100644
index 0000000..4b14667
--- /dev/null
+++ b/doc/forum/how_to_disaster_recovery/comment_1_c8db90fd7af13b9605e152ea884b5241._comment
@@ -0,0 +1,15 @@
+[[!comment format=mdwn
+ username="jd.schroeder@0c8632a8f2bffdd4b0de05a0a3660f32acdfeeca"
+ nickname="jd.schroeder"
+ subject="comment 1"
+ date="2016-08-17T21:18:40Z"
+ content="""
+I don't use the assistant myself, so I may not be much help.
+
+Have you tried opening the terminal and running 
+
+    cd (your repository path)
+    git annex fsck
+
+it may yield more information about what's wrong.
+"""]]

diff --git a/doc/forum/how_to_disaster_recovery.mdwn b/doc/forum/how_to_disaster_recovery.mdwn
new file mode 100644
index 0000000..b4bbe12
--- /dev/null
+++ b/doc/forum/how_to_disaster_recovery.mdwn
@@ -0,0 +1,6 @@
+OS X: 10.11.6
+Annex: git-annex-6.20160619 (via brew)
+
+I'm [still strugling](http://git-annex.branchable.com/forum/git_annex_wants_to_repair_every_time_it__39__s_running/) with my annex repo over here. My problem is that for some reason git annex wants to repair my repo all the time when I'm starting the assistant and this (seemingly) never finishes, so I'm caught in an infinite loop in which no files get uploaded to my various remotes and nothing is downloaded either leaving me with all the data on my hard drive and nothing else. I would like to move on. How can I recover from this state? The daemon.log file doesn't show any information about what is happening during the repair and what might cause the failure. Is there another log file I could look at?
+
+Any help is appreciated at that point. Where should I look for more information? What should I do to change the behaviour? I want to solve this once and for all.

diff --git a/doc/todo/calckey_cannot_be_used_outside_of_git_repo.mdwn b/doc/todo/calckey_cannot_be_used_outside_of_git_repo.mdwn
new file mode 100644
index 0000000..06645a1
--- /dev/null
+++ b/doc/todo/calckey_cannot_be_used_outside_of_git_repo.mdwn
@@ -0,0 +1,11 @@
+Not sure if this is a bug or a feature request, but calckey can only be used while inside a git repository (though the specified file can be anywhere).
+
+Can this be changed so it can be run from anywhere?
+
+    ~$ git annex version
+    git-annex version: 6.20160613-g1e4e6f4
+
+    ~$ git annex calckey /some/file/some/wh.ere
+    git-annex: Not in a git repository.
+    CallStack (from HasCallStack):
+      error, called at ./Git/CurrentRepo.hs:55:37 in main:Git.CurrentRepo

Added a comment: RE: comment 1
diff --git a/doc/forum/git_annex_file_content_replaced_with_symlink_content/comment_2_da848024c40eb65e6214bd95b73e078e._comment b/doc/forum/git_annex_file_content_replaced_with_symlink_content/comment_2_da848024c40eb65e6214bd95b73e078e._comment
new file mode 100644
index 0000000..2e619f8
--- /dev/null
+++ b/doc/forum/git_annex_file_content_replaced_with_symlink_content/comment_2_da848024c40eb65e6214bd95b73e078e._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="thnetos"
+ subject="RE: comment 1"
+ date="2016-08-16T20:39:38Z"
+ content="""
+Thanks for the info, that was very helpful. This is indeed a FAT partition I created on OSX.
+
+Unfortunately, I no longer use OSX, so I don't have a machine that can read this data. I'll write a script to grab it from the contents of the symlink file itself to hopefully retrieve everything. In the future, I'll partition my external harddrives with ext4 :)
+
+Thanks again!
+"""]]

diff --git a/doc/todo/fix_git-annex-smudge.1.mdwn b/doc/todo/fix_git-annex-smudge.1.mdwn
new file mode 100644
index 0000000..62afa52
--- /dev/null
+++ b/doc/todo/fix_git-annex-smudge.1.mdwn
@@ -0,0 +1,24 @@
+Fixing errors in the git-annex-smudge manage.
+
+```
+The following changes since commit fa15580d1a55aef612a4a973e74e1728c371e98f:
+
+   (2016-08-16 15:14:37 +0000)
+
+are available in the git repository at:
+
+  https://git.jim.sh/jim/git-annex.git jim
+
+for you to fetch changes up to e2a55fdbaeb4acfd09910649689868f1c4f0625b:
+
+  Don't escape leading dots in code blocks in manpage (2016-08-16 11:51:16 -0400)
+
+----------------------------------------------------------------
+Jim Paris (2):
+      Fix path in git-annex-smudge(1)
+      Don't escape leading dots in code blocks in manpage
+
+ Build/mdwn2man            | 2 +-
+ doc/git-annex-smudge.mdwn | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+```

diff --git a/doc/forum/__34__git_add__34___vs___34__git_annex_add__34___in_v6.mdwn b/doc/forum/__34__git_add__34___vs___34__git_annex_add__34___in_v6.mdwn
new file mode 100644
index 0000000..493344e
--- /dev/null
+++ b/doc/forum/__34__git_add__34___vs___34__git_annex_add__34___in_v6.mdwn
@@ -0,0 +1,5 @@
+Prior to v6, I used `git annex add` for files that should go into the annex, and `git add` for files that should be tracked in git normally.  With v6, `git add` silently adds to the annex instead, which surprised me because I didn't expect the file contents to still only reside only on the source computer after a push!  I don't have `annex.largefiles` set, but it seems like this is intended behavior.  Is there a way to return to v5 behavior for those two commands?  Is it safe to just remove the smudge/clean filter?  If so, is there a way to remove it in such a way that it propagates to all repositories?  (It's currently set in `.git/info/attributes`, which overrides `.gitattributes`).
+
+Having to come up a generic rule for `annex.largefiles` to cover all of my distinctions is difficult, and it's tedious to re-specify it for each new file.  I'd much rather just be able to continue using git as usual, and explicitly choose when to invoke git-annex.
+
+Jim

Added a comment
diff --git a/doc/forum/git_annex_file_content_replaced_with_symlink_content/comment_1_f6f4be7161d4c35c7de1d9751ddbd3c3._comment b/doc/forum/git_annex_file_content_replaced_with_symlink_content/comment_1_f6f4be7161d4c35c7de1d9751ddbd3c3._comment
new file mode 100644
index 0000000..c55ee2d
--- /dev/null
+++ b/doc/forum/git_annex_file_content_replaced_with_symlink_content/comment_1_f6f4be7161d4c35c7de1d9751ddbd3c3._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="jimparis"
+ subject="comment 1"
+ date="2016-08-16T14:41:34Z"
+ content="""
+It seems like that is how [OSX stores symlinks on FAT filesystems](https://opensource.apple.com/source/msdosfs/msdosfs-185.2/msdosfs.kextproj/msdosfs.kmodproj/fat.h?txt) and how [Samba stores symlinks on Windows](https://wiki.samba.org/index.php/UNIX_Extensions#Storing_symlinks_on_Windows_servers).  Did you initially make the drive on one of those systems?  Using the same system again would probably make them appear like normal usable symlinks.
+
+At the very least, since you said `.git/annex` is full of data, I think you should be able to find the photo at the location listed in the last line of those files:
+
+```
+../.git/annex/objects/5F/Xw/SHA256E-s2499217--ad9525adf9a82e4ac83c89fd2bddfd2b2aef690ccbbddf38d91abc85f72509f6.jpg/SHA256E-s2499217--ad9525adf9a82e4ac83c89fd2bddfd2b2aef690ccbbddf38d91abc85f72509f6.jpg
+```
+
+"""]]

Added a comment
diff --git a/doc/bugs/check_version/comment_1_857177c710cd0d09fa2ae0a99862a4fa._comment b/doc/bugs/check_version/comment_1_857177c710cd0d09fa2ae0a99862a4fa._comment
new file mode 100644
index 0000000..5fdef56
--- /dev/null
+++ b/doc/bugs/check_version/comment_1_857177c710cd0d09fa2ae0a99862a4fa._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="ilovezfs"
+ subject="comment 1"
+ date="2016-08-15T01:54:58Z"
+ content="""
+it's
+
+git annex version
+
+not
+
+git annex --version
+"""]]

diff --git a/doc/bugs/check_version.mdwn b/doc/bugs/check_version.mdwn
new file mode 100644
index 0000000..42334e1
--- /dev/null
+++ b/doc/bugs/check_version.mdwn
@@ -0,0 +1 @@
+I'd like to be able to check the git annex version with `git annex --version`, to know if it's 5 or 6.

Added a comment: Howto verify encrypted files
diff --git a/doc/backends/comment_18_784b29b086503a2b4913558350526ee1._comment b/doc/backends/comment_18_784b29b086503a2b4913558350526ee1._comment
new file mode 100644
index 0000000..43c554f
--- /dev/null
+++ b/doc/backends/comment_18_784b29b086503a2b4913558350526ee1._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="junk@5e3eeba2290e8a3fcf938d9f93b0dfa2565dc7b1"
+ nickname="junk"
+ subject="Howto verify encrypted files"
+ date="2016-08-14T17:07:03Z"
+ content="""
+Hi,
+
+I'd like to be able verify the consistancy of the files on a rsync remote without having access to the git repository or the gpg-key. This can easily be done with unencrypted files by running \"sha256sum filename\". Is there a way to do the same thing with encrypted files?
+
+Thank you very much!
+"""]]

diff --git a/doc/forum/download_from_multiple_remotes_in_parallel.mdwn b/doc/forum/download_from_multiple_remotes_in_parallel.mdwn
new file mode 100644
index 0000000..d749929
--- /dev/null
+++ b/doc/forum/download_from_multiple_remotes_in_parallel.mdwn
@@ -0,0 +1,9 @@
+Hey everyone, 
+
+I have the situation that there are two remote repositories A and B, both of which have several files that I want to get. The problem is that both A and B have limited upstream, so launching several threads downloading from A would not speed up the download, but downloading from A and B in parallel would help significantly.
+
+When I git-annex-get these files, my dream would be that specifying --jobs=2 has the effect that thread #1 only downloads from A and thread #2 only downloads from B. If this is the case, great, but if it is not (and I expect it to not be the case), is there any way to get files in parallel from A and B, but only ever having one connection to each of these repositories?
+
+Thanks a lot!
+
+

added :ga_get and :ga_set
diff --git a/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn b/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
index 720baf3..9a89a54 100644
--- a/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
+++ b/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
@@ -2,7 +2,11 @@ If you use [ranger](https://github.com/ranger/ranger), the console-based file ma
 
 ## Custom commands
 
-ranger lets you [define custom commands](https://github.com/ranger/ranger/wiki/Commands) that can be called. Basically you could easily write proxy ranger commands for all git-annex commands you use. [Here](https://github.com/fiatjaf/dotfiles/blob/master/ranger-commands.py) have written `:ga_whereis` for outputting whereis information, and `:ga_set` and `:ga_tag` for metadata settting.
+ranger lets you [define custom commands](https://github.com/ranger/ranger/wiki/Commands) that can be called. Basically you could easily write proxy ranger commands for all git-annex commands you use. [Here](https://github.com/fiatjaf/dotfiles/blob/master/ranger-commands.py) have written
+
+  * `:ga_whereis` for outputting whereis information;
+  * `:ga_set` and `:ga_tag` for metadata changing;
+  * `:ga_get` and `:ga_drop` for quick fetching from remotes and dropping them from local (really useful).
 
 ## Linemodes
 

diff --git a/doc/bugs/git-annex.cabal__58___persistent___61____61__2.2.4.1.mdwn b/doc/bugs/git-annex.cabal__58___persistent___61____61__2.2.4.1.mdwn
new file mode 100644
index 0000000..38e22e3
--- /dev/null
+++ b/doc/bugs/git-annex.cabal__58___persistent___61____61__2.2.4.1.mdwn
@@ -0,0 +1,22 @@
+### Please describe the problem.
+Cf. https://github.com/joeyh/git-annex/pull/56
+patch url: https://github.com/joeyh/git-annex/pull/56.patch
+
+Goes together with Homebrew PR https://github.com/Homebrew/homebrew-core/pull/3724
+
+Homebrew Jenkins CI timed out after two hours with Solver
+still trying to find a solution.
+
+### What steps will reproduce the problem?
+Using --flags=s3\ webapp and --max-backjumps=10000
+
+### What version of git-annex are you using? On what operating system?
+6.20160808 macOS 10.9, 10.10, 10.11
+
+### Please provide any additional information below.
+This is a follow-up to https://github.com/joeyh/git-annex/commit/18e458db,
+since there's been a regression in the situation between 6.20160619 and
+6.20160808, probably simply because Hackage is a moving target.
+
+Proposed solution is to set persistent (==2.2.4.1) instead of
+persistent (<2.5) in git-annex.cabal

Added a comment
diff --git a/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_9_16c004fe7c77cbbba113787ce6410c9e._comment b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_9_16c004fe7c77cbbba113787ce6410c9e._comment
new file mode 100644
index 0000000..6c76241
--- /dev/null
+++ b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_9_16c004fe7c77cbbba113787ce6410c9e._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ subject="comment 9"
+ date="2016-08-09T20:17:47Z"
+ content="""
+I'm the git-remote-gcrypt maintainer, but as it stands it's not really possible to do anything about this bug without steps to reliably reproduce the corrupted/unencrypted remote repository.
+
+I have been using git-remote-gcrypt with git-annex and with plain git repos for more than two years and I have never encountered anything like this issue.  So there's no starting point to work on a fix for the issue.
+"""]]

Added a comment: Hmmm, seems odd such a serious bug is allowed to linger without serious investigation
diff --git a/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_8_39139e25175ae265a4dc15f0b6b7b618._comment b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_8_39139e25175ae265a4dc15f0b6b7b618._comment
new file mode 100644
index 0000000..7629d45
--- /dev/null
+++ b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_8_39139e25175ae265a4dc15f0b6b7b618._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="pot"
+ subject="Hmmm, seems odd such a serious bug is allowed to linger without serious investigation"
+ date="2016-08-09T19:22:48Z"
+ content="""
+Should a developer not be all over this, would seem like a very major issue with the gcrypt backend (and annex's interaction with it) that this outcome could even be possible. You can't be using an encrypted store, which becomes irrepairably corrupted and with some of your data sat outside, unencrypted!
+
+Any thoughts from more knowledgeable developers on how to fix, investigate further, or do something useful on this front?
+"""]]

Forum post about weird repository state
diff --git a/doc/forum/git_annex_file_content_replaced_with_symlink_content.mdwn b/doc/forum/git_annex_file_content_replaced_with_symlink_content.mdwn
new file mode 100644
index 0000000..654a1af
--- /dev/null
+++ b/doc/forum/git_annex_file_content_replaced_with_symlink_content.mdwn
@@ -0,0 +1,32 @@
+I have a git-annex repository on a USB drive (full of pictures), however, when I go to the actual drive:
+
+    $ cd /run/media/hinmanm/MINIDRIVE1/pics
+    $ ls -lh australia-2014-03
+
+I get:
+
+    -rw-r--r--. 1 hinmanm hinmanm 1.1K Aug 22  2015 IMG_20140321_181130.jpg
+    -rw-r--r--. 1 hinmanm hinmanm 1.1K Aug 22  2015 IMG_20140321_181137.jpg
+    -rw-r--r--. 1 hinmanm hinmanm 1.1K Aug 22  2015 IMG_20140321_181221.jpg
+    -rw-r--r--. 1 hinmanm hinmanm 1.1K Aug 22  2015 IMG_20140321_181228.jpg
+    -rw-r--r--. 1 hinmanm hinmanm 1.1K Aug 22  2015 IMG_20140321_181233.jpg
+    ... hundreds more .jpg files that are all 1.1K ...
+
+It looks like the files think they are symlinks, instead of pictures:
+
+```
+$ cat australia-2014-03/IMG_20140321_181233.jpg
+XSym
+0201
+2ac7522707415dfe67ad5afa1ab3e516
+../.git/annex/objects/5F/Xw/SHA256E-s2499217--ad9525adf9a82e4ac83c89fd2bddfd2b2aef690ccbbddf38d91abc85f72509f6.jpg/SHA256E-s2499217--ad9525adf9a82e4ac83c89fd2bddfd2b2aef690ccbbddf38d91abc85f72509f6.jpg
+```
+
+Running `git-annex fsck` doesn't do anything, and trying to do `git-annex indirect` gives me:
+
+```
+$ git-annex indirect                                  
+git-annex: This repository seems to be on a crippled filesystem, you must use direct mode.
+```
+
+It looks like there is still a bunch of data in `.git/annex`, as its 6.7gb. Is there a way I can get the files back and get git-annex working again, right now none of my photos are available :(

add news item for git-annex 6.20160808
diff --git a/doc/news/version_6.20160511.mdwn b/doc/news/version_6.20160511.mdwn
deleted file mode 100644
index 9dbb5c1..0000000
--- a/doc/news/version_6.20160511.mdwn
+++ /dev/null
@@ -1,34 +0,0 @@
-git-annex 6.20160511 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * Fix bug that sometimes prevented git-annex smudge --clean from consuming
-     all its input, which resulted in git add bypassing git-annex.
-   * Fix build with directory-1.2.6.2.
-   * Improve behavior when a just added http remote is not available
-     during uuid probe. Do not mark it as annex-ignore, so it will be tried
-     again later.
-   * Android: Icon refresh.
-     Thanks, freewheelinfranks.
-   * Added DIRHASH-LOWER to external special remote protocol.
-   * git-annex.cabal: Add Setup-Depends.
-   * stack.yaml: Enable explicit-setup-deps.
-   * Windows: Fix several bugs in propigation of changes from the adjusted
-     branch back to the master branch.
-   * Windows: Fix an over-long temp directory name.
-   * map: Hide dead repositories that are not connected to the graph.
-   * map: Changed colors; red is used for untrusted repositories and grey
-     for dead.
-   * version: Display OS version and architecture too.
-   * Propigate GIT\_DIR and GIT\_WORK\_TREE environment to external special
-     remotes.
-   * Added annex.gnupg-decrypt-options and
-     remote.&lt;name&gt;.annex-gnupg-decrypt-options, which are passed to gpg
-     when it's decrypting data.
-   * fsck: When a key is not previously known in the location log,
-     record something so that reinject --known will work.
-   * In the unusual configuration where annex.crippledfilesystem=true but
-     core.symlinks=true, store object contents in mixed case hash
-     directories so that symlinks will point to them.
-   * Added new encryption=sharedpubkey mode for special remotes.
-     This is useful for makking a special remote that anyone with a clone
-     of the repo and your public keys can upload files to, but only you can
-     decrypt the files stored in it."""]]
\ No newline at end of file
diff --git a/doc/news/version_6.20160808.mdwn b/doc/news/version_6.20160808.mdwn
new file mode 100644
index 0000000..bc2f11c
--- /dev/null
+++ b/doc/news/version_6.20160808.mdwn
@@ -0,0 +1,27 @@
+git-annex 6.20160808 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * metadata --json output format has changed, adding a inner json object
+     named "fields" which contains only the fields and their values.
+     This should be easier to parse than the old format, which mixed up
+     metadata fields with other keys in the json object.
+     Any consumers of the old format will need to be updated.
+   * Added metadata --batch option, which allows getting, setting, deleting,
+     and modifying metadata for multiple files/keys.
+   * Added --branch option to copy, drop, fsck, get, metadata, mirror, move,
+     and whereis commands. This option makes git-annex operate on files that
+     are included in a specified branch (or other treeish).
+   * git-annex.cabal: Temporarily limit to http-conduit &lt;2.2.0
+     since aws 0.14.0 is not compatible with the newer version.
+   * git-annex.cabal: Temporarily limit to persistent &lt;2.5
+     since esqueleto 2.4.3 is not compatible with the newer version.
+   * Removed dependency on json library; all JSON is now handled by aeson.
+   * When built with uuid-1.3.12, generate more random UUIDs than before.
+     (However, this did not impact git-annex much, so a hard depedency has
+     not been added on uuid-1.3.12.)
+   * info: When run on a file now includes an indication of whether
+     the content is present locally.
+   * get, move, copy, mirror: Added --failed switch which retries
+     failed copies/moves.
+   * Re-enable accumulating transfer failure log files for command-line
+     actions (disabled in 5.20150522), and remove the log files after
+     successful transfers."""]]
\ No newline at end of file

comment
diff --git a/doc/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__/comment_1_741720c1b65fff2f8ecb87abbcf16223._comment b/doc/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__/comment_1_741720c1b65fff2f8ecb87abbcf16223._comment
new file mode 100644
index 0000000..a45ae84
--- /dev/null
+++ b/doc/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__/comment_1_741720c1b65fff2f8ecb87abbcf16223._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-08-08T15:40:55Z"
+ content="""
+As I suggested in email, this could be something like `git annex sync --branch B`
+and --branch could be repeated to add other branches, with the default
+being to sync them all. `git annex sync --branch git-annex` would need to
+be special cased I think.
+"""]]

comment
diff --git a/doc/todo/annex_merge_--remotes/comment_1_d4d1c3dae7cff4119b7c111ac6e6f947._comment b/doc/todo/annex_merge_--remotes/comment_1_d4d1c3dae7cff4119b7c111ac6e6f947._comment
new file mode 100644
index 0000000..a6d05f5
--- /dev/null
+++ b/doc/todo/annex_merge_--remotes/comment_1_d4d1c3dae7cff4119b7c111ac6e6f947._comment
@@ -0,0 +1,29 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-08-08T15:32:19Z"
+ content="""
+There's been discussion of keeping private forks of git-annex
+repositories before.
+
+IIRC, the remote.name.annex-sync and remote.name.annex-readonly
+settings can accomplish that. 
+
+For example, if the private repository A has a remote B, it can set
+annex-readonly, and this will prevent A from pushing any data to B. A
+can still pull from B. If A is on a locked down machine that B cannot
+itsef access, this guarantees that the changes in A remain private.
+I think this is the best way to accomplish this kind of scenario.
+
+If B has A as a remote, then B could set annex-sync to false, which
+would prevent it from pulling from A, and so B would never merge
+in git-annex branches from A, at least unless A pushed them to B.
+Of course, in this scenario, a manual `git pull A` on B bypasses
+the protection.
+
+It might make sense to make git-annex merge honor annex-ignore,
+and skip merging branches that belong to a remote, even if they
+were somehow pulled down. Unfortunately, git's remote branch
+name mapping can be quite complicated; IIRC it's not as simple
+as skipping branches remotes/B/*
+"""]]

diff --git a/doc/forum/__34__git_annex_drop__34___freezes_while___34__locking_origin...__34__.mdwn b/doc/forum/__34__git_annex_drop__34___freezes_while___34__locking_origin...__34__.mdwn
new file mode 100644
index 0000000..b4e9b08
--- /dev/null
+++ b/doc/forum/__34__git_annex_drop__34___freezes_while___34__locking_origin...__34__.mdwn
@@ -0,0 +1,12 @@
+Hi,
+
+I am using git annex 5.20151208-1build1 on my local machine and 5.20151208-g5ef6ed8 on "origin". I can not drop files anymore. "git annex sync --content" has the same problem when it tries to drop files:
+
+    $ git annex drop xyz
+    drop xyz (locking origin...)   <--  waits here for ever
+
+    $ git annex sync --content
+    [git annex is pulling and merging stuff]
+    drop xyz (locking origin...)   <--  waits here for ever
+
+What can I do? Thanks!

Added a comment: How I got it working
diff --git a/doc/tips/flickrannex/comment_17_5bfe0988260b7825eeec204cd8f79b98._comment b/doc/tips/flickrannex/comment_17_5bfe0988260b7825eeec204cd8f79b98._comment
new file mode 100644
index 0000000..200a81a
--- /dev/null
+++ b/doc/tips/flickrannex/comment_17_5bfe0988260b7825eeec204cd8f79b98._comment
@@ -0,0 +1,31 @@
+[[!comment format=mdwn
+ username="fiatjaf"
+ subject="How I got it working"
+ date="2016-08-06T23:51:48Z"
+ content="""
+I'm using [pipsi](https://github.com/mitsuhiko/pipsi) to install packages without polluting the system, [Michael's fork](https://github.com/mikemccracken/flickrannex) from magthe's fork from TobiasTheViking repo (I don't know if the other branches are better or worse, but this is working).
+
+## Instructions
+
+**First thing**: go to https://www.flickr.com/services/apps/create/noncommercial/? and create an app (if you use the keys provided in the flickrannex repository you'll be giving access to your flickr to everybody).
+
+Now follow the steps:
+
+```
+wget https://github.com/mikemccracken/flickrannex/archive/master.zip
+unzip master.zip
+cd flickrannex-master/
+edit setup.py # replace 'flickrapi' with 'flickrapi==1.4.5'
+              # otherwise it will install a wrong version of the dependency.
+edit flickrannex # on lines 46 and 47, replace the api_key and api_secret
+                 # with the values from the application you created in the
+                 # first step.
+pipsi install ./
+cd
+flickrannex # go through the oauth setup, will open a window in the browser
+            # some commands will appear after you're successful. ignore them.
+cd ~/annex # your git-annex folder
+git config annex.flickr-hook $HOME/.local/bin/flickrannex
+git annex initremote flickr type=hook hooktype=flickr encryption=none
+```
+"""]]

better formatting.
diff --git a/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn b/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
index aa3b745..720baf3 100644
--- a/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
+++ b/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
@@ -8,8 +8,8 @@ ranger lets you [define custom commands](https://github.com/ranger/ranger/wiki/C
 
 The small string of information that shows on each file line, aligned to the right, is called a `infostring`. [Linemodes in ranger](https://github.com/ranger/ranger/wiki/Custom-linemodes) lets you change between its default linemodes or add your own custom linemodes. I have written two git-annex linemodes: 
 
-  * [git-annex-metadata](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L8-L51); and
-  * [git-annex-whereis](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L54-L104). The first shows tags and metadata fields from git-annex, the second shows the name of the repositories where each file is (except the current repository, which should be clear from the color ranger puts on the file).
+  * [git-annex-metadata](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L8-L51), which shows tags and metadata fields from git-annex; and
+  * [git-annex-whereis](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L54-L104), which shows the name of the repositories where each file is (except the current repository, as that should be clear from the ranger colours).
 
 To switch linemodes, just type `:linemode git-annex-whereis` or `:linemode git-annex-metadata`.
 

initial page: git-annex for ranger.
diff --git a/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn b/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
new file mode 100644
index 0000000..aa3b745
--- /dev/null
+++ b/doc/tips/git-annex_extensions_for_ranger__44___the_file_manager.mdwn
@@ -0,0 +1,24 @@
+If you use [ranger](https://github.com/ranger/ranger), the console-based file manager, you can benefit of its plugin system to get it easily entangled with git-annex. As far as I know, there 2 main types of extensions:
+
+## Custom commands
+
+ranger lets you [define custom commands](https://github.com/ranger/ranger/wiki/Commands) that can be called. Basically you could easily write proxy ranger commands for all git-annex commands you use. [Here](https://github.com/fiatjaf/dotfiles/blob/master/ranger-commands.py) have written `:ga_whereis` for outputting whereis information, and `:ga_set` and `:ga_tag` for metadata settting.
+
+## Linemodes
+
+The small string of information that shows on each file line, aligned to the right, is called a `infostring`. [Linemodes in ranger](https://github.com/ranger/ranger/wiki/Custom-linemodes) lets you change between its default linemodes or add your own custom linemodes. I have written two git-annex linemodes: 
+
+  * [git-annex-metadata](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L8-L51); and
+  * [git-annex-whereis](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L54-L104). The first shows tags and metadata fields from git-annex, the second shows the name of the repositories where each file is (except the current repository, which should be clear from the color ranger puts on the file).
+
+To switch linemodes, just type `:linemode git-annex-whereis` or `:linemode git-annex-metadata`.
+
+You can also set `default_linemode path=/your/annex/path/.* git-annex-whereis`, for example, to have that linemode automatically set whenever you browse your git-annex folder on ranger.
+
+Beware of folders with too many files, as this will read output from git-annex for all the files, so ranger can freeze for some seconds.
+
+---
+
+As I didn't have any better place to put the code, eveything here is referenced in my [dotfiles repository on GitHub](https://github.com/fiatjaf/dotfiles). Just copy the two referenced files to your `~/.config/ranger/plugins/` folder and `~/.config/ranger/commands.py` file to get this working.
+
+Much other interesting commands and plugins can still be added. Modify this page if you come up with other ideas.

initial desire
diff --git a/doc/todo/annex_merge_--remotes.mdwn b/doc/todo/annex_merge_--remotes.mdwn
new file mode 100644
index 0000000..d1fef7a
--- /dev/null
+++ b/doc/todo/annex_merge_--remotes.mdwn
@@ -0,0 +1,3 @@
+ATM 'annex merge' does not accept any parameter to specify which remotes to consider -- it merges all.  In some cases it might be desirable to merge only information from some remotes (e.g. I keep some annex remote "private" or smth like that)
+
+[[!meta author=yoh]]

fixed up formatting
diff --git a/doc/bugs/reports_success_when_addurl_--batch__a_file_which_is_.gitignore__39__d.mdwn b/doc/bugs/reports_success_when_addurl_--batch__a_file_which_is_.gitignore__39__d.mdwn
index 9d593c7..d4cdaaf 100644
--- a/doc/bugs/reports_success_when_addurl_--batch__a_file_which_is_.gitignore__39__d.mdwn
+++ b/doc/bugs/reports_success_when_addurl_--batch__a_file_which_is_.gitignore__39__d.mdwn
@@ -26,6 +26,6 @@ The following paths are ignored by one of your .gitignore files:
 1exclude.txt
 Use -f if you really want to add them.
 git-annex: user error (xargs ["-0","git","--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.largefiles=exclude=*.txt","add","--"] exited 123)
-]]
+"""]]
 
 [[!meta author=yoh]]

diff --git a/doc/bugs/reports_success_when_addurl_--batch__a_file_which_is_.gitignore__39__d.mdwn b/doc/bugs/reports_success_when_addurl_--batch__a_file_which_is_.gitignore__39__d.mdwn
new file mode 100644
index 0000000..9d593c7
--- /dev/null
+++ b/doc/bugs/reports_success_when_addurl_--batch__a_file_which_is_.gitignore__39__d.mdwn
@@ -0,0 +1,31 @@
+### Please describe the problem.
+
+Reports success although file is not added to git, since ignored due to .gitignore
+
+Although not sure yet if that is annex could actually take care about since probably annex stages those for 'add' command to git so wouldn't know right when addurl is called for a specific file?
+
+### What steps will reproduce the problem?
+
+see below
+
+### What version of git-annex are you using? On what operating system?
+
+6.20160728+gitg9a2fe62-1~ndall+1
+
+
+[[!format sh """
+
+$> rm -rf /tmp/123; mkdir /tmp/123; cd /tmp/123; git init; echo "*exclude*" >| .git/info/exclude; git annex init; { echo "http://www.onerussian.com/tmp/1exclude.txt 1exclude.txt"; echo "2nd one" >&2; echo "http://www.onerussian.com/tmp/2.txt 2.txt"\; } | git annex addurl -c annex.largefiles=exclude=*.txt --batch --json --with-files                                                                       
+Initialized empty Git repository in /tmp/123/.git/
+init  ok
+(recording state in git...)
+2nd one
+{"command":"addurl","key":null,"file":"1exclude.txt","note":"downloading http://www.onerussian.com/tmp/1exclude.txt ...","note":"non-large file; adding content to git repository","success":true}
+{"command":"addurl","key":null,"file":"2.txt;","note":"downloading http://www.onerussian.com/tmp/2.txt ...","key":"SHA256E-s2--53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3.txt","success":true}
+The following paths are ignored by one of your .gitignore files:
+1exclude.txt
+Use -f if you really want to add them.
+git-annex: user error (xargs ["-0","git","--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.largefiles=exclude=*.txt","add","--"] exited 123)
+]]
+
+[[!meta author=yoh]]

diff --git a/doc/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__.mdwn b/doc/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__.mdwn
new file mode 100644
index 0000000..7a401da
--- /dev/null
+++ b/doc/todo/sync_--branches__to_sync_only_specified_branches___40__e.g._git-annex__41__.mdwn
@@ -0,0 +1,3 @@
+As we briefly discussed via email, it would be nice if sync could sync only some branches (e.g. git-annex) not all at once.
+
+[[!meta author=yoh]]

Added a comment: Transcrypt?
diff --git a/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_7_cd6a850119dd1aa0d9bb34c6d8fe560c._comment b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_7_cd6a850119dd1aa0d9bb34c6d8fe560c._comment
new file mode 100644
index 0000000..e7d8b41
--- /dev/null
+++ b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_7_cd6a850119dd1aa0d9bb34c6d8fe560c._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="branchable@1f03006a73aeda463532c8138da071037870395b"
+ nickname="branchable"
+ subject="Transcrypt? "
+ date="2016-08-05T07:28:27Z"
+ content="""
+Any experience with using transcrypt instead of git crypt?
+
+
+https://github.com/elasticdog/transcrypt
+"""]]

Added a comment: re-format for readability
diff --git a/doc/forum/Adding_selected_big_binaries_recursively/comment_3_4be5ca7a22db19a3152b54bee943f58c._comment b/doc/forum/Adding_selected_big_binaries_recursively/comment_3_4be5ca7a22db19a3152b54bee943f58c._comment
new file mode 100644
index 0000000..c0f9a03
--- /dev/null
+++ b/doc/forum/Adding_selected_big_binaries_recursively/comment_3_4be5ca7a22db19a3152b54bee943f58c._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="JohnFisher"
+ subject="re-format for readability"
+ date="2016-08-04T20:48:55Z"
+ content="""
+    jfisher@buildos1:~/annex$ cat .gitattributes
+    * annex.largefiles=(largerthan=100mb)
+
+    jfisher@buildos1:~/annex$ git config -l
+    user.email=jfisher@intouchhealth.com
+    user.name=John Fisher
+    core.repositoryformatversion=0
+    core.filemode=true
+    core.bare=false
+    core.logallrefupdates=true
+    annex.uuid=75d91aa9-f5fc-45b8-b62c-e6050ed7c3d5
+annex.version=5
+
+"""]]

Added a comment: didn't work for me, perhaps I did the attributes wrong?
diff --git a/doc/forum/Adding_selected_big_binaries_recursively/comment_2_872bef6902ddb362b62d5e9ec1afe864._comment b/doc/forum/Adding_selected_big_binaries_recursively/comment_2_872bef6902ddb362b62d5e9ec1afe864._comment
new file mode 100644
index 0000000..3950b19
--- /dev/null
+++ b/doc/forum/Adding_selected_big_binaries_recursively/comment_2_872bef6902ddb362b62d5e9ec1afe864._comment
@@ -0,0 +1,26 @@
+[[!comment format=mdwn
+ username="JohnFisher"
+ subject="didn't work for me, perhaps I did the attributes wrong?"
+ date="2016-08-04T20:43:15Z"
+ content="""
+I created .gitattributes in the root of my repo:
+jfisher@buildos1:~/annex$ cat .gitattributes
+* annex.largefiles=(largerthan=100mb)
+jfisher@buildos1:~/annex$ git config -l
+user.email=jfisher@intouchhealth.com
+user.name=John Fisher
+core.repositoryformatversion=0
+core.filemode=true
+core.bare=false
+core.logallrefupdates=true
+annex.uuid=75d91aa9-f5fc-45b8-b62c-e6050ed7c3d5
+annex.version=5
+
+where I intend for all users of the repo to automatically add all files larger than 100Mb as annexed and add all other files as conventional git.
+
+I ran 
+git annex add
+and small text files were staged as links, as well as a large file
+
+Comment? Ideas?
+"""]]

diff --git a/doc/bugs/filename_with___34____63____34___causes_unknown_response.mdwn b/doc/bugs/filename_with___34____63____34___causes_unknown_response.mdwn
new file mode 100644
index 0000000..8425119
--- /dev/null
+++ b/doc/bugs/filename_with___34____63____34___causes_unknown_response.mdwn
@@ -0,0 +1,47 @@
+### Please describe the problem.
+When I do git annex add on a directory with a filename that include a "?"
+I get an error:
+git-annex: unknown response from git cat-file ("HEAD:./Home/wc/Icon missing","HEAD:./Home/wc/Icon\r")
+CallStack (from HasCallStack):
+  error, called at ./Git/CatFile.hs:86:48 in main:Git.CatFile
+
+where the file here was called "Icon?"
+
+### What steps will reproduce the problem?
+mkdir test
+
+cd test
+
+git init
+
+git annex init "test"
+
+cp ~/Desktop/Icon? .
+
+ls
+
+Icon?
+
+git annex add .
+
+ git-annex: unknown response from git cat-file ("HEAD:./Icon missing","HEAD:./Icon\r")
+CallStack (from HasCallStack):
+  error, called at ./Git/CatFile.hs:86:48 in main:Git.CatFile
+
+### What version of git-annex are you using? On what operating system?
+git-annex-6.20160619
+
+OSX El Capitan using brew install git-annex
+
+### Please provide any additional information below.
+
+[[!format sh """
+# If you can, paste a complete transcript of the problem occurring here.
+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
+
+
+# End of transcript or log.
+"""]]
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+

diff --git a/doc/forum/__34__git_annex_unused__34___doesn__39__t_find_unused_files_after_git_history_was_rewritten.mdwn b/doc/forum/__34__git_annex_unused__34___doesn__39__t_find_unused_files_after_git_history_was_rewritten.mdwn
new file mode 100644
index 0000000..cbf9770
--- /dev/null
+++ b/doc/forum/__34__git_annex_unused__34___doesn__39__t_find_unused_files_after_git_history_was_rewritten.mdwn
@@ -0,0 +1,17 @@
+Hi,
+
+I recently cleaned my git history using:
+
+    git filter-branch --tree-filter 'rm -rf personal/Mail' --prune-empty HEAD
+    git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
+    git gc
+
+I then ran:
+
+    git annex unused
+
+But was surprised to find that it didn't report any unused files. Not surprisingly (given that I didn't touch the annex data at all so far), when looking into `.git/annex/objects/` I still find the content of all the files that are now not used anymore.
+
+Is there a way to clean these up besides creating a fresh clone of the repository?
+
+Thanks!

Added a comment
diff --git a/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_3_78bc3e56502e425f4f77bc35ed2199b8._comment b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_3_78bc3e56502e425f4f77bc35ed2199b8._comment
new file mode 100644
index 0000000..c134586
--- /dev/null
+++ b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_3_78bc3e56502e425f4f77bc35ed2199b8._comment
@@ -0,0 +1,41 @@
+[[!comment format=mdwn
+ username="listx"
+ subject="comment 3"
+ date="2016-08-04T02:07:55Z"
+ content="""
+I went ahead and used `git annex wanted . \"exclude=FOO\"` and it did what I wanted. For posterity, here are some other observations:
+
+- The file that `git annex vicfg` shows was updated to include the invocation of `git annex wanted`, like this:
+
+```
+...(truncated for brevity)...
+# Repository preferred contents                                                                                                                                                    
+# (Set to \"standard\" to use a repository's group's preferred contents)
+# (for k0)
+wanted a71d805d-df77-42e7-97b0-ba7686c05083 = exclude=FOO
+# (for web)
+...(truncated for brevity)...
+```
+
+()- I noticed that the UUID above matches the UUID found in my `.git/config` file, which looks like this:
+
+```
+[core]
+	repositoryformatversion = 0
+	filemode = true
+	bare = false
+	logallrefupdates = true
+[remote \"origin\"]
+	url = m0:/mnt/a/annex.git
+	fetch = +refs/heads/*:refs/remotes/origin/*
+	annex-uuid = c5c012cc-2080-481f-81bc-7f449f33490b
+[branch \"master\"]
+	remote = origin
+	merge = refs/heads/master
+[annex]
+	uuid = a71d805d-df77-42e7-97b0-ba7686c05083
+	version = 5
+```
+
+.
+"""]]

Added a comment
diff --git a/doc/todo/__34__copy_--failed__34__/comment_2_9044c9b76f25114914f68afe0c7c0506._comment b/doc/todo/__34__copy_--failed__34__/comment_2_9044c9b76f25114914f68afe0c7c0506._comment
new file mode 100644
index 0000000..57ae372
--- /dev/null
+++ b/doc/todo/__34__copy_--failed__34__/comment_2_9044c9b76f25114914f68afe0c7c0506._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="eslgastal"
+ subject="comment 2"
+ date="2016-08-04T00:56:30Z"
+ content="""
+That was fast! Thanks again Joey.
+"""]]

remove flattr link, add patreon link
diff --git a/doc/sidebar.mdwn b/doc/sidebar.mdwn
index ea11991..7bbdefe 100644
--- a/doc/sidebar.mdwn
+++ b/doc/sidebar.mdwn
@@ -9,4 +9,4 @@
 * [[forum]]
 * [[comments]]
 * [[contact]]
-* [Flattr this](http://flattr.com/thing/84843/git-annex)
+* [[thanks]]
diff --git a/doc/thanks.mdwn b/doc/thanks.mdwn
index 8bfbd31..2d11ea9 100644
--- a/doc/thanks.mdwn
+++ b/doc/thanks.mdwn
@@ -3,6 +3,9 @@ donations of many people. I want to say "Thank You!" to each of
 you individually, but until I meet all 1500 of you, this page will have to
 do. You have my most sincere thanks. --[[Joey]]
 
+You can support my git-annex development
+[on Patreon](https://www.patreon.com/joeyh).
+
 (If I got your name wrong, or you don't want it publically posted here,
 email <id@joeyh.name>.)
 

devblog
diff --git a/doc/devblog/day_412__if_at_first_you_dont_succeed.mdwn b/doc/devblog/day_412__if_at_first_you_dont_succeed.mdwn
new file mode 100644
index 0000000..958564c
--- /dev/null
+++ b/doc/devblog/day_412__if_at_first_you_dont_succeed.mdwn
@@ -0,0 +1,49 @@
+[[!meta title="if at first you don't succeed.."]]
+
+A user suggested [adding --failed](http://git-annex.branchable.com/todo/__34__copy_--failed__34__/)
+to retry failed transfers. That was a great idea and I landed a patch for it
+3 hours later. Love it when a user suggests something so clearly right and
+I am able to quickly make it happen!
+
+----
+
+Unfortunately, my funding from the [DataLad](https://datalad.org/) project
+to work on git-annex is running out. It's been a very good two years funded
+that way, with an enormous amount of improvements and support and bug
+fixes, but all good things must end. I'll continue to get some funding
+from them for the next year, but only for half as much time as the past two
+years.
+
+I need to decide it it makes sense to keep working on git-annex to the
+extent I have been. There are definitely a few (hundred) things I still
+want to do on git-annex, starting with getting the git patches landed to
+make v6 mode really shine. Past that, it's mostly up to the users. If they
+keep suggesting great ideas and finding git-annex useful, I'll want to
+work on it more.
+
+What to do about funding? Maybe some git-annex users can contribute a
+small amount each month to fund development. I've set up a Patreon
+page for this, **<https://www.patreon.com/joeyh>**
+
+----
+
+Anyhoo... Back to today's (unfunded) work.
+
+`--failed` can be used with `get`, `move`, `copy`, and
+`mirror`. Of course those commands can all be simply re-ran if some
+of the transfers fail and will pick up where they left off. But using
+`--failed` is faster because it does not need to scan all files to find
+out which still need to be transferred. And accumulated failures from
+multiple commands can be retried with a single use of `--failed`. 
+
+It's even possible to do things like `git annex get --from foo; git annex
+get --failed --from bar`, which first downloads everything it can from the
+foo remote and falls back to using the bar remote for the rest. Although
+setting remote costs is probably a better approach most of the time.
+
+Turns out that I had earlier disabled writing failure log files, except by
+the assistant, because only the assistant was using them. So, that had to
+be undone. There's some potential for failure log files to accumulate
+annoyingly, so perhaps some expiry mechanism will be needed. This is why
+`--failed` is documented as retrying "recent" transfers. Anyway, the
+failure log files are cleaned up after successful transfers.

contrast with --incomplete
diff --git a/doc/git-annex-get.mdwn b/doc/git-annex-get.mdwn
index 9d06786..32d2f7f 100644
--- a/doc/git-annex-get.mdwn
+++ b/doc/git-annex-get.mdwn
@@ -69,6 +69,9 @@ or transferring them from some kind of key-value store.
 
   Operate on files that have recently failed to be transferred.
 
+  Not to be confused with `--incomplete` which resumes only downloads
+  that managed to transfer part of the content of a file.
+
 * `--key=keyname`
 
   Use this option to get a specified key.

Re-enable accumulating transfer failure log files for command-line actions
This was disabled in commit 61ccf95004cc1ffaadba9a495f3d4d5e0c106043,
because only the assistant used them, and they were clutter. But, now
--failed also uses them.
Remove the failure log files after successful transfers. Should avoid
most of the clutter problems.
Commit 61ccf95004cc1ffaadba9a495f3d4d5e0c106043 mentions a subtle behavior
change, which has now been reverted:
There is one behavior change from this. If glacier is being used, and a
manual git annex get --from glacier fails because the file isn't available
yet, the assistant will no longer later see that failed transfer file and
retry the get.
diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs
index 55a8d39..90aaa59 100644
--- a/Annex/Transfer.hs
+++ b/Annex/Transfer.hs
@@ -94,8 +94,12 @@ runTransfer' ignorelock t file shouldretry transferobserver transferaction = do
 			return observeFailure
 		else do
 			v <- retry info metervar $ transferaction meter
+			let ok = observeBool v
 			liftIO $ cleanup tfile lck
-			transferobserver (observeBool v) t info
+			if ok
+				then removeFailedTransfer t
+				else recordFailedTransfer t info
+			transferobserver ok t info
 			return v
   where
 #ifndef mingw32_HOST_OS
diff --git a/CHANGELOG b/CHANGELOG
index bb8705a..80e63bb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -22,6 +22,9 @@ git-annex (6.20160726) UNRELEASED; urgency=medium
     the content is present locally.
   * get, move, copy, mirror: Added --failed switch which retries
     failed copies/moves.
+  * Re-enable accumulating transfer failure log files for command-line
+    actions (disabled in 5.20150522), and remove the log files after
+    successful transfers.
 
  -- Joey Hess <id@joeyh.name>  Wed, 20 Jul 2016 12:03:15 -0400
 
diff --git a/Command/TransferKeys.hs b/Command/TransferKeys.hs
index 82dc150..a385e5c 100644
--- a/Command/TransferKeys.hs
+++ b/Command/TransferKeys.hs
@@ -35,13 +35,13 @@ start = do
   where
 	runner (TransferRequest direction remote key file)
 		| direction == Upload = notifyTransfer direction file $
-			upload (Remote.uuid remote) key file forwardRetry observer $ \p -> do
+			upload (Remote.uuid remote) key file forwardRetry noObserver $ \p -> do
 				ok <- Remote.storeKey remote key file p
 				when ok $
 					Remote.logStatus remote key InfoPresent
 				return ok
 		| otherwise = notifyTransfer direction file $
-			download (Remote.uuid remote) key file forwardRetry observer $ \p ->
+			download (Remote.uuid remote) key file forwardRetry noObserver $ \p ->
 				getViaTmp (RemoteVerify remote) key $ \t -> do
 					r <- Remote.retrieveKeyFile remote key file t p
 					-- Make sure we get the current
@@ -49,9 +49,6 @@ start = do
 					-- not old cached data.
 					Database.Keys.closeDb			
 					return r
-	
-	observer False t tinfo = recordFailedTransfer t tinfo
-	observer True _ _ = noop
 
 runRequests
 	:: Handle
diff --git a/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment b/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment
index d0f49a5..b173727 100644
--- a/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment
+++ b/doc/todo/__34__copy_--failed__34__/comment_1_ff81023df39f9faac5935f6417ad2b38._comment
@@ -3,6 +3,6 @@
  subject="""comment 1"""
  date="2016-08-03T15:07:43Z"
  content="""
-Nice idea, and there's already a log of recent failed transfers that
-could be used.
+Nice idea, and there's already an implementation of a log of recent failed
+transfers that the assistant uses, that can be reused for this.
 """]]

get, move, copy, mirror: Added --failed switch which retries failed copies/moves
Note that get --from foo --failed will get things that a previous get --from bar
tried and failed to get, etc. I considered making --failed only retry
transfers from the same remote, but it was easier, and seems more useful,
to not have the same remote requirement.
Noisy due to some refactoring into Types/
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 36d9db7..b975c8e 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -54,6 +54,7 @@ import qualified Data.Set as S
 
 import Annex.Common
 import Logs.Location
+import Types.Transfer
 import Logs.Transfer
 import qualified Git
 import qualified Annex
diff --git a/Annex/Notification.hs b/Annex/Notification.hs
index 691b61d..4f49287 100644
--- a/Annex/Notification.hs
+++ b/Annex/Notification.hs
@@ -10,7 +10,7 @@
 module Annex.Notification (NotifyWitness, notifyTransfer, notifyDrop) where
 
 import Annex.Common
-import Logs.Transfer
+import Types.Transfer
 #ifdef WITH_DBUS_NOTIFICATIONS
 import qualified Annex
 import Types.DesktopNotify
diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs
index 78ef0e5..55a8d39 100644
--- a/Annex/Transfer.hs
+++ b/Annex/Transfer.hs
@@ -20,6 +20,7 @@ module Annex.Transfer (
 
 import Annex.Common
 import Logs.Transfer as X
+import Types.Transfer as X
 import Annex.Notification as X
 import Annex.Perms
 import Utility.Metered
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs
index 265828d..bc79a70 100644
--- a/Assistant/Alert.hs
+++ b/Assistant/Alert.hs
@@ -14,7 +14,7 @@ import Assistant.Types.Alert
 import Assistant.Alert.Utility
 import qualified Remote
 import Utility.Tense
-import Logs.Transfer
+import Types.Transfer
 import Types.Distribution
 import Git.Types (RemoteName)
 
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs
index 92aad07..3b2c6f3 100644
--- a/Assistant/DaemonStatus.hs
+++ b/Assistant/DaemonStatus.hs
@@ -14,6 +14,7 @@ import Assistant.Alert.Utility
 import Utility.Tmp
 import Assistant.Types.NetMessager
 import Utility.NotificationBroadcaster
+import Types.Transfer
 import Logs.Transfer
 import Logs.Trust
 import Logs.TimeStamp
diff --git a/Assistant/DeleteRemote.hs b/Assistant/DeleteRemote.hs
index 5b044fd..c69011e 100644
--- a/Assistant/DeleteRemote.hs
+++ b/Assistant/DeleteRemote.hs
@@ -12,7 +12,7 @@ module Assistant.DeleteRemote where
 import Assistant.Common
 import Assistant.Types.UrlRenderer
 import Assistant.TransferQueue
-import Logs.Transfer
+import Types.Transfer
 import Logs.Location
 import Assistant.DaemonStatus
 import qualified Remote
diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs
index 665394a..9b9e7eb 100644
--- a/Assistant/Sync.hs
+++ b/Assistant/Sync.hs
@@ -36,7 +36,7 @@ import Assistant.Threads.Watcher (watchThread, WatcherControl(..))
 import Assistant.TransferSlots
 import Assistant.TransferQueue
 import Assistant.RepoProblem
-import Logs.Transfer
+import Types.Transfer
 
 import Data.Time.Clock
 import qualified Data.Map as M
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs
index d35bd79..7b366bc 100644
--- a/Assistant/Threads/Committer.hs
+++ b/Assistant/Threads/Committer.hs
@@ -17,7 +17,7 @@ import Assistant.Alert
 import Assistant.DaemonStatus
 import Assistant.TransferQueue
 import Assistant.Drop
-import Logs.Transfer
+import Types.Transfer
 import Logs.Location
 import qualified Annex.Queue
 import qualified Git.LsFiles
diff --git a/Assistant/Threads/Cronner.hs b/Assistant/Threads/Cronner.hs
index 14026cf..0b505b8 100644
--- a/Assistant/Threads/Cronner.hs
+++ b/Assistant/Threads/Cronner.hs
@@ -24,7 +24,7 @@ import Utility.HumanTime
 import Utility.Batch
 import Assistant.TransferQueue
 import Annex.Content
-import Logs.Transfer
+import Types.Transfer
 import Assistant.Types.UrlRenderer
 import Assistant.Alert
 import Remote
diff --git a/Assistant/Threads/Glacier.hs b/Assistant/Threads/Glacier.hs
index 900e0d4..b5eaa5e 100644
--- a/Assistant/Threads/Glacier.hs
+++ b/Assistant/Threads/Glacier.hs
@@ -14,6 +14,7 @@ import Assistant.Common
 import Utility.ThreadScheduler
 import qualified Types.Remote as Remote
 import qualified Remote.Glacier as Glacier
+import Types.Transfer
 import Logs.Transfer
 import Assistant.DaemonStatus
 import Assistant.TransferQueue
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs
index a4f037f..62ba8f0 100644
--- a/Assistant/Threads/SanityChecker.hs
+++ b/Assistant/Threads/SanityChecker.hs
@@ -38,7 +38,7 @@ import Git.Repair
 import Git.Index
 import Assistant.Unused
 import Logs.Unused
-import Logs.Transfer
+import Types.Transfer
 import Annex.Path
 import qualified Annex
 #ifdef WITH_WEBAPP
diff --git a/Assistant/Threads/TransferPoller.hs b/Assistant/Threads/TransferPoller.hs
index 73562db..f5d6890 100644
--- a/Assistant/Threads/TransferPoller.hs
+++ b/Assistant/Threads/TransferPoller.hs
@@ -9,6 +9,7 @@ module Assistant.Threads.TransferPoller where
 
 import Assistant.Common
 import Assistant.DaemonStatus
+import Types.Transfer
 import Logs.Transfer
 import Utility.NotificationBroadcaster
 import qualified Assistant.Threads.TransferWatcher as TransferWatcher
diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs
index 7386d55..10aed20 100644
--- a/Assistant/Threads/TransferScanner.hs
+++ b/Assistant/Threads/TransferScanner.hs
@@ -16,6 +16,7 @@ import Assistant.Drop
 import Assistant.Sync
 import Assistant.DeleteRemote
 import Assistant.Types.UrlRenderer
+import Types.Transfer
 import Logs.Transfer
 import Logs.Location
 import Logs.Group
diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs
index c452d87..a04c6c0 100644
--- a/Assistant/Threads/TransferWatcher.hs
+++ b/Assistant/Threads/TransferWatcher.hs
@@ -10,6 +10,7 @@ module Assistant.Threads.TransferWatcher where
 import Assistant.Common
 import Assistant.DaemonStatus
 import Assistant.TransferSlots
+import Types.Transfer
 import Logs.Transfer
 import Utility.DirWatcher
 import Utility.DirWatcher.Types
diff --git a/Assistant/Threads/Transferrer.hs b/Assistant/Threads/Transferrer.hs
index 9e9256e..293ce41 100644
--- a/Assistant/Threads/Transferrer.hs
+++ b/Assistant/Threads/Transferrer.hs
@@ -10,7 +10,7 @@ module Assistant.Threads.Transferrer where
 import Assistant.Common
 import Assistant.TransferQueue
 import Assistant.TransferSlots
-import Logs.Transfer
+import Types.Transfer
 import Annex.Path
 import Utility.Batch
 
diff --git a/Assistant/TransferQueue.hs b/Assistant/TransferQueue.hs
index ba13b3f..8117d30 100644
--- a/Assistant/TransferQueue.hs
+++ b/Assistant/TransferQueue.hs
@@ -26,6 +26,7 @@ module Assistant.TransferQueue (
 import Assistant.Common
 import Assistant.DaemonStatus
 import Assistant.Types.TransferQueue
+import Types.Transfer
 import Logs.Transfer
 import Types.Remote
 import qualified Remote

(Diff truncated)
diff --git a/doc/todo/__34__copy_--failed__34__.mdwn b/doc/todo/__34__copy_--failed__34__.mdwn
new file mode 100644
index 0000000..511265b
--- /dev/null
+++ b/doc/todo/__34__copy_--failed__34__.mdwn
@@ -0,0 +1,5 @@
+I often "copy --to remote" many files at once, and inevitably the transfer fails for some files (few out of hundreds). It would be great to subsequently be able to "copy --failed --to remote" to re-try only the transfers for failed files (similarly to how one can use "--unused").
+
+Related: <https://git-annex.branchable.com/todo/make_copy_--fast__faster/>
+
+git-annex is awesome btw. Thanks!

diff --git a/doc/forum/Same_files_are_synced_over_and_over_again.mdwn b/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
index 3734c5b..73c6696 100644
--- a/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
+++ b/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
@@ -52,5 +52,7 @@ ok
 
 Is it a bug? Any more information I can provide?
 
+EDIT: A pastebin of the output of a sync run without and with ```--debug```: <http://pastebin.com/raw/ad2T8jeV>
+
 Thanks!
 Florian

Added a comment: One more requirement
diff --git a/doc/forum/Use_case__58___Main_machine__44___portable_drive__44___backup_machine/comment_1_d2991b94eb067f0a6e47cd77f922411d._comment b/doc/forum/Use_case__58___Main_machine__44___portable_drive__44___backup_machine/comment_1_d2991b94eb067f0a6e47cd77f922411d._comment
new file mode 100644
index 0000000..5f91560
--- /dev/null
+++ b/doc/forum/Use_case__58___Main_machine__44___portable_drive__44___backup_machine/comment_1_d2991b94eb067f0a6e47cd77f922411d._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://me.yahoo.com/a/hi7yosAfnufqtL0Mb123WhWS.Yel7LOeB6A-#1512c"
+ nickname="-"
+ subject="One more requirement"
+ date="2016-08-02T06:58:04Z"
+ content="""
+Oh, I forgot: data must be writable at least on the main machine, possibly on the thumb drive, too.
+"""]]

diff --git a/doc/forum/Use_case__58___Main_machine__44___portable_drive__44___backup_machine.mdwn b/doc/forum/Use_case__58___Main_machine__44___portable_drive__44___backup_machine.mdwn
new file mode 100644
index 0000000..92885a0
--- /dev/null
+++ b/doc/forum/Use_case__58___Main_machine__44___portable_drive__44___backup_machine.mdwn
@@ -0,0 +1,26 @@
+Hello everybody, I need some setup advice.
+
+I want to set up a portability and data security (in the sense of redundancy) scenario for a user with some, but not exulting, tech skills.
+A directory that contains progressing work should be synced with incoming data and backed up.
+
+## Locations
+
+- Main machine (laptop), containing all software to process data and write result files
+- USB thumb drive, will occassionally receive additional data at the faculty (no root access/possibility to install annex or even git there)
+- Offline file server (ssh/sftp through wired lan), backing up all data
+
+## Goals
+
+- The laptop and USB drive should stay in sync in both directions; processed work must appear on the USB, data copied onto the USB must appear on the main machine (copies of files, not links).
+- All data should be backed up on the file server.
+- The user should not be required to stage/commit files from the command line, this should be handled automatically (annex assistant?)
+
+
+## Questions
+
+- This sounds a bit like the "nomad" scenario described, but not totally like it. Is git annex the proper tool for the job?
+- How do I set that scenario up? Especially, who is a remote of what and why, and how do I make sure I got a copy of every file in every location without doing it all manually?
+
+At the moment this is all done with a number of grsync sessions. It works, but if anything is done in the wrong order, current data is overwritten by older one (this could be resolved using git, but would require manual staging/commiting, what we want to avoid).
+
+Can you help me on that?

Added a comment
diff --git a/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_2_9d0cfb1d221e3ac6ed15db9cefab60fa._comment b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_2_9d0cfb1d221e3ac6ed15db9cefab60fa._comment
new file mode 100644
index 0000000..a2d0530
--- /dev/null
+++ b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_2_9d0cfb1d221e3ac6ed15db9cefab60fa._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="listx"
+ subject="comment 2"
+ date="2016-08-01T20:06:46Z"
+ content="""
+OK; but are the UUIDs documented anywhere? I'd prefer not to dive into the sources if possible. Thanks.
+"""]]

response
diff --git a/doc/forum/Adding_selected_big_binaries_recursively/comment_1_6ff6031a5a44caf17f36c3569cca5512._comment b/doc/forum/Adding_selected_big_binaries_recursively/comment_1_6ff6031a5a44caf17f36c3569cca5512._comment
new file mode 100644
index 0000000..abfbbad
--- /dev/null
+++ b/doc/forum/Adding_selected_big_binaries_recursively/comment_1_6ff6031a5a44caf17f36c3569cca5512._comment
@@ -0,0 +1,23 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-07-30T16:36:51Z"
+ content="""
+It's fine to annex the big files and store the small files in git in
+the usual way.
+
+The `find | xargs` approach should work.
+
+You can also use the [[git-annex-matching-options]], eg:
+
+	git annex add --include='*.adi'
+
+Or:
+
+	git annex add --largerthan=1mb
+
+
+You can also configure git-annex to know which files you consider
+large, so that `git annex add` will annex the large ones and add 
+the rest to git not the annex. See [[tips/largefiles]]
+"""]]

response
diff --git a/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_1_1e59c9476b206613285e4f39b2c9efa8._comment b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_1_1e59c9476b206613285e4f39b2c9efa8._comment
new file mode 100644
index 0000000..1c408e7
--- /dev/null
+++ b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples/comment_1_1e59c9476b206613285e4f39b2c9efa8._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-07-30T16:30:58Z"
+ content="""
+If you're finding vicfg confusing, you don't have to use it; the same
+configuration can be done at the command line using `git annex wanted`.
+See [[preferred_content]] for documentation.
+
+If you just want to have full control over what files are stored in the
+local repository, the easiest way to do that is to run `git annex get` and
+`git annex drop` manually when you want or don't want a file's content,
+and don't pass --content to `git annex sync`.
+"""]]

info: When run on a file now includes an indication of whether the content is present locally.
diff --git a/CHANGELOG b/CHANGELOG
index bccf70f..8ee86b2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -18,6 +18,8 @@ git-annex (6.20160726) UNRELEASED; urgency=medium
   * When built with uuid-1.3.12, generate more random UUIDs than before.
     (However, this did not impact git-annex much, so a hard depedency has
     not been added on uuid-1.3.12.)
+  * info: When run on a file now includes an indication of whether
+    the content is present locally.
 
  -- Joey Hess <id@joeyh.name>  Wed, 20 Jul 2016 12:03:15 -0400
 
diff --git a/Command/Info.hs b/Command/Info.hs
index bdc8afc..39511e6 100644
--- a/Command/Info.hs
+++ b/Command/Info.hs
@@ -30,6 +30,7 @@ import Logs.Location
 import Annex.NumCopies
 import Remote
 import Config
+import Git.Config (boolConfig)
 import Utility.Percentage
 import Logs.Transfer
 import Types.TrustLevel
@@ -220,6 +221,7 @@ file_stats f k =
 	[ file_name f
 	, key_size k
 	, key_name k
+	, content_present k
 	]
 
 remote_fast_stats :: Remote -> [Stat]
@@ -354,6 +356,9 @@ key_size k = simpleStat "size" $ showSizeKeys $ foldKeys [k]
 key_name :: Key -> Stat
 key_name k = simpleStat "key" $ pure $ key2file k
 
+content_present :: Key -> Stat
+content_present k = stat "present" $ json boolConfig $ lift $ inAnnex k
+
 bloom_info :: Stat
 bloom_info = simpleStat "bloom filter size" $ do
 	localkeys <- countKeys <$> cachedPresentData
diff --git a/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn b/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
index 590595b..5e05988 100644
--- a/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
+++ b/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
@@ -2,3 +2,5 @@ ATM in DataLad we rely on 'git annex find' to determine either files have conten
 
 
 [[!meta author=yoh]]
+
+> sure, [[done]] --[[Joey]]

response
diff --git a/doc/bugs/build_fails_on_debian_jessie/comment_1_779a75e72292afdfdad1b4ff134e926e._comment b/doc/bugs/build_fails_on_debian_jessie/comment_1_779a75e72292afdfdad1b4ff134e926e._comment
new file mode 100644
index 0000000..bfb80a9
--- /dev/null
+++ b/doc/bugs/build_fails_on_debian_jessie/comment_1_779a75e72292afdfdad1b4ff134e926e._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-07-30T16:15:57Z"
+ content="""
+The disk-free-space and mountpoints dependencies will need to be backported
+to Debian jessie before git-annex's backport can be updated. Both packages
+are available in testing, so should be fairly easy to backport.
+"""]]

diff --git a/doc/forum/Same_files_are_synced_over_and_over_again.mdwn b/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
index 20b8dd6..3734c5b 100644
--- a/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
+++ b/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
@@ -1,6 +1,6 @@
 Hello,
 
-I have posted a similiar (same?) problem already some weeks ago: https://git-annex.branchable.com/forum/File_downloaded_again_and_again/ But since there has been another problem which was fixed, I dare to repost.
+I have posted a similiar (same?) problem already some weeks ago: <https://git-annex.branchable.com/forum/File_downloaded_again_and_again/> But since there has been another problem which was fixed, I dare to repost.
 
 I have three repos: marduk (anything / archive) and horus (standard / client) and asaru (standard / client).
 

diff --git a/doc/forum/Same_files_are_synced_over_and_over_again.mdwn b/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
new file mode 100644
index 0000000..20b8dd6
--- /dev/null
+++ b/doc/forum/Same_files_are_synced_over_and_over_again.mdwn
@@ -0,0 +1,56 @@
+Hello,
+
+I have posted a similiar (same?) problem already some weeks ago: https://git-annex.branchable.com/forum/File_downloaded_again_and_again/ But since there has been another problem which was fixed, I dare to repost.
+
+I have three repos: marduk (anything / archive) and horus (standard / client) and asaru (standard / client).
+
+Whenever I do a ```git annex sync --content`` the same files are synced over and over again:
+
+```
+florian@horus ~/Documents (git)-[master] % git annex sync --content
+commit  
+On branch master
+nothing to commit, working directory clean
+ok
+pull marduk 
+ok
+get .localized (from marduk...) 
+SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+              0 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)
+(checksum...) ok
+get Bewerbung/thermoplast.aux (from marduk...) 
+SHA256E-s8--3345a075a22fb3bbc04567a1e5660ed0240d53f5881f458a2234dcd42a78d335.aux
+              8 100%    7.81kB/s    0:00:00 (xfr#1, to-chk=0/1)
+(checksum...) ok
+drop archive/Programmierung/zope/lib/python/Homefolder/.svn/empty-file (locking marduk...) ok
+drop archive/Schule/Geschichte/Biographie 3/biographie.aux (locking marduk...) ok
+pull marduk 
+ok
+(recording state in git...)
+push marduk 
+Counting objects: 8, done.
+Delta compression using up to 4 threads.
+Compressing objects: 100% (8/8), done.
+Writing objects: 100% (8/8), 661 bytes | 0 bytes/s, done.
+Total 8 (delta 6), reused 0 (delta 0)
+To ssh://marduk.local/home/florian/Documents
+   d151eb6..c31839b  git-annex -> synced/git-annex
+ok
+git annex sync --content  81,50s user 7,19s system 50% cpu 2:54,56 total
+```
+
+When I execute the same command again, the same files are synced again. On the other repos it's the same behavior.
+
+git annex does not seem to record presence of that file:
+
+```
+florian@horus ~/Documents (git)-[master] % git annex whereis Bewerbung/thermoplast.aux
+whereis Bewerbung/thermoplast.aux (1 copy) 
+        f30dd4f0-5a03-4022-8f45-7c2620c4c058 -- Marduk [marduk]
+ok
+```
+
+Is it a bug? Any more information I can provide?
+
+Thanks!
+Florian

diff --git a/doc/forum/Adding_selected_big_binaries_recursively.mdwn b/doc/forum/Adding_selected_big_binaries_recursively.mdwn
new file mode 100644
index 0000000..b870a39
--- /dev/null
+++ b/doc/forum/Adding_selected_big_binaries_recursively.mdwn
@@ -0,0 +1,12 @@
+I have a very large stack of files, with many large binaries.
+Unless I am told its a bad idea, I want to initialize a git annex archive with the big files 'git annex added' ( symlinked to hidden annex) and the rest of the files 'git added'
+
+I tried-
+git annex add "*.adi"
+find . -name "*.adi" | git annex add
+find . -name "*.adi" | xargs git annex add
+git annex add robots/\*.adi
+
+
+Whats a good ( correct) way to do only the *.adi files recursively?
+( its Friday PST here- will return Monday)

Added a comment
diff --git a/doc/forum/get_content_of_a_file_from_a_file/comment_2_9cc8905f867fedbf2b10c9ad84294543._comment b/doc/forum/get_content_of_a_file_from_a_file/comment_2_9cc8905f867fedbf2b10c9ad84294543._comment
new file mode 100644
index 0000000..8a79b0f
--- /dev/null
+++ b/doc/forum/get_content_of_a_file_from_a_file/comment_2_9cc8905f867fedbf2b10c9ad84294543._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="squid@d632da79105a546295e411392baaa70df380a4a2"
+ nickname="squid"
+ subject="comment 2"
+ date="2016-07-29T22:27:51Z"
+ content="""
+Hey, thank you very much! This is exactly what I was looking for. Unfortunately, FreeBSD sports version 5.20150727 where the --known option is not yet available, but that's a whole different problem that can be easily solved on a saturday.
+"""]]

Added a comment
diff --git a/doc/forum/Content_branch/comment_1_564724cb1508524700b71950b81a5058._comment b/doc/forum/Content_branch/comment_1_564724cb1508524700b71950b81a5058._comment
new file mode 100644
index 0000000..e843b34
--- /dev/null
+++ b/doc/forum/Content_branch/comment_1_564724cb1508524700b71950b81a5058._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="jd.schroeder@0c8632a8f2bffdd4b0de05a0a3660f32acdfeeca"
+ nickname="jd.schroeder"
+ subject="comment 1"
+ date="2016-07-29T19:12:24Z"
+ content="""
+I'm not sure about creating a branch, but I use [[https://git-annex.branchable.com/git-annex-find/]] to list locally available files.
+
+Good luck!
+"""]]

Added a comment
diff --git a/doc/forum/get_content_of_a_file_from_a_file/comment_1_174fe84e87b31419295af3397db19671._comment b/doc/forum/get_content_of_a_file_from_a_file/comment_1_174fe84e87b31419295af3397db19671._comment
new file mode 100644
index 0000000..a88b08e
--- /dev/null
+++ b/doc/forum/get_content_of_a_file_from_a_file/comment_1_174fe84e87b31419295af3397db19671._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="jd.schroeder@0c8632a8f2bffdd4b0de05a0a3660f32acdfeeca"
+ nickname="jd.schroeder"
+ subject="comment 1"
+ date="2016-07-29T19:09:44Z"
+ content="""
+Have a look at [[https://git-annex.branchable.com/git-annex-reinject/]]
+
+Good luck!
+"""]]

update
diff --git a/doc/thanks.mdwn b/doc/thanks.mdwn
index 126d407..8bfbd31 100644
--- a/doc/thanks.mdwn
+++ b/doc/thanks.mdwn
@@ -6,7 +6,7 @@ do. You have my most sincere thanks. --[[Joey]]
 (If I got your name wrong, or you don't want it publically posted here,
 email <id@joeyh.name>.)
 
-## 2014-2015
+## 2014-2016
 
 <img alt="NSF logo" src="https://www.nsf.gov/images/logos/nsf1.gif">
 
@@ -14,7 +14,8 @@ git-annex development is partially supported by the
 [NSF](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1429999) as a part of the
 [DataLad project](http://datalad.org/).
 
-Thanks also to these folks for their support: martin f. krafft and John Byrnes.
+Thanks also to these folks for their support: martin f. krafft, John Byrnes,
+Aurélien Couderc, and Jeffrey Chiu.
 
 ## 2013-2014
 

diff --git a/doc/bugs/build_fails_on_debian_jessie.mdwn b/doc/bugs/build_fails_on_debian_jessie.mdwn
new file mode 100644
index 0000000..5dafa26
--- /dev/null
+++ b/doc/bugs/build_fails_on_debian_jessie.mdwn
@@ -0,0 +1,7 @@
+### Please describe the problem.
+
+Can't build on debian jessie using "make" - "apt-get build-dep git-annex" misses various dependencies, and disk-space-free is not actually in jessie.  I have built it with "stack", but that only produces something usable by me (links to stuff in my home dir).
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+
+The stack build works very nicely, thanks.

diff --git a/doc/forum/Content_branch.mdwn b/doc/forum/Content_branch.mdwn
new file mode 100644
index 0000000..6eb268e
--- /dev/null
+++ b/doc/forum/Content_branch.mdwn
@@ -0,0 +1,5 @@
+I was not able to find a convenient way to _only_ see locally available files.
+
+Is there a command to create a branch that only contain files taht are present locally, or is there another way to get a "locally available view" ?
+
+Thanks. 

diff --git a/doc/forum/get_content_of_a_file_from_a_file.mdwn b/doc/forum/get_content_of_a_file_from_a_file.mdwn
new file mode 100644
index 0000000..3965ed4
--- /dev/null
+++ b/doc/forum/get_content_of_a_file_from_a_file.mdwn
@@ -0,0 +1,5 @@
+I have two annex repositories A and B, the connection between them is terribly slow. There is a file in B that A wants to get, but incidentally A already has an exact copy of the file outside the annex repository. Is it possible for A to retrieve the content of that annexed file from its local copy rather than from B?
+
+The only idea I could come up with is to annex the file and then unannexing it, which does not seem optimal. I would prefer to not pollute the git log with these kinds of shenanigans.
+
+Any help is greatly appreciated!

diff --git a/doc/forum/git_annex_vicfg___40__preferred_content__41___examples.mdwn b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples.mdwn
new file mode 100644
index 0000000..5467651
--- /dev/null
+++ b/doc/forum/git_annex_vicfg___40__preferred_content__41___examples.mdwn
@@ -0,0 +1,37 @@
+My problem: I want to free up some disk space by doing `git annex drop FOO`, but then when I do `git annex add BAR; git annex sync --content`, FOO reappears.
+
+Looking into the man pages, I need to set up `git annex vicfg` to make `sync --content` ignore (exclude) FOO.
+
+I am overwhelmed by the configuration file and would just like to see a minimal complete example configuration file that does what I want. In the long run I probably want to use options like "groupwanted" and such, but am not sure what a "group" is exactly.
+
+Grepping for 'exclude', my config file has this already in it:
+
+```
+# Standard preferred contents
+# (Used by wanted or groupwanted expressions containing "standard")
+# (For reference only; built-in and cannot be changed!)
+# standard client = (include=* and ((exclude=*/archive/* and exclude=archive/*) or (not (copies=archive:1 or copies=smallarchive:1)))) or approxlackingcopies=1
+```
+
+but I am not sure how to go about it. For one, the comment hints that I need to use a secondary `wanted` or `groupwanted` expression to reference the `standard` keyword to actually use it, but I am just confused by all of these interlocking components.
+
+Also, I see stuff like this:
+
+```
+# Repository preferred contents
+# (Set to "standard" to use a repository's group's preferred contents)
+# (for web)
+#wanted 00000000-0000-0000-0000-000000000001 = 
+# (for bittorrent)
+#wanted 00000000-0000-0000-0000-000000000002 = 
+# (for l@k0:/dev/shm/annex)
+#wanted 56e6081b-4282-4f07-b53c-9042240cd75e = 
+# (for k0)
+#wanted a71d805d-df77-42e7-97b0-ba7686c05083 = 
+# (for l@m0:/mnt/a/annex.git [origin])
+#wanted c5c012cc-2080-481f-81bc-7f449f33490b =                                                                                                                                     
+```
+
+and am confused by these UUIDs. Where do these UUIDs come from? Am I supposed to use UUIDs?
+
+If there is a link or another doc I missed, please point me in the right direction.

added meta field for myself
diff --git a/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn b/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
index 05737f6..590595b 100644
--- a/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
+++ b/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
@@ -1 +1,4 @@
 ATM in DataLad we rely on 'git annex find' to determine either files have content locally.  Even though it could be used in a batch mode, I wondered if we could may be just use 'annex info' to obtain information either a file (or a key) has content locally?  Another benefit would be is that within single command output we could determine also if a file under annex or not (instead of first doing e.g. 'info' to figure out if under annex and then 'find' again to figure out if content is present locally)
+
+
+[[!meta author=yoh]]

diff --git a/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn b/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
new file mode 100644
index 0000000..05737f6
--- /dev/null
+++ b/doc/todo/__39__info_filename__39___to_provide_information_either_content_is_locally_present.mdwn
@@ -0,0 +1 @@
+ATM in DataLad we rely on 'git annex find' to determine either files have content locally.  Even though it could be used in a batch mode, I wondered if we could may be just use 'annex info' to obtain information either a file (or a key) has content locally?  Another benefit would be is that within single command output we could determine also if a file under annex or not (instead of first doing e.g. 'info' to figure out if under annex and then 'find' again to figure out if content is present locally)

devblog
diff --git a/doc/devblog/day_411__metadata_--batch.mdwn b/doc/devblog/day_411__metadata_--batch.mdwn
new file mode 100644
index 0000000..acd1429
--- /dev/null
+++ b/doc/devblog/day_411__metadata_--batch.mdwn
@@ -0,0 +1,4 @@
+With yesterday's JSON groundwork in place, I quickly implemented `git annex
+metadata --batch` today in only 45 LoC. The interface is nicely elegant;
+the same JSON format that git-annex metadata outputs can be fed into it
+to get, set, delete, and modify metadata.

Added metadata --batch option, which allows getting, setting, deleting, and modifying metadata for multiple files/keys.
diff --git a/Annex/MetaData.hs b/Annex/MetaData.hs
index d8d8177..6642c36 100644
--- a/Annex/MetaData.hs
+++ b/Annex/MetaData.hs
@@ -63,7 +63,7 @@ parseModMeta p = case lastMaybe f of
 	Just '+' -> AddMeta <$> mkMetaField f' <*> v
 	Just '-' -> DelMeta <$> mkMetaField f' <*> (Just <$> v)
 	Just '?' -> MaybeSetMeta <$> mkMetaField f' <*> v
-	_ -> SetMeta <$> mkMetaField f <*> v
+	_ -> SetMeta <$> mkMetaField f <*> (S.singleton <$> v)
   where
 	(f, sv) = separate (== '=') p
 	f' = beginning f
diff --git a/CHANGELOG b/CHANGELOG
index ca2a417..bccf70f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,8 @@ git-annex (6.20160726) UNRELEASED; urgency=medium
     This should be easier to parse than the old format, which mixed up
     metadata fields with other keys in the json object.
     Any consumers of the old format will need to be updated.
+  * Added metadata --batch option, which allows getting, setting, deleting,
+    and modifying metadata for multiple files/keys.
   * Added --branch option to copy, drop, fsck, get, metadata, mirror, move,
     and whereis commands. This option makes git-annex operate on files that
     are included in a specified branch (or other treeish).
diff --git a/Command/MetaData.hs b/Command/MetaData.hs
index d33372d..4233c56a 100644
--- a/Command/MetaData.hs
+++ b/Command/MetaData.hs
@@ -10,9 +10,12 @@ module Command.MetaData where
 import Command
 import Annex.MetaData
 import Logs.MetaData
+import Annex.WorkTree
 import Messages.JSON (JSONActionItem(..))
+import Types.Messages
 
 import qualified Data.Set as S
+import qualified Data.Map as M
 import qualified Data.Text as T
 import qualified Data.ByteString.Lazy.UTF8 as BU
 import Data.Time.Clock.POSIX
@@ -28,6 +31,7 @@ data MetaDataOptions = MetaDataOptions
 	{ forFiles :: CmdParams
 	, getSet :: GetSet
 	, keyOptions :: Maybe KeyOptions
+	, batchOption :: BatchMode
 	}
 
 data GetSet = Get MetaField | GetAll | Set [ModMeta]
@@ -37,6 +41,7 @@ optParser desc = MetaDataOptions
 	<$> cmdParams desc
 	<*> ((Get <$> getopt) <|> (Set <$> some modopts) <|> pure GetAll)
 	<*> optional (parseKeyOptions False)
+	<*> parseBatchOption
   where
 	getopt = option (eitherReader mkMetaField)
 		( long "get" <> short 'g' <> metavar paramField
@@ -62,15 +67,21 @@ optParser desc = MetaDataOptions
 seek :: MetaDataOptions -> CommandSeek
 seek o = do
 	now <- liftIO getPOSIXTime
-	let seeker = case getSet o of
-		Get _ -> withFilesInGit
-		GetAll -> withFilesInGit
-		Set _ -> withFilesInGitNonRecursive
-			"Not recursively setting metadata. Use --force to do that."
-	withKeyOptions (keyOptions o) False
-		(startKeys now o)
-		(seeker $ whenAnnexed $ start now o)
-		(forFiles o)
+	case batchOption o of
+		NoBatch -> do
+			let seeker = case getSet o of
+				Get _ -> withFilesInGit
+				GetAll -> withFilesInGit
+				Set _ -> withFilesInGitNonRecursive
+					"Not recursively setting metadata. Use --force to do that."
+			withKeyOptions (keyOptions o) False
+				(startKeys now o)
+				(seeker $ whenAnnexed $ start now o)
+				(forFiles o)
+		Batch -> withOutputType $ \ot -> case ot of
+			JSONOutput -> batchInput parseJSONInput $
+				commandAction . startBatch now
+			_ -> error "--batch is currently only supported in --json mode"
 
 start :: POSIXTime -> MetaDataOptions -> FilePath -> Key -> CommandStart
 start now o file k = startKeys now o k (mkActionItem afile)
@@ -128,14 +139,37 @@ instance FromJSON MetaDataFields where
 fieldsField :: T.Text
 fieldsField = T.pack "fields"
 
-parseJSONInput :: String -> Maybe (Either FilePath Key, MetaData)
+parseJSONInput :: String -> Either String (Either FilePath Key, MetaData)
 parseJSONInput i = do
-	v <- decode (BU.fromString i)
+	v <- eitherDecode (BU.fromString i)
 	let m = case itemAdded v of
 		Nothing -> emptyMetaData
 		Just (MetaDataFields m') -> m'
-	let keyfile = case (itemKey v, itemFile v) of
-		(Just k, _) -> Right k
-		(Nothing, Just f) -> Left f
-		(Nothing, Nothing) -> error "JSON input is missing either file or key"
-	return (keyfile, m)
+	case (itemKey v, itemFile v) of
+		(Just k, _) -> Right (Right k, m)
+		(Nothing, Just f) -> Right (Left f, m)
+		(Nothing, Nothing) -> Left "JSON input is missing either file or key"
+
+startBatch :: POSIXTime -> (Either FilePath Key, MetaData) -> CommandStart
+startBatch now (i, (MetaData m)) = case i of
+	Left f -> do
+		mk <- lookupFile f
+		case mk of
+			Just k -> go k (mkActionItem (Just f))
+			Nothing -> error $ "not an annexed file: " ++ f
+	Right k -> go k (mkActionItem k)
+  where
+	go k ai = do
+		showStart' "metadata" k ai
+		let o = MetaDataOptions
+			{ forFiles = []
+			, getSet = if MetaData m == emptyMetaData
+				then GetAll
+				else Set $ map mkModMeta (M.toList m)
+			, keyOptions = Nothing
+			, batchOption = NoBatch
+			}
+		next $ perform now o k
+	mkModMeta (f, s)
+		| S.null s = DelMeta f Nothing
+		| otherwise = SetMeta f s
diff --git a/Messages.hs b/Messages.hs
index 63f5b10..339823d 100644
--- a/Messages.hs
+++ b/Messages.hs
@@ -42,6 +42,7 @@ module Messages (
 	commandProgressDisabled,
 	outputMessage,
 	implicitMessage,
+	withOutputType,
 ) where
 
 import System.Log.Logger
diff --git a/Types/MetaData.hs b/Types/MetaData.hs
index a62dd7e..9e153ff 100644
--- a/Types/MetaData.hs
+++ b/Types/MetaData.hs
@@ -204,8 +204,11 @@ emptyMetaData = MetaData M.empty
 {- Can be used to set a value, or to unset it, depending on whether
  - the MetaValue has CurrentlySet or not. -}
 updateMetaData :: MetaField -> MetaValue -> MetaData -> MetaData
-updateMetaData f v (MetaData m) = MetaData $
-	M.insertWith' S.union f (S.singleton v) m
+updateMetaData f v = updateMetaData' f (S.singleton v)
+
+updateMetaData' :: MetaField -> S.Set MetaValue -> MetaData -> MetaData
+updateMetaData' f s (MetaData m) = MetaData $
+	M.insertWith' S.union f s m
 
 {- New metadata overrides old._-}
 unionMetaData :: MetaData -> MetaData -> MetaData
@@ -247,7 +250,7 @@ data ModMeta
 	| DelMeta MetaField (Maybe MetaValue)
 	-- ^ delete value of a field. With Just, only that specific value
 	-- is deleted; with Nothing, all current values are deleted.
-	| SetMeta MetaField MetaValue
+	| SetMeta MetaField (S.Set MetaValue)
 	-- ^ removes any existing values
 	| MaybeSetMeta MetaField MetaValue
 	-- ^ set when field has no existing value
@@ -262,7 +265,7 @@ modMeta _ (DelMeta f (Just oldv)) =
 	updateMetaData f (unsetMetaValue oldv) emptyMetaData
 modMeta m (DelMeta f Nothing) = MetaData $ M.singleton f $
 	S.fromList $ map unsetMetaValue $ S.toList $ currentMetaDataValues f m
-modMeta m (SetMeta f v) = updateMetaData f v $
+modMeta m (SetMeta f s) = updateMetaData' f s $
 	foldr (updateMetaData f) emptyMetaData $
 		map unsetMetaValue $ S.toList $ currentMetaDataValues f m
 modMeta m (MaybeSetMeta f v)
diff --git a/doc/git-annex-metadata.mdwn b/doc/git-annex-metadata.mdwn
index b4e7900..fde4443 100644
--- a/doc/git-annex-metadata.mdwn
+++ b/doc/git-annex-metadata.mdwn
@@ -17,6 +17,11 @@ metadata.
 
 When run without any -s or -t parameters, displays the current metadata.
 
+Each metadata field has its own "field-lastchanged" metadata, which
+contains the date the field was last changed. Unlike other metadata,
+this cannot be directly modified by this command. It is updated
+automatically.
+
 # OPTIONS
 
 * `-g field` / `--get field`
@@ -66,10 +71,27 @@ When run without any -s or -t parameters, displays the current metadata.

(Diff truncated)
update
diff --git a/doc/devblog/day_410__better_JSON_for_metadata.mdwn b/doc/devblog/day_410__better_JSON_for_metadata.mdwn
index a1270e7..44648d9 100644
--- a/doc/devblog/day_410__better_JSON_for_metadata.mdwn
+++ b/doc/devblog/day_410__better_JSON_for_metadata.mdwn
@@ -20,11 +20,9 @@ problem, get in touch.
 
 ----
 
-While making that change, I also improved the JSON outputlayer, so it can
-use Aeson. I didn't switch exclusively to using Aeson, because git-annex
-commands with JSON output often output it incrementally as they go (which
-Aeson can't really do), and are anyway not often doing the kind of
-serialization of data type that Aeson excells at.
+While making that change, I also improved the JSON output layer, so it can
+use Aeson. Update: And switched everything over to using Aeson, so
+git-annex no longer depends on two different JSON libraries.
 
 This let me use Aeson to generate the "fields" object for `metadata
 --json`. And it was also easy enough to use Aeson to parse the output of

devblog
diff --git a/doc/devblog/day_410__better_JSON_for_metadata.mdwn b/doc/devblog/day_410__better_JSON_for_metadata.mdwn
new file mode 100644
index 0000000..a1270e7
--- /dev/null
+++ b/doc/devblog/day_410__better_JSON_for_metadata.mdwn
@@ -0,0 +1,33 @@
+I've had to change the output of `git annex metadata --json`.
+The old output looked like this:
+
+	{"command":"metadata","file":"foo","key":"...","author":["bar"],...,"note":"...","success":true}
+
+That was not good, because it didn't separate the metadata fields
+from the rest of the JSON object. What if a metadata field is named
+"note" or "success"? It would collide with the other "note" and "success"
+in the JSON.
+
+So, changed this to a new format, which moves the metadata fields into
+a "fields" object:
+
+	{"command":"metadata","file":"foo","key":"...","fields":{"author":["bar"],...},"note":"...","success":true}
+
+I don't like breaking backwards compatability of JSON output, but in this
+case I could see no real alternative. I don't know if anyone
+is using `metadata --batch` anyway. If you are and this will cause a
+problem, get in touch.
+
+----
+
+While making that change, I also improved the JSON outputlayer, so it can
+use Aeson. I didn't switch exclusively to using Aeson, because git-annex
+commands with JSON output often output it incrementally as they go (which
+Aeson can't really do), and are anyway not often doing the kind of
+serialization of data type that Aeson excells at.
+
+This let me use Aeson to generate the "fields" object for `metadata
+--json`. And it was also easy enough to use Aeson to parse the output of
+that command (and some simplified forms of it).
+
+So, I've laid the groundwork for `git annex metadata --batch` today.

saner format for metadata --json
metadata --json output format has changed, adding a inner json object
named "fields" which contains only the fields and their values.
This should be easier to parse than the old format, which mixed up
metadata fields with other keys in the json object.
Any consumers of the old format will need to be updated.
This adds a dependency on unordered-containers for parsing MetaData
from JSON, but it's a free dependency; aeson pulls in that library.
diff --git a/CHANGELOG b/CHANGELOG
index 79e4dc1..45da171 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,10 @@
-git-annex (6.20160620) UNRELEASED; urgency=medium
+git-annex (6.20160726) UNRELEASED; urgency=medium
 
+  * metadata --json output format has changed, adding a inner json object
+    named "fields" which contains only the fields and their values.
+    This should be easier to parse than the old format, which mixed up
+    metadata fields with other keys in the json object.
+    Any consumers of the old format will need to be updated.
   * Added --branch option to copy, drop, fsck, get, metadata, mirror, move,
     and whereis commands. This option makes git-annex operate on files that
     are included in a specified branch (or other treeish).
diff --git a/Command/MetaData.hs b/Command/MetaData.hs
index 3123a63..66469f2 100644
--- a/Command/MetaData.hs
+++ b/Command/MetaData.hs
@@ -1,6 +1,6 @@
 {- git-annex command
  -
- - Copyright 2014 Joey Hess <id@joeyh.name>
+ - Copyright 2014-2016 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
@@ -10,9 +10,13 @@ module Command.MetaData where
 import Command
 import Annex.MetaData
 import Logs.MetaData
+import Messages.JSON (ParsedJSON(..))
 
 import qualified Data.Set as S
+import qualified Data.Text as T
+import qualified Data.ByteString.Lazy.UTF8 as BU
 import Data.Time.Clock.POSIX
+import Data.Aeson
 
 cmd :: Command
 cmd = withGlobalOptions ([jsonOption] ++ annexedMatchingOptions) $ 
@@ -95,10 +99,38 @@ perform now o k = case getSet o of
 
 cleanup :: Key -> CommandCleanup
 cleanup k = do
-	l <- map unwrapmeta . fromMetaData <$> getCurrentMetaData k
-	maybeShowJSON (JSONObject l)
-	showLongNote $ unlines $ concatMap showmeta l
+	m <- getCurrentMetaData k
+	let Object o = toJSON (MetaDataFields m)
+	maybeShowJSON $ AesonObject o
+	showLongNote $ unlines $ concatMap showmeta $
+		map unwrapmeta (fromMetaData m)
 	return True
   where
 	unwrapmeta (f, v) = (fromMetaField f, map fromMetaValue (S.toList v))
 	showmeta (f, vs) = map ((f ++ "=") ++) vs
+
+-- Metadata serialized to JSON in the field named "fields" of
+-- a larger object.
+newtype MetaDataFields = MetaDataFields MetaData
+	deriving (Show)
+
+instance ToJSON MetaDataFields where
+	toJSON (MetaDataFields m) = object [ (fieldsField, toJSON m) ]
+
+instance FromJSON MetaDataFields where
+	parseJSON (Object v) = do
+		f <- v .: fieldsField
+		case f of
+			Nothing -> return (MetaDataFields emptyMetaData)
+			Just v' -> MetaDataFields <$> parseJSON v'
+	parseJSON _ = fail "expected an object"
+
+fieldsField :: T.Text
+fieldsField = T.pack "fields"
+
+parseJSONInput :: String -> Maybe (Either FilePath Key, MetaData)
+parseJSONInput i = do
+	v <- decode (BU.fromString i)
+	case parsedAdded v of
+		Nothing -> return (parsedKeyfile v, emptyMetaData)
+		Just (MetaDataFields m) -> return (parsedKeyfile v, m)
diff --git a/Types/MetaData.hs b/Types/MetaData.hs
index 449548d..a62dd7e 100644
--- a/Types/MetaData.hs
+++ b/Types/MetaData.hs
@@ -44,14 +44,32 @@ import Common
 import Utility.Base64
 import Utility.QuickCheck
 
+import qualified Data.Text as T
 import qualified Data.Set as S
 import qualified Data.Map as M
+import qualified Data.HashMap.Strict as HM
 import Data.Char
 import qualified Data.CaseInsensitive as CI
+import Data.Aeson
 
 newtype MetaData = MetaData (M.Map MetaField (S.Set MetaValue))
 	deriving (Show, Eq, Ord)
 
+instance ToJSON MetaData where
+	toJSON (MetaData m) = object $ map go (M.toList m)
+	  where
+		go (MetaField f, s) = (T.pack (CI.original f), toJSON s)
+
+instance FromJSON MetaData where
+	parseJSON (Object o) = do
+		l <- HM.toList <$> parseJSON (Object o)
+		MetaData . M.fromList <$> mapM go l
+	  where
+		go (t, l) = case mkMetaField (T.unpack t) of
+			Left e -> fail e
+			Right f -> (,) <$> pure f <*> parseJSON l
+	parseJSON _ = fail "expected an object"
+
 {- A metadata value can be currently be set (True), or may have been
  - set before and we're remembering it no longer is (False). -}
 newtype CurrentlySet = CurrentlySet Bool
@@ -64,6 +82,13 @@ newtype MetaField = MetaField (CI.CI String)
 data MetaValue = MetaValue CurrentlySet String
 	deriving (Read, Show)
 
+instance ToJSON MetaValue where
+	toJSON (MetaValue _ v) = toJSON v
+
+instance FromJSON MetaValue where
+	parseJSON (String v) = return $ MetaValue (CurrentlySet True) (T.unpack v)
+	parseJSON _  = fail "expected a string"
+
 {- Metadata values compare and order the same whether currently set or not. -}
 instance Eq MetaValue where
 	MetaValue _ a == MetaValue _ b = a == b
diff --git a/debian/control b/debian/control
index f9dfec9..30c4274 100644
--- a/debian/control
+++ b/debian/control
@@ -25,6 +25,7 @@ Build-Depends:
 	libghc-uuid-dev,
 	libghc-json-dev,
 	libghc-aeson-dev,
+	libghc-unordered-containers-dev,
 	libghc-ifelse-dev,
 	libghc-bloomfilter-dev,
 	libghc-edit-distance-dev,
diff --git a/doc/git-annex-metadata.mdwn b/doc/git-annex-metadata.mdwn
index fe344ff..b4e7900 100644
--- a/doc/git-annex-metadata.mdwn
+++ b/doc/git-annex-metadata.mdwn
@@ -71,6 +71,16 @@ When run without any -s or -t parameters, displays the current metadata.
   Enable JSON output. This is intended to be parsed by programs that use
   git-annex. Each line of output is a JSON object.
 
+  The format of the JSON objects changed in git-annex version 6.20160726.
+
+  Example of the new format:
+
+	{"command":"metadata","file":"foo","key":"...","fields":{"author":["bar"],...},"note":"...","success":true}
+
+  Example of the old format, which lacks the inner fields object:
+
+	{"command":"metadata","file":"foo","key":"...","author":["bar"],...,"note":"...","success":true}
+
 * `--all`
 
   Specify instead of a file to get/set metadata on all known keys.
diff --git a/git-annex.cabal b/git-annex.cabal
index d0ee988..f9033cc 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -323,7 +323,7 @@ Executable git-annex
   Build-Depends:
    base (>= 4.5 && < 5.0),
    optparse-applicative (>= 0.11.0), 
-   containers (>= 0.5.0.0), 
+   containers (>= 0.5.0.0),
    exceptions (>= 0.6),
    QuickCheck (>= 2.1),
    stm (>= 2.3),
@@ -338,6 +338,7 @@ Executable git-annex
    time, old-locale,
    esqueleto, persistent-sqlite, persistent (<2.5), persistent-template,
    aeson,
+   unordered-containers,
    feed,
    regex-tdfa
   CC-Options: -Wall

magic wormhole seems like a nice alternative for arbitrary data sharing here
diff --git a/doc/design/assistant/telehash.mdwn b/doc/design/assistant/telehash.mdwn
index e69f09f..4e6ec67 100644
--- a/doc/design/assistant/telehash.mdwn
+++ b/doc/design/assistant/telehash.mdwn
@@ -2,7 +2,7 @@
 git-annex (assistant) repositories.
 
 Or something similar like [Snow](http://www.trustiosity.com/snow/)
-or [cjdns](https://github.com/cjdelisle/cjdns) or tor or i2p.
+or [cjdns](https://github.com/cjdelisle/cjdns) or tor or i2p or [magic wormhole](http://magic-wormhole.io/).
 
 ## telehash implementation status
 
@@ -29,6 +29,8 @@ or [cjdns](https://github.com/cjdelisle/cjdns) or tor or i2p.
   and the reliabilty of that network is not known. I notice it has only 1
   pre-seeded peer in the source tree for the DHT, and that peer was not up
   when I tried it.
+* Only provides network-layer transport, still need to implement some 
+  file transfer protocol on top.
 
 ## cjdns status
 
@@ -50,6 +52,14 @@ or [cjdns](https://github.com/cjdelisle/cjdns) or tor or i2p.
 
 ## i2p status
 
+## magic wormhole
+
+* simple file transfer protocol with out of band shared secret
+* handles NAT transversal
+* easy to use
+* doesn't require a running daemon
+* can transfer arbitrary blobs (strings, directories, files)
+
 ## implementation basics
 
 * Add a telehash.log that maps between uuid and telehash address.

Added a comment
diff --git a/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_6_88178fa312f351a7667b3b2c48335b02._comment b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_6_88178fa312f351a7667b3b2c48335b02._comment
new file mode 100644
index 0000000..c31f234
--- /dev/null
+++ b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_6_88178fa312f351a7667b3b2c48335b02._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="jgoerzen"
+ subject="comment 6"
+ date="2016-07-25T19:09:09Z"
+ content="""
+This was concerning enough to me that I wound up switching to Syncthing for this particular use case.
+"""]]

Added a comment: Same issue
diff --git a/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_5_f45d09939527be362c586ae1d470afe4._comment b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_5_f45d09939527be362c586ae1d470afe4._comment
new file mode 100644
index 0000000..4fbbfe1
--- /dev/null
+++ b/doc/bugs/Packfile_does_not_match_digest__58___gcrypt_with_assistant/comment_5_f45d09939527be362c586ae1d470afe4._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="pot"
+ subject="Same issue"
+ date="2016-07-25T18:23:13Z"
+ content="""
+Anyone got any ideas on how to fix this, or move forward without starting again and trashing the gcrypt repos? Bit of a serious bug this, if it can't be repaired. I was using git-annex for backups, but finding your backups are corrupt would be a bit of a nightmare!
+"""]]

design
diff --git a/doc/todo/metadata_--batch/comment_4_c72eb16b630b200265e125ebaf7d0d36._comment b/doc/todo/metadata_--batch/comment_4_c72eb16b630b200265e125ebaf7d0d36._comment
new file mode 100644
index 0000000..4cd0f2d
--- /dev/null
+++ b/doc/todo/metadata_--batch/comment_4_c72eb16b630b200265e125ebaf7d0d36._comment
@@ -0,0 +1,36 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2016-07-25T17:39:37Z"
+ content="""
+--batch mode should be usable to get current metadata, set new
+metadata, and remove existing metadata. The non-batch metadata command has
+different syntaxes for all of these, but it would be good to have a single
+interface that handles all three in batch mode.
+
+It could read a line containing the file or key, with any metadata
+fields that should be changed:
+
+	{"file":"foo"}
+	{"file":"foo","author":["bar"]}
+	{"key":"SHA...","author":[]}
+
+And reply with *all* the metadata, in nearly the same format:
+
+	{"file":"foo","key":"SHA...","author":["bar"],lastchanged:["date"],"success":true}
+
+And that reply could in turn be edited and fed back in to change the
+metadata.
+
+----
+
+There's a DRY problem here because there's the current JSON generator code,
+and I'd have to add an Aeson parser to parse the JSON input. But, Aeson
+parsers also automatically have a matching generator, which is guaranteed
+to generate code that the parser can parse.
+
+So, it would be nice to use the Aeson JSON generator, instead of the
+current one, but that can only be done if the JSON is formatted the same,
+or close enough that nothing currently consuming `metadata --json` will
+break.
+"""]]

diff --git a/doc/bugs/gcrypt__58___WARNING__58___Remote_ID_has_changed__33__.mdwn b/doc/bugs/gcrypt__58___WARNING__58___Remote_ID_has_changed__33__.mdwn
new file mode 100644
index 0000000..556a468
--- /dev/null
+++ b/doc/bugs/gcrypt__58___WARNING__58___Remote_ID_has_changed__33__.mdwn
@@ -0,0 +1,45 @@
+### Please describe the problem.
+
+For some reason, after a while I can't sync to any remotes (removeable drives, servers, etc.)
+
+
+### What steps will reproduce the problem?
+
+git annex sync, git annex assistant doing its autosync, etc.
+
+
+### What version of git-annex are you using? On what operating system?
+
+Arch Linux, git annex 6.20160613-g1e4e6f4
+
+
+### Please provide any additional information below.
+
+[[!format sh """
+# If you can, paste a complete transcript of the problem occurring here.
+
+Typing git annex synx in a terminal gives me:
+
+commit  ok
+pull disk0_annexes_docs 
+gcrypt: Decrypting manifest
+gpg: Signature made Mon 25 Jul 2016 00:13:00 BST using RSA key ID XXXXXXXXXXXXXXX
+gpg: Good signature from "XXX <XXX@XXX.XXX>" [ultimate]
+gcrypt: WARNING:
+gcrypt: WARNING: Remote ID has changed!
+gcrypt: WARNING: from :id:lczpGq00kb1sF+cxgCNE
+gcrypt: WARNING: to   :id:2br4BOnJZkrGUsXTlQR8
+
+
+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
+
+Not specific to assistant.
+
+
+# End of transcript or log.
+"""]]
+
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+
+Yes, this worked for ages, a year or more, it's awesome! Haven't plugged the removeable drives in for a while, now when I do this happens...

cabal constraints for aws and esqueleto
closes https://github.com/joeyh/git-annex/pull/55
* git-annex.cabal: Temporarily limit to http-conduit <2.2.0
since aws 0.14.0 is not compatible with the newer version.
* git-annex.cabal: Temporarily limit to persistent <2.5
since esqueleto 2.4.3 is not compatible with the newer version.
diff --git a/CHANGELOG b/CHANGELOG
index efab17b..79e4dc1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,10 @@ git-annex (6.20160620) UNRELEASED; urgency=medium
   * Added --branch option to copy, drop, fsck, get, metadata, mirror, move,
     and whereis commands. This option makes git-annex operate on files that
     are included in a specified branch (or other treeish).
+  * git-annex.cabal: Temporarily limit to http-conduit <2.2.0
+    since aws 0.14.0 is not compatible with the newer version.
+  * git-annex.cabal: Temporarily limit to persistent <2.5
+    since esqueleto 2.4.3 is not compatible with the newer version.
 
  -- Joey Hess <id@joeyh.name>  Wed, 20 Jul 2016 12:03:15 -0400
 
diff --git a/doc/bugs/cabal_constraints_for_aws_and_esqueleto.mdwn b/doc/bugs/cabal_constraints_for_aws_and_esqueleto.mdwn
index 19daf83..4b47803 100644
--- a/doc/bugs/cabal_constraints_for_aws_and_esqueleto.mdwn
+++ b/doc/bugs/cabal_constraints_for_aws_and_esqueleto.mdwn
@@ -23,3 +23,6 @@ esqueleto 2.4.3 is incompatible with persistent 2.5
 https://github.com/prowdsponsor/esqueleto/issues/137
 https://github.com/prowdsponsor/esqueleto/pull/141
 https://github.com/prowdsponsor/esqueleto/pull/139
+
+> I assume this will be sorted out upstream, but I don't mind temporarily
+> adding the constraints. [[done]] --[[Joey]]

diff --git a/doc/bugs/cabal_constraints_for_aws_and_esqueleto.mdwn b/doc/bugs/cabal_constraints_for_aws_and_esqueleto.mdwn
new file mode 100644
index 0000000..19daf83
--- /dev/null
+++ b/doc/bugs/cabal_constraints_for_aws_and_esqueleto.mdwn
@@ -0,0 +1,25 @@
+See https://github.com/joeyh/git-annex/pull/55.
+
+### Please describe the problem.
+Solver needs some help when building with +S3 and +Webapp for Homebrew.
+
+### What steps will reproduce the problem?
+Build git-annex with GHC 8.0.1 and cabal install 1.24.0.0 with --flags=s3\ webapp
+
+### What version of git-annex are you using? On what operating system?
+6.20160719
+macOS 10.11.5
+
+### Please provide any additional information below.
+git-annex.cabal needs a couple of tweaks to reflect the following known issues:
+
+
+1.
+aws 0.14.0 is incompatible with http-conduit 2.2.0
+https://github.com/aristidb/aws/issues/206
+
+2.
+esqueleto 2.4.3 is incompatible with persistent 2.5
+https://github.com/prowdsponsor/esqueleto/issues/137
+https://github.com/prowdsponsor/esqueleto/pull/141
+https://github.com/prowdsponsor/esqueleto/pull/139

diff --git a/doc/forum/Stuck_in_a_bad_state.mdwn b/doc/forum/Stuck_in_a_bad_state.mdwn
new file mode 100644
index 0000000..9b83f26
--- /dev/null
+++ b/doc/forum/Stuck_in_a_bad_state.mdwn
@@ -0,0 +1,10 @@
+So I managed to muck stuff up pretty bad with git-annex assistant and wondering if there is a reasonable way to fix the situation without blowing everything away and starting over at this point.  So my setup is kind of laid out like this:
+I have the main annex folder in my home folder at this location: /home/<username>/annex  I have a full backup on a separate drive on the same system which is mounted to /mnt/store and there is a sym link to it in my home folder so ~/store and annex folder goes to ~/store/annex on that drive.  I sync with one other computer that comes and goes online on the local folder (I don't use a transfer repository).  Then I have an rsync.net account that is also set to full backup, I originally setup annex to use this with a self generated key that it would keep in git and it had synced and everything seemed good.  I later determined that I would rather use my own encryption key that I have backed up in a different way.  It seems the only way to change that is to delete the rsync.net remote and re-add it with the key that I want to use.  So I told it to delete it in the web-gui, it has been stuck cleaning out for about a month now.  A thread keeps dying and I keep restarting it according to the gui.  There is an error in the logs, but it looks like it is trying to connect to both the computer that isn't always up and rsync.net and dying with it:
+
+```
+[2016-07-20 09:40:26.563762726] NetWatcherFallback: Syncing with 192.168.1.118_annex, rsync.net_annex 
+ssh: connect to host 192.168.1.118 port 22: No route to host
+fatal: Could not read from remote repository.
+```
+
+So at this point, I am contemplating just copying all the files out of the annex folders and deleting all the annex stuff and configuration and all the stores and starting over basically unless there is another approach that I can kill the rsync.net annex remote, delete the stuff directly on rsync, setup a new rsync.net remote.

Update
diff --git a/doc/bugs/It__39__s_July_not_June.mdwn b/doc/bugs/It__39__s_July_not_June.mdwn
index 4c7674e..f2c9134 100644
--- a/doc/bugs/It__39__s_July_not_June.mdwn
+++ b/doc/bugs/It__39__s_July_not_June.mdwn
@@ -5,3 +5,6 @@ Off-by-one bug ...
 > I really need to automate generating those version numbers.
 > I'm not going to re-release it though, and the version number meets 
 > all other requirements other than matching the release date, so [[done]] --[[Joey]]
+
+>> JFTR, yesterday, I needed a tag to build the package against and pushed that to the
+>> main repo. If you object, feel free to nuke. -- RichiH

devblog
diff --git a/doc/devblog/day_409__--branch.mdwn b/doc/devblog/day_409__--branch.mdwn
new file mode 100644
index 0000000..6ede436
--- /dev/null
+++ b/doc/devblog/day_409__--branch.mdwn
@@ -0,0 +1,17 @@
+A common complaint is that `git annex fsck` in a bare repository complains
+about missing content of deleted files. That's because in a bare
+repository, git-annex operates on all versions of all files. Today I added
+a --branch option, so if you only want to check say, the master branch, you
+can: `git annex fsck --branch master`
+
+The new option has other uses too. Want to get all the files in the v1.0
+tag? `git annex get --branch v1.0`
+
+It might be worth revisiting the implicit --all behavior for bare
+repositories. It could instead default to --branch HEAD or something like
+that. But I'd only want to change that if there was a strong consensus in
+favor.
+
+Over 3/4th of the time spent implementing --branch was spent in
+adjusting the output of commands, to show "branch:file" is being
+operated on. How annoying.

--branch, stage 2
Show branch:file that is being operated on.
I had to make ActionItem a type and not a type class because
withKeyOptions' passed two different types of values when using the type
class, and I could not get the type checker to accept that.
diff --git a/Annex/Drop.hs b/Annex/Drop.hs
index 000e4f8..cd0168a 100644
--- a/Annex/Drop.hs
+++ b/Annex/Drop.hs
@@ -117,10 +117,10 @@ handleDropsFrom locs rs reason fromhere key afile preverified runner = do
 			)
 
 	dropl fs n = checkdrop fs n Nothing $ \numcopies ->
-		Command.Drop.startLocal afile numcopies key preverified
+		Command.Drop.startLocal afile (mkActionItem afile) numcopies key preverified
 
 	dropr fs r n  = checkdrop fs n (Just $ Remote.uuid r) $ \numcopies ->
-		Command.Drop.startRemote afile numcopies key r
+		Command.Drop.startRemote afile (mkActionItem afile) numcopies key r
 
 	slocs = S.fromList locs
 	
diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs
index e7c52b6..5659234 100644
--- a/CmdLine/Seek.hs
+++ b/CmdLine/Seek.hs
@@ -4,7 +4,7 @@
  - the values a user passes to a command, and prepare actions operating
  - on them.
  -
- - Copyright 2010-2015 Joey Hess <id@joeyh.name>
+ - Copyright 2010-2016 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
@@ -161,19 +161,29 @@ withNothing _ _ = error "This command takes no parameters."
  -
  - Otherwise falls back to a regular CommandSeek action on
  - whatever params were passed. -}
-withKeyOptions :: Maybe KeyOptions -> Bool -> (Key -> CommandStart) -> (CmdParams -> CommandSeek) -> CmdParams -> CommandSeek
+withKeyOptions 
+	:: Maybe KeyOptions
+	-> Bool
+	-> (Key -> ActionItem -> CommandStart)
+	-> (CmdParams -> CommandSeek)
+	-> CmdParams
+	-> CommandSeek
 withKeyOptions ko auto keyaction = withKeyOptions' ko auto mkkeyaction
   where
 	mkkeyaction = do
 		matcher <- Limit.getMatcher
-		return $ \getkeys ->
-			seekActions $ map (process matcher) <$> getkeys
-	process matcher k = ifM (matcher $ MatchingKey k)
-		( keyaction k
-		, return Nothing
-		)
-
-withKeyOptions' :: Maybe KeyOptions -> Bool -> Annex (Annex [Key] -> Annex ()) -> (CmdParams -> CommandSeek) -> CmdParams -> CommandSeek
+		return $ \k i ->
+			whenM (matcher $ MatchingKey k) $
+				commandAction $ keyaction k i
+
+withKeyOptions' 
+	:: Maybe KeyOptions
+	-> Bool
+	-> Annex (Key -> ActionItem -> Annex ())
+	-> (CmdParams
+	-> CommandSeek)
+	-> CmdParams
+	-> CommandSeek
 withKeyOptions' ko auto mkkeyaction fallbackaction params = do
 	bare <- fromRepo Git.repoIsLocalBare
 	when (auto && bare) $
@@ -194,15 +204,17 @@ withKeyOptions' ko auto mkkeyaction fallbackaction params = do
 		| auto = error "Cannot use --auto with --all or --branch or --unused or --key or --incomplete"
 		| otherwise = a
 	incompletekeys = staleKeysPrune gitAnnexTmpObjectDir True
-	runkeyaction ks = do
+	runkeyaction getks = do
 		keyaction <- mkkeyaction
-		keyaction ks
+		ks <- getks
+		forM_ ks $ \k -> keyaction k (mkActionItem k)
 	runbranchkeys bs = do
 		keyaction <- mkkeyaction
 		forM_ bs $ \b -> do
 			(l, cleanup) <- inRepo $ LsTree.lsTree b
-			forM_ l $ \i ->
-				maybe noop (\k -> keyaction (return [k]))
+			forM_ l $ \i -> do
+				let bfp = mkActionItem $ BranchFilePath b (LsTree.file i)
+				maybe noop (\k -> keyaction k bfp)
 					=<< catKey (LsTree.sha i)
 			unlessM (liftIO cleanup) $
 				error ("git ls-tree " ++ Git.fromRef b ++ " failed")
diff --git a/Command/Drop.hs b/Command/Drop.hs
index 16196f0..79797ab 100644
--- a/Command/Drop.hs
+++ b/Command/Drop.hs
@@ -63,36 +63,38 @@ seek o = allowConcurrentOutput $
 	go = whenAnnexed $ start o
 
 start :: DropOptions -> FilePath -> Key -> CommandStart
-start o file key = start' o key (Just file)
+start o file key = start' o key afile (mkActionItem afile)
+  where
+	afile = Just file
 
-start' :: DropOptions -> Key -> AssociatedFile -> CommandStart
-start' o key afile = do
+start' :: DropOptions -> Key -> AssociatedFile -> ActionItem -> CommandStart
+start' o key afile ai = do
 	from <- maybe (pure Nothing) (Just <$$> getParsed) (dropFrom o)
 	checkDropAuto (autoMode o) from afile key $ \numcopies ->
 		stopUnless (want from) $
 			case from of
-				Nothing -> startLocal afile numcopies key []
+				Nothing -> startLocal afile ai numcopies key []
 				Just remote -> do
 					u <- getUUID
 					if Remote.uuid remote == u
-						then startLocal afile numcopies key []
-						else startRemote afile numcopies key remote
+						then startLocal afile ai numcopies key []
+						else startRemote afile ai numcopies key remote
 	  where
 		want from
 			| autoMode o = wantDrop False (Remote.uuid <$> from) (Just key) afile
 			| otherwise = return True
 
-startKeys :: DropOptions -> Key -> CommandStart
+startKeys :: DropOptions -> Key -> ActionItem -> CommandStart
 startKeys o key = start' o key Nothing
 
-startLocal :: AssociatedFile -> NumCopies -> Key -> [VerifiedCopy] -> CommandStart
-startLocal afile numcopies key preverified = stopUnless (inAnnex key) $ do
-	showStart' "drop" key afile
+startLocal :: AssociatedFile -> ActionItem -> NumCopies -> Key -> [VerifiedCopy] -> CommandStart
+startLocal afile ai numcopies key preverified = stopUnless (inAnnex key) $ do
+	showStart' "drop" key ai
 	next $ performLocal key afile numcopies preverified
 
-startRemote :: AssociatedFile -> NumCopies -> Key -> Remote -> CommandStart
-startRemote afile numcopies key remote = do
-	showStart' ("drop " ++ Remote.name remote) key afile
+startRemote :: AssociatedFile -> ActionItem -> NumCopies -> Key -> Remote -> CommandStart
+startRemote afile ai numcopies key remote = do
+	showStart' ("drop " ++ Remote.name remote) key ai
 	next $ performRemote key afile numcopies remote
 
 performLocal :: Key -> AssociatedFile -> NumCopies -> [VerifiedCopy] -> CommandPerform
diff --git a/Command/DropKey.hs b/Command/DropKey.hs
index 9a9d513..42516f8 100644
--- a/Command/DropKey.hs
+++ b/Command/DropKey.hs
@@ -42,7 +42,7 @@ seek o = do
 
 start :: Key -> CommandStart
 start key = do
-	showStart' "dropkey" key key
+	showStart' "dropkey" key (mkActionItem key)
 	next $ perform key
 
 perform :: Key -> CommandPerform
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 6bc91f0..4972be6 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -89,7 +89,7 @@ seek o = allowConcurrentOutput $ do
 	checkDeadRepo u
 	i <- prepIncremental u (incrementalOpt o)
 	withKeyOptions (keyOptions o) False
-		(\k -> startKey i k =<< getNumCopies)
+		(\k ai -> startKey i k ai =<< getNumCopies)
 		(withFilesInGit $ whenAnnexed $ start from i)
 		(fsckFiles o)
 	cleanupIncremental i
@@ -111,7 +111,7 @@ start from inc file key = do
 				Nothing -> go $ perform key file backend numcopies
 				Just r -> go $ performRemote key file backend numcopies r
   where
-	go = runFsck inc file key
+	go = runFsck inc (mkActionItem (Just file)) key
 
 perform :: Key -> FilePath -> Backend -> NumCopies -> Annex Bool
 perform key file backend numcopies = do
@@ -173,11 +173,11 @@ performRemote key file backend numcopies remote =
 		)
 	dummymeter _ = noop
 
-startKey :: Incremental -> Key -> NumCopies -> CommandStart
-startKey inc key numcopies =
+startKey :: Incremental -> Key -> ActionItem -> NumCopies -> CommandStart
+startKey inc key ai numcopies =
 	case Backend.maybeLookupBackendName (keyBackendName key) of
 		Nothing -> stop
-		Just backend -> runFsck inc (key2file key) key $
+		Just backend -> runFsck inc ai key $
 			performKey key backend numcopies
 
 performKey :: Key -> Backend -> NumCopies -> Annex Bool
@@ -504,10 +504,10 @@ badContentRemote remote localcopy key = do
 		(False, True) -> "dropped from " ++ Remote.name remote
 		(_, False) -> "failed to drop from" ++ Remote.name remote

(Diff truncated)
mention --branch
diff --git a/doc/bare_repositories.mdwn b/doc/bare_repositories.mdwn
index 975a638..f73f2f8 100644
--- a/doc/bare_repositories.mdwn
+++ b/doc/bare_repositories.mdwn
@@ -18,11 +18,13 @@ as non-bare repositories. Except for these caveats:
   branches that have been pushed to the bare repository. So use it with care..
 * Commands that need a work tree, like `git annex add` won't work in a bare
   repository, of course.
-* However, you can (with recent versions of git-annex) run `git annex copy`,
-  `git annex get`, and `git annex move` in a bare repository. These behave
-  as if the `--all` option were used, and just operate on every single
-  version of every single file that is present in the git repository
-  history.
+* However, you can run commands like `git annex copy`, `git annex get`, and
+  `git annex drop` in a bare repository. In a bare repository, these
+  behave as if the `--all` option were used, and so operate
+  on every single version of every single file that is present in the git
+  repository history. The `--branch` option can be used to make these
+  commands only operate on the files referenced by a specified branch.  
+  For example: `git annex get --branch master`
 
 ***
 
@@ -39,9 +41,12 @@ Now configure the remote and do the initial push:
     git remote add origin example.com:bare-annex.git
     git push origin master git-annex
 
-Now `git annex info` should show the configured bare remote. If it does not, you may have to pull from the remote first (older versions of `git-annex`)
+Now `git annex info` should show the configured bare remote. If it does
+not, you may have to pull from the remote first (older versions of
+`git-annex`).
 
-If you wish to configure git such that you can push/pull without arguments, set the upstream branch:
+If you wish to configure git such that you can push/pull without arguments,
+set the upstream branch:
 
     git branch master --set-upstream origin/master
 

--branch, stage 1
Added --branch option to copy, drop, fsck, get, metadata, mirror, move, and
whereis commands. This option makes git-annex operate on files that are
included in a specified branch (or other treeish).
The names of the files from the branch that are being operated on are not
displayed yet; only the keys. Displaying the filenames will need changes
to every affected command.
Also, note that --branch can be specified repeatedly. This is not really
documented, but seemed worth supporting, especially since we may later want
the ability to operate on all branches matching a refspec. However, when
operating on two branches that contain the same key, that key will be
operated on twice.
diff --git a/CHANGELOG b/CHANGELOG
index e700ecb..efab17b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,11 @@
+git-annex (6.20160620) UNRELEASED; urgency=medium
+
+  * Added --branch option to copy, drop, fsck, get, metadata, mirror, move,
+    and whereis commands. This option makes git-annex operate on files that
+    are included in a specified branch (or other treeish).
+
+ -- Joey Hess <id@joeyh.name>  Wed, 20 Jul 2016 12:03:15 -0400
+
 git-annex (6.20160619) unstable; urgency=medium
 
   * get, drop: Add --batch and --json options.
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs
index 0147c21..d404b21 100644
--- a/CmdLine/GitAnnex/Options.hs
+++ b/CmdLine/GitAnnex/Options.hs
@@ -141,6 +141,7 @@ data KeyOptions
 	| WantUnusedKeys
 	| WantSpecificKey Key
 	| WantIncompleteKeys
+	| WantBranchKeys [Branch]
 
 parseKeyOptions :: Bool -> Parser KeyOptions
 parseKeyOptions allowincomplete = if allowincomplete
@@ -152,6 +153,10 @@ parseKeyOptions allowincomplete = if allowincomplete
 	else base
   where
 	base = parseAllOption
+		<|> WantBranchKeys <$> many (option (str >>= pure . Ref)
+			( long "branch" <> metavar paramRef
+			<> help "operate on files in the specified branch or treeish"
+			))
 		<|> flag' WantUnusedKeys
 			( long "unused" <> short 'U'
 			<> help "operate on files found by last run of git-annex unused"
diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs
index 30d4759..fb30364 100644
--- a/CmdLine/Seek.hs
+++ b/CmdLine/Seek.hs
@@ -154,7 +154,7 @@ withNothing :: CommandStart -> CmdParams -> CommandSeek
 withNothing a [] = seekActions $ return [a]
 withNothing _ _ = error "This command takes no parameters."
 
-{- Handles the --all, --unused, --key, and --incomplete options,
+{- Handles the --all, --branch, --unused, --key, and --incomplete options,
  - which specify particular keys to run an action on.
  -
  - In a bare repo, --all is the default.
@@ -162,34 +162,49 @@ withNothing _ _ = error "This command takes no parameters."
  - Otherwise falls back to a regular CommandSeek action on
  - whatever params were passed. -}
 withKeyOptions :: Maybe KeyOptions -> Bool -> (Key -> CommandStart) -> (CmdParams -> CommandSeek) -> CmdParams -> CommandSeek
-withKeyOptions ko auto keyaction = withKeyOptions' ko auto $ \getkeys -> do
-	matcher <- Limit.getMatcher
-	seekActions $ map (process matcher) <$> getkeys
+withKeyOptions ko auto keyaction = withKeyOptions' ko auto mkkeyaction
   where
+	mkkeyaction = do
+		matcher <- Limit.getMatcher
+		return $ \getkeys ->
+			seekActions $ map (process matcher) <$> getkeys
 	process matcher k = ifM (matcher $ MatchingKey k)
 		( keyaction k
 		, return Nothing
 		)
 
-withKeyOptions' :: Maybe KeyOptions -> Bool -> (Annex [Key] -> Annex ()) -> (CmdParams -> CommandSeek) -> CmdParams -> CommandSeek
-withKeyOptions' ko auto keyaction fallbackaction params = do
+withKeyOptions' :: Maybe KeyOptions -> Bool -> Annex (Annex [Key] -> Annex ()) -> (CmdParams -> CommandSeek) -> CmdParams -> CommandSeek
+withKeyOptions' ko auto mkkeyaction fallbackaction params = do
 	bare <- fromRepo Git.repoIsLocalBare
 	when (auto && bare) $
 		error "Cannot use --auto in a bare repository"
 	case (null params, ko) of
 		(True, Nothing)
-			| bare -> go auto loggedKeys
+			| bare -> noauto $ runkeyaction loggedKeys
 			| otherwise -> fallbackaction params
 		(False, Nothing) -> fallbackaction params
-		(True, Just WantAllKeys) -> go auto loggedKeys
-		(True, Just WantUnusedKeys) -> go auto unusedKeys'
-		(True, Just (WantSpecificKey k)) -> go auto $ return [k]
-		(True, Just WantIncompleteKeys) -> go auto incompletekeys
-		(False, Just _) -> error "Can only specify one of file names, --all, --unused, --key, or --incomplete"
+		(True, Just WantAllKeys) -> noauto $ runkeyaction loggedKeys
+		(True, Just WantUnusedKeys) -> noauto $ runkeyaction unusedKeys'
+		(True, Just (WantSpecificKey k)) -> noauto $ runkeyaction (return [k])
+		(True, Just WantIncompleteKeys) -> noauto $ runkeyaction incompletekeys
+		(True, Just (WantBranchKeys bs)) -> noauto $ runbranchkeys bs
+		(False, Just _) -> error "Can only specify one of file names, --all, --branch, --unused, --key, or --incomplete"
   where
-	go True _ = error "Cannot use --auto with --all or --unused or --key or --incomplete"
-	go False getkeys = keyaction getkeys
+	noauto a
+		| auto = error "Cannot use --auto with --all or --branch or --unused or --key or --incomplete"
+		| otherwise = a
 	incompletekeys = staleKeysPrune gitAnnexTmpObjectDir True
+	runkeyaction ks = do
+		keyaction <- mkkeyaction
+		keyaction ks
+	runbranchkeys bs = do
+		keyaction <- mkkeyaction
+		forM_ bs $ \b -> do
+			(l, cleanup) <- inRepo $ LsTree.lsTree b
+			forM_ l $ \i ->
+				maybe noop (\k -> keyaction (return [k]))
+					=<< catKey (LsTree.sha i)
+			liftIO $ void cleanup
 
 prepFiltered :: (FilePath -> CommandStart) -> Annex [FilePath] -> Annex [CommandStart]
 prepFiltered a fs = do
@@ -200,9 +215,7 @@ prepFiltered a fs = do
 		( a f , return Nothing )
 
 seekActions :: Annex [CommandStart] -> Annex ()
-seekActions gen = do
-	as <- gen
-	mapM_ commandAction as
+seekActions gen = mapM_ commandAction =<< gen
 
 seekHelper :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> [FilePath] -> Annex [FilePath]
 seekHelper a params = do
diff --git a/Command/Sync.hs b/Command/Sync.hs
index c003aa4..4d8cdf2 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -441,7 +441,7 @@ seekSyncContent o rs = do
 		Just WantAllKeys -> Just <$> genBloomFilter (seekworktree mvar [])
 		_ -> seekworktree mvar [] (const noop) >> pure Nothing
 	withKeyOptions' (keyOptions o) False
-		(seekkeys mvar bloom) 
+		(return (seekkeys mvar bloom))
 		(const noop)
 		[]
 	finishCommandActions
diff --git a/doc/git-annex-copy.mdwn b/doc/git-annex-copy.mdwn
index 5361e97..1853334 100644
--- a/doc/git-annex-copy.mdwn
+++ b/doc/git-annex-copy.mdwn
@@ -51,6 +51,10 @@ Copies the content of files from or to another remote.
 
   This is the default behavior when running git-annex in a bare repository.
 
+* `--branch=ref`
+
+  Operate on files in the specified branch or treeish.
+
 * `--unused`
 
   Operate on files found by last run of git-annex unused.
diff --git a/doc/git-annex-drop.mdwn b/doc/git-annex-drop.mdwn
index 0bbbd78..7b052be 100644
--- a/doc/git-annex-drop.mdwn
+++ b/doc/git-annex-drop.mdwn
@@ -42,14 +42,30 @@ safe to do so.
 
   This is the default behavior when running git-annex drop in a bare repository.
 
+  Note that this bypasses checking the .gitattributes annex.numcopies
+  setting.
+
+* `--branch=ref`
+
+  Drop files in the specified branch or treeish.
+
+  Note that this bypasses checking the .gitattributes annex.numcopies
+  setting.
+
 * `--unused`
 
   Drop files found by last run of git-annex unused.
 
+  Note that this bypasses checking the .gitattributes annex.numcopies
+  setting.
+
 * `--key=keyname`
 
   Use this option to drop a specified key.
 
+  Note that this bypasses checking the .gitattributes annex.numcopies
+  setting.
+
 * file matching options
 
   The [[git-annex-matching-options]](1)
diff --git a/doc/git-annex-fsck.mdwn b/doc/git-annex-fsck.mdwn
index 4b3b510..2500ba9 100644
--- a/doc/git-annex-fsck.mdwn
+++ b/doc/git-annex-fsck.mdwn
@@ -72,6 +72,10 @@ With parameters, only the specified files are checked.
 
   This is the default behavior when running git-annex in a bare repository.
 
+* `--branch=ref`
+
+  Operate on files in the specified branch or treeish.

(Diff truncated)