Recent changes to this wiki:

Added a comment
diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_5_e7c09850009e961354e26f169ccdc6e3._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_5_e7c09850009e961354e26f169ccdc6e3._comment
new file mode 100644
index 0000000..a2af5ca
--- /dev/null
+++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_5_e7c09850009e961354e26f169ccdc6e3._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="benjamin.poldrack@d09ccff6d42dd20277610b59867cf7462927b8e3"
+ nickname="benjamin.poldrack"
+ avatar="http://cdn.libravatar.org/avatar/5c1a901caa7c2cfeeb7e17e786c5230d"
+ subject="comment 5"
+ date="2017-02-22T16:48:04Z"
+ content="""
+Just noticed another thing: If that failure happens, git-annex exits zero. Therefore it's hard to detect for us. We have just an empty json as return value as if the repo was clean.
+It would be nice to have either a non-zero exit or something within the json to indicate that the command failed.
+
+[[ben]]
+"""]]

diff --git a/doc/forum/Upspin.mdwn b/doc/forum/Upspin.mdwn
new file mode 100644
index 0000000..0ef7641
--- /dev/null
+++ b/doc/forum/Upspin.mdwn
@@ -0,0 +1,5 @@
+As soon as I read about Upspin, I thought about git-annex.  Could Upspin's interfaces be beneficial to the project and provide a standardization for naming, permissions and access control?
+
+I realize some of these concepts are not yet part of git-annex, but I thought I'd drop the note and give you the opportunity to evaluate the extent in which Upspin makes sense in the context of git-annex.
+
+https://upspin.io/

diff --git a/doc/forum/Dealing_with_long_filenames.mdwn b/doc/forum/Dealing_with_long_filenames.mdwn
index cb15df0..5411c32 100644
--- a/doc/forum/Dealing_with_long_filenames.mdwn
+++ b/doc/forum/Dealing_with_long_filenames.mdwn
@@ -1,6 +1,6 @@
 - External HD A: annex (contains files with long paths)
 - External HD B: annex (synced with A, doesn't have the contents for files with long paths)
-- laptop HD: annex     (syncing with B fails: paths too long)
+- laptop HD: annex     (*syncing with B fails*: paths too long)
 
 How should I resolve this? 
 

diff --git a/doc/forum/Dealing_with_long_filenames.mdwn b/doc/forum/Dealing_with_long_filenames.mdwn
new file mode 100644
index 0000000..cb15df0
--- /dev/null
+++ b/doc/forum/Dealing_with_long_filenames.mdwn
@@ -0,0 +1,8 @@
+- External HD A: annex (contains files with long paths)
+- External HD B: annex (synced with A, doesn't have the contents for files with long paths)
+- laptop HD: annex     (syncing with B fails: paths too long)
+
+How should I resolve this? 
+
+- Can I rename the broken symlinks on B to shorten the paths, and then sync to the laptop? Would this be propagated to A when it's connected again?
+- Can I `git rm too/long/paths` on B and then sync?

diff --git a/doc/bugs/configuration_options_for_system_ssh_and_bundled_ssh_are_incompatible.mdwn b/doc/bugs/configuration_options_for_system_ssh_and_bundled_ssh_are_incompatible.mdwn
new file mode 100644
index 0000000..13f09d9
--- /dev/null
+++ b/doc/bugs/configuration_options_for_system_ssh_and_bundled_ssh_are_incompatible.mdwn
@@ -0,0 +1,53 @@
+### Please describe the problem.
+
+It appears that the bundled ssh is built without support for some configuration options supported by my system ssh. In particular it doesn't support GSSAPIKexAlgorithms. In principle it's fine to compile this ssh without support for GSS, since nobody uses it, but in practice it means that I can't even turn it off in my system config without breaking the bundled ssh.
+
+(I suppose the problem could also be that the bundled ssh tries to use the system ssh configuration instead of a bundled configuration.)
+
+### What version of git-annex are you using? On what operating system?
+
+[[!format sh """
+git-annex version: 6.20161231-gc8eeb17da
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: 6
+supported repository versions: 3 5 6
+upgrade supported from repository versions: 0 1 2 3 4 5
+operating system: linux x86_64
+"""]]
+
+### Please provide any additional information below.
+
+See also [[todo/git-annex_ignores_GIT__95__SSH]]
+
+[[!format sh """
+ db48x  ~  video  git-annex sync
+commit
+On branch master
+Your branch is ahead of 'anglachel/master' by 20 commits.
+  (use "git push" to publish your local commits)
+nothing to commit, working tree clean
+ok
+pull anglachel
+/etc/crypto-policies/back-ends/openssh.config: line 3: Bad configuration option: gssapikexalgorithms
+/etc/crypto-policies/back-ends/openssh.config: terminating, 1 bad configuration options
+fatal: Could not read from remote repository.
+Please make sure you have the correct access rights
+and the repository exists.
+failed
+push anglachel
+/etc/crypto-policies/back-ends/openssh.config: line 3: Bad configuration option: gssapikexalgorithms
+/etc/crypto-policies/back-ends/openssh.config: terminating, 1 bad configuration options
+fatal: Could not read from remote repository.
+Please make sure you have the correct access rights
+and the repository exists.
+  Pushing to anglachel failed.
+  (non-fast-forward problems can be solved by setting receive.denyNonFastforwards to false in the remote's git config)
+failed
+git-annex: sync: 2 failed
+"""]]
+
+### 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)
+
+

Added a comment
diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_4_9041ccdacce602c6c09c3fc09e95ce8d._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_4_9041ccdacce602c6c09c3fc09e95ce8d._comment
new file mode 100644
index 0000000..c5bd51a
--- /dev/null
+++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_4_9041ccdacce602c6c09c3fc09e95ce8d._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="benjamin.poldrack@d09ccff6d42dd20277610b59867cf7462927b8e3"
+ nickname="benjamin.poldrack"
+ avatar="http://cdn.libravatar.org/avatar/5c1a901caa7c2cfeeb7e17e786c5230d"
+ subject="comment 4"
+ date="2017-02-21T06:20:34Z"
+ content="""
+Yes, it saves half the work and eases to deal with this one.
+
+[[ben]]
+"""]]

status: Pass --ignore-submodules=when option on to git status.
Didn't make --ignore-submodules without a value be handled because I can't
see a way to make optparse-applicative parse that. I've opened a bug
requesting a way to do that:
https://github.com/pcapriotti/optparse-applicative/issues/243
diff --git a/CHANGELOG b/CHANGELOG
index 3b63109..c6a4aee 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -32,6 +32,7 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
   * When downloading in --json or --quiet mode, use curl in preference
     to wget, since curl is able to display only errors to stderr, unlike
     wget.
+  * status: Pass --ignore-submodules=when option on to git status.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/Command/Status.hs b/Command/Status.hs
index 3a3bfa8..2e6b9f4 100644
--- a/Command/Status.hs
+++ b/Command/Status.hs
@@ -20,14 +20,28 @@ cmd = notBareRepo $ noCommit $ noMessages $
 	withGlobalOptions [jsonOption] $
 		command "status" SectionCommon
 			"show the working tree status"
-			paramPaths (withParams seek)
+			paramPaths (seek <$$> optParser)
 
-seek :: CmdParams -> CommandSeek
-seek = withWords start
+data StatusOptions = StatusOptions
+	{ statusFiles :: CmdParams
+	, ignoreSubmodules :: Maybe String
+	}
+
+optParser :: CmdParamsDesc -> Parser StatusOptions
+optParser desc = StatusOptions
+	<$> cmdParams desc
+	<*> optional (strOption
+		( long "ignore-submodules"
+		<> help "passed on to git status"
+		<> metavar "WHEN"
+		))
+
+seek :: StatusOptions -> CommandSeek
+seek o = withWords (start o) (statusFiles o)
 	
-start :: [FilePath] -> CommandStart
-start locs = do
-	(l, cleanup) <- inRepo $ getStatus locs
+start :: StatusOptions -> [FilePath] -> CommandStart
+start o locs = do
+	(l, cleanup) <- inRepo $ getStatus ps locs
 	getstatus <- ifM isDirect
 		( return statusDirect
 		, return $ \s -> pure (Just s)
@@ -35,6 +49,10 @@ start locs = do
 	forM_ l $ \s -> maybe noop displayStatus =<< getstatus s
 	void $ liftIO cleanup
 	stop
+  where
+	ps = case ignoreSubmodules o of
+		Nothing -> []
+		Just s -> [Param $ "--ignore-submodules="++s]
 
 displayStatus :: Status -> Annex ()
 -- renames not shown in this simplified status
diff --git a/Git/Status.hs b/Git/Status.hs
index 4f9ad02..778e652 100644
--- a/Git/Status.hs
+++ b/Git/Status.hs
@@ -64,13 +64,14 @@ parseStatusZ = go []
 	cparse '?' = Just Untracked
 	cparse _ = Nothing
 
-getStatus :: [FilePath] -> Repo -> IO ([Status], IO Bool)
-getStatus l r = do
-	(ls, cleanup) <- pipeNullSplit params r
+getStatus :: [CommandParam] -> [FilePath] -> Repo -> IO ([Status], IO Bool)
+getStatus ps fs r = do
+	(ls, cleanup) <- pipeNullSplit ps' r
 	return (parseStatusZ ls, cleanup)
   where
-	params =
-		[ Param "status"
-		, Param "-uall"
-		, Param "-z"
-		] ++ map File l
+	ps' = concat
+		[ [Param "status"]
+		, ps
+		, [ Param "-uall" , Param "-z"]
+		, map File fs
+		]
diff --git a/doc/git-annex-status.mdwn b/doc/git-annex-status.mdwn
index 19bd6fa..3a897dc 100644
--- a/doc/git-annex-status.mdwn
+++ b/doc/git-annex-status.mdwn
@@ -23,6 +23,11 @@ Particularly useful in direct mode.
   Enable JSON output. This is intended to be parsed by programs that use
   git-annex. Each line of output is a JSON object.
 
+* `--ignore-submodules=when`
+
+  This option is passed on to git status, see its man page for
+  details.
+
 # SEE ALSO
 
 [[git-annex]](1)

question
diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_8cce6890bf13af8bfd1ed19ccd904162._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_8cce6890bf13af8bfd1ed19ccd904162._comment
new file mode 100644
index 0000000..e15c59a
--- /dev/null
+++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_8cce6890bf13af8bfd1ed19ccd904162._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2017-02-20T20:13:06Z"
+ content="""
+Would it suffice for datalad to have git-annex status --ignore-submodules
+pass the option on to git status?
+"""]]

make curl show http errors to stderr
* Run curl with -S, so HTTP errors are displayed, even when
it's otherwise silent.
* When downloading in --json or --quiet mode, use curl in preference
to wget, since curl is able to display only errors to stderr, unlike
wget.
This does mean that downloadQuiet is only silent on stdout, not necessarily
on stderr, which affects a couple other calls of it. For example,
downloading the .git/config of a http remote may show an error message now,
perhaps with slightly suboptimal formatting due to other output.
diff --git a/CHANGELOG b/CHANGELOG
index 4e150f3..3b63109 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -27,6 +27,11 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
   * adjust: Fix behavior when used in a repository that contains
     submodules.
   * Run wget with -nv instead of -q, so it will display HTTP errors.
+  * Run curl with -S, so HTTP errors are displayed, even when
+    it's otherwise silent.
+  * When downloading in --json or --quiet mode, use curl in preference
+    to wget, since curl is able to display only errors to stderr, unlike
+    wget.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 166783e..1b68dce 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -246,17 +246,16 @@ headRequest r = r
 		(requestHeaders r)
 	}
 
-{- Used to download large files, such as the contents of keys.
+{- Download a perhaps large file, with auto-resume of incomplete downloads.
  -
- - Uses wget or curl program for its progress bar. (Wget has a better one,
- - so is preferred.) Which program to use is determined at run time; it
- - would not be appropriate to test at configure time and build support
- - for only one in.
+ - Uses wget or curl program for its progress bar and resuming support. 
+ - Which program to use is determined at run time depending on which is
+ - in path and which works best in a particular situation.
  -}
 download :: URLString -> FilePath -> UrlOptions -> IO Bool
 download = download' False
 
-{- No output, even on error. -}
+{- No output to stdout. -}
 downloadQuiet :: URLString -> FilePath -> UrlOptions -> IO Bool
 downloadQuiet = download' True
 
@@ -265,6 +264,12 @@ download' quiet url file uo = do
 	case parseURIRelaxed url of
 		Just u
 			| uriScheme u == "file:" -> curl
+			-- curl is preferred in quiet mode, because
+			-- it displays http errors to stderr, while wget
+			-- does not display them in quiet mode
+			| quiet -> ifM (inPath "curl") (curl, wget)
+			-- wget is preferred mostly because it has a better
+			-- progress bar
 			| otherwise -> ifM (inPath "wget") (wget , curl)
 		_ -> return False
   where
@@ -275,7 +280,8 @@ download' quiet url file uo = do
 	 - support, or need that option.
 	 -
 	 - When the wget version is new enough, pass options for
-	 - a less cluttered download display.
+	 - a less cluttered download display. Using -nv rather than -q
+	 - avoids most clutter while still displaying http errors.
 	 -}
 #ifndef __ANDROID__
 	wgetparams = concat
@@ -296,7 +302,7 @@ download' quiet url file uo = do
 		-- curl does not create destination file
 		-- if the url happens to be empty, so pre-create.
 		writeFile file ""
-		go "curl" $ headerparams ++ quietopt "-s" ++
+		go "curl" $ headerparams ++ quietopt "-sS" ++
 			[ Param "-f"
 			, Param "-L"
 			, Param "-C", Param "-"
diff --git a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json.mdwn b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json.mdwn
index b9283ae..3e9c309 100644
--- a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json.mdwn
+++ b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json.mdwn
@@ -18,3 +18,5 @@ ATM I am experiencing sporadic failures of the batched  git annex addurl call --
 besides me blindly trying to re-run it e.g. 3 times and only then declare total failure, I wondered if json output could provide more information (if any known) about the failure... e.g. if a custom remote crashed/errorred (I guess the case here due to "from datalad") -- what was stderr/exit code for that process if crashed/ERROR msg... if wget -- what was stderr there
 
 [[!meta name=yoh]]
+
+> Switched to curl with -sS in --json mode. [[done]] I suppose. --[[Joey]]
diff --git a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
index 4093553..0ece7ca 100644
--- a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
+++ b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
@@ -3,13 +3,14 @@
  subject="""comment 2"""
  date="2017-02-20T19:15:18Z"
  content="""
+It seems there is no way to get only errors on
+stderr with wget; the choice is between no output, and a mixture of errors
+and informational messages on stderr. In --json or --quiet mode, only
+errors should be output to stderr.
+
 In general, the --json output does include a "note" with any
 available message about why an operation failed. 
 
-Since wget outputs HTTP errors to stdout, there's no way to capture
-the actual message for json, and so swiching to wget -nv won't improve
-the json, since in json mode wget is run with -q.
-
 It would not be hard to use a HTTP library and propagate the HTTP errors
 into the json "note", but it might be hard to get resumption of partial
 downloads to work as well with a HTTP library as it works with wget/curl.

update
diff --git a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
index b7c65c5..4093553 100644
--- a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
+++ b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
@@ -6,13 +6,15 @@
 In general, the --json output does include a "note" with any
 available message about why an operation failed. 
 
-Since wget outputs HTTP errors to stdout, there's no way to capture the actual
-message for json, and so swiching to wget -nv won't improve the json.
-(curl also outputs HTTP errors to stdout too, so it's no better)
+Since wget outputs HTTP errors to stdout, there's no way to capture
+the actual message for json, and so swiching to wget -nv won't improve
+the json, since in json mode wget is run with -q.
 
-Short of using a HTTP library for url downloads in --json mode,
-I don't see a way to fix this. It would not be hard to use a HTTP library
-and propagate the HTTP errors into the json "note", but it might be hard to
-get resumption of partial downloads to work as well with a HTTP library as
-it works with wget.
+It would not be hard to use a HTTP library and propagate the HTTP errors
+into the json "note", but it might be hard to get resumption of partial
+downloads to work as well with a HTTP library as it works with wget/curl.
+
+What we could do is use curl in preference to wget in json mode; 
+curl -s -S avoids all progress etc output and displays the
+http errors to stderr.
 ""]]

Run wget with -nv instead of -q, so it will display HTTP errors.
This adds one extra line of output when a download is successful,
after the progress bar. I don't much like that, but wget does not provide a
way to show HTTP errors without it.
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 616dcc5..7c7c2ef 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -34,7 +34,7 @@ tests =
 	, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
 	, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
 	, TestCase "wget" $ testCmd "wget" "wget --version >/dev/null"
-	, TestCase "wget supports -q --show-progress" checkWgetQuietProgress
+	, TestCase "wget unclutter options" checkWgetUnclutter
 	, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
 	, TestCase "nice" $ testCmd "nice" "nice true >/dev/null"
 	, TestCase "ionice" $ testCmd "ionice" "ionice -c3 true >/dev/null"
@@ -105,8 +105,8 @@ getGitVersion = go =<< getEnv "FORCE_GIT_VERSION"
 			error $ "installed git version " ++ show v ++ " is too old! (Need " ++ show oldestallowed ++ " or newer)"
 		return $ Config "gitversion" $ StringConfig $ show v
 
-checkWgetQuietProgress :: Test
-checkWgetQuietProgress = Config "wgetquietprogress" . BoolConfig
+checkWgetUnclutter :: Test
+checkWgetUnclutter = Config "wgetunclutter" . BoolConfig
 	. maybe False (>= normalize "1.16")
 	<$> getWgetVersion 
 
diff --git a/CHANGELOG b/CHANGELOG
index 10c0c9f..4e150f3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -26,6 +26,7 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
     webapp and test suite.
   * adjust: Fix behavior when used in a repository that contains
     submodules.
+  * Run wget with -nv instead of -q, so it will display HTTP errors.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/Utility/Url.hs b/Utility/Url.hs
index da1a38d..45a34bc 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -279,8 +279,8 @@ download' quiet url file uo = do
 	 -}
 #ifndef __ANDROID__
 	wgetparams = concat
-		[ if Build.SysConfig.wgetquietprogress && not quiet
-			then [Param "-q", Param "--show-progress"]
+		[ if Build.SysConfig.wgetunclutter && not quiet
+			then [Param "-nv", Param "--show-progress"]
 			else []
 		, [ Param "--clobber", Param "-c", Param "-O"]
 		]
diff --git a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_1_0eeb859b57d4dc8a3c9c9c3c4f70bb45._comment b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_1_0eeb859b57d4dc8a3c9c9c3c4f70bb45._comment
new file mode 100644
index 0000000..80dfe50
--- /dev/null
+++ b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_1_0eeb859b57d4dc8a3c9c9c3c4f70bb45._comment
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-20T18:50:18Z"
+ content="""
+Probably wget is just failing to download the url sometimes.
+Eg, `git annex addurl http://localhost/dne` fails with the same not useful
+output.
+
+wget is run with -q, which is the only way to turn off all its informational
+messages, but unfortunately that also turns off display of HTTP error messages.
+
+Using -nv instead of -q would display HTTP errors,
+but also 1 extra line of output once the download is complete.
+I suppose that's worth the trade-off.
+"""]]
diff --git a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
new file mode 100644
index 0000000..b7c65c5
--- /dev/null
+++ b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
@@ -0,0 +1,18 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2017-02-20T19:15:18Z"
+ content="""
+In general, the --json output does include a "note" with any
+available message about why an operation failed. 
+
+Since wget outputs HTTP errors to stdout, there's no way to capture the actual
+message for json, and so swiching to wget -nv won't improve the json.
+(curl also outputs HTTP errors to stdout too, so it's no better)
+
+Short of using a HTTP library for url downloads in --json mode,
+I don't see a way to fix this. It would not be hard to use a HTTP library
+and propagate the HTTP errors into the json "note", but it might be hard to
+get resumption of partial downloads to work as well with a HTTP library as
+it works with wget.
+""]]

removed
diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_70caba06088aabab6ed27c6e2428e95f._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_70caba06088aabab6ed27c6e2428e95f._comment
deleted file mode 100644
index 52941a0..0000000
--- a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_70caba06088aabab6ed27c6e2428e95f._comment
+++ /dev/null
@@ -1,13 +0,0 @@
-[[!comment format=mdwn
- username="benjamin.poldrack@d09ccff6d42dd20277610b59867cf7462927b8e3"
- nickname="benjamin.poldrack"
- avatar="http://cdn.libravatar.org/avatar/5c1a901caa7c2cfeeb7e17e786c5230d"
- subject="comment 3"
- date="2017-02-20T19:07:22Z"
- content="""
-Yes, that's what I assumed. Therefore this bug was linked in the datalad issue regarding --ignore-submodules.
-
-May be we are the only ones, who are actually effected, since we heavily use submodules. If it's too much of an effort, I will find a way around it, I guess.
-Either way: Thank you for having a look at it.
-[[ben]]
-"""]]

Added a comment
diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_70caba06088aabab6ed27c6e2428e95f._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_70caba06088aabab6ed27c6e2428e95f._comment
new file mode 100644
index 0000000..52941a0
--- /dev/null
+++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_3_70caba06088aabab6ed27c6e2428e95f._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="benjamin.poldrack@d09ccff6d42dd20277610b59867cf7462927b8e3"
+ nickname="benjamin.poldrack"
+ avatar="http://cdn.libravatar.org/avatar/5c1a901caa7c2cfeeb7e17e786c5230d"
+ subject="comment 3"
+ date="2017-02-20T19:07:22Z"
+ content="""
+Yes, that's what I assumed. Therefore this bug was linked in the datalad issue regarding --ignore-submodules.
+
+May be we are the only ones, who are actually effected, since we heavily use submodules. If it's too much of an effort, I will find a way around it, I guess.
+Either way: Thank you for having a look at it.
+[[ben]]
+"""]]

Added a comment
diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_2_0d16964586347e6447d9193508f0d7f8._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_2_0d16964586347e6447d9193508f0d7f8._comment
new file mode 100644
index 0000000..a3e7198
--- /dev/null
+++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_2_0d16964586347e6447d9193508f0d7f8._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="benjamin.poldrack@d09ccff6d42dd20277610b59867cf7462927b8e3"
+ nickname="benjamin.poldrack"
+ avatar="http://cdn.libravatar.org/avatar/5c1a901caa7c2cfeeb7e17e786c5230d"
+ subject="comment 2"
+ date="2017-02-20T19:06:58Z"
+ content="""
+Yes, that's what I assumed. Therefore this bug was linked in the datalad issue regarding --ignore-submodules.
+
+May be we are the only ones, who are actually effected, since we heavily use submodules. If it's too much of an effort, I will find a way around it, I guess.
+Either way: Thank you for having a look at it.
+[[ben]]
+"""]]

comment
diff --git a/doc/bugs/S3_remote___8212___un-embedding_creds__63__/comment_1_336e1c2a5c2a367cba0ad74896b3895b._comment b/doc/bugs/S3_remote___8212___un-embedding_creds__63__/comment_1_336e1c2a5c2a367cba0ad74896b3895b._comment
new file mode 100644
index 0000000..79a44d7
--- /dev/null
+++ b/doc/bugs/S3_remote___8212___un-embedding_creds__63__/comment_1_336e1c2a5c2a367cba0ad74896b3895b._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-20T18:38:16Z"
+ content="""
+When you used embedcreds=yes, it *committed* the creds to the git-annex
+branch of the git repository. For embedcreds=no to do anything useful,
+it would need to remove that data from the git repository history.
+
+Removing data from a git repository tends to involve rewriting commits and
+forced pushes to all remotes, it's not a simple process and not ameanable
+to automation. It will be much easier, and more secure, to go into S3
+and generate new credentials, and revoke access to the old ones.
+
+What `git annex enableremote` with `embedcreds=no` does do is prevent
+any new creds from being embedded into the repository. Otherwise,
+`git annex enableremote` will update the embedded creds
+with whatever new ones are set in the environment when you run it.
+"""]]

comment
diff --git a/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_1_0258db936120767e8e41cd926cb5bfd5._comment b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_1_0258db936120767e8e41cd926cb5bfd5._comment
new file mode 100644
index 0000000..63cceed
--- /dev/null
+++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode/comment_1_0258db936120767e8e41cd926cb5bfd5._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-20T18:30:54Z"
+ content="""
+Error is:
+
+	fatal: This operation must be run in a work tree
+	fatal: 'git status --porcelain' failed in submodule sub
+
+`git status` fails the same way, and it seems that the only way
+to make it work would be to pass --ignore-submodules to it.
+
+But I suppose then, it would need to replicate git status's submodule
+traversal.
+
+I'm not too keen on adding complicated stuff involving submodules to direct
+mode. My goal with direct mode is to eliminate the need for it.
+"""]]

Added a comment: the problem files
diff --git a/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_8_baefe35266021184ee78440226fe2a8d._comment b/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_8_baefe35266021184ee78440226fe2a8d._comment
new file mode 100644
index 0000000..df94899
--- /dev/null
+++ b/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_8_baefe35266021184ee78440226fe2a8d._comment
@@ -0,0 +1,25 @@
+[[!comment format=mdwn
+ username="andrew"
+ avatar="http://cdn.libravatar.org/avatar/acc0ece1eedf07dd9631e7d7d343c435"
+ subject="the problem files"
+ date="2017-02-20T18:11:03Z"
+ content="""
+Joey,
+
+the file names seem quite ordinary:
+
+    cv/submissions/BCA_Submission/small_images/drawblocks_2015_IMG_1719.jpg
+    cv/submissions/BCA_Submission/small_images/drawblocks_2015_IMG_3848.jpg
+    cv/submissions/BCA_Submission/small_images/macropavilion_2016_IMG_0391.jpg
+    cv/submissions/BCA_Submission/small_images/sequencing_2016_DSC5048.jpg
+    cv/submissions/BCA_Submission/small_images/sequencing_2016_IMG_8231.jpg
+
+Possibly this is related to an issue I had with v6 and `annex.largefiles` about 12-months ago. I had done `git config annex.largefiles 'largerthan=100kb and not (include=*.c or include=*.h)'`. But I believe this resulted in git-annex thinking locked files with no content present should be added to git instead of annex? After doing a `git-annex add .` I now had a bunch of files whose content was lost. Or perhaps I did a sync with a v5 repo, or perhaps I did a sync with a repo with a different large files settings, I can't remember. Anyhow, I managed to lose links to the file content and `git-annex get` or fsck couldn't retrieve them. I never filed a bug report because I was never able to reproduce the issue on a clean repo. 
+
+Anyhow, perhaps spelunking into the git log would give some answers?
+
+
+
+Andrew
+
+"""]]

adjust: Fix behavior when used in a repository that contains submodules.
Also fixed the LsFiles parser to not assume its output has a fixed width
type field.
diff --git a/CHANGELOG b/CHANGELOG
index fe7e46a..10c0c9f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -24,6 +24,8 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
     git-annex branch merging, etc, when being used to get information.
   * git-annex.cabal: Make crypto-api a dependency even when built w/o
     webapp and test suite.
+  * adjust: Fix behavior when used in a repository that contains
+    submodules.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/Git/LsTree.hs b/Git/LsTree.hs
index 2060fa7..225f2ce 100644
--- a/Git/LsTree.hs
+++ b/Git/LsTree.hs
@@ -24,6 +24,7 @@ import Git.FilePath
 import qualified Git.Filename
 
 import Numeric
+import Data.Char
 import System.Posix.Types
 
 data TreeItem = TreeItem
@@ -66,7 +67,9 @@ lsTreeFiles t fs repo = map parseLsTree <$> pipeNullSplitStrict ps repo
 		, File $ fromRef t
 		] ++ map File fs
 
-{- Parses a line of ls-tree output.
+{- Parses a line of ls-tree output, in format:
+ - mode SP type SP sha TAB file
+ -
  - (The --long format is not currently supported.) -}
 parseLsTree :: String -> TreeItem
 parseLsTree l = TreeItem 
@@ -76,12 +79,9 @@ parseLsTree l = TreeItem
 	, file = sfile
 	}
   where
-	-- l = <mode> SP <type> SP <sha> TAB <file>
-	-- All fields are fixed, so we can pull them out of
-	-- specific positions in the line.
-	(m, past_m) = splitAt 7 l
-	(!t, past_t) = splitAt 4 past_m
-	(!s, past_s) = splitAt shaSize $ Prelude.tail past_t
-	!f = Prelude.tail past_s
+	(m, past_m) = splitAt 7 l -- mode is 6 bytes
+	(!t, past_t) = separate isSpace past_m
+	(!s, past_s) = splitAt shaSize past_t
+	!f = drop 1 past_s
 	!smode = fst $ Prelude.head $ readOct m
 	!sfile = asTopFilePath $ Git.Filename.decode f
diff --git a/Git/Tree.hs b/Git/Tree.hs
index 282643f..3e6b85a 100644
--- a/Git/Tree.hs
+++ b/Git/Tree.hs
@@ -35,11 +35,14 @@ newtype Tree = Tree [TreeContent]
 	deriving (Show)
 
 data TreeContent
+	-- A blob object in the tree.
 	= TreeBlob TopFilePath FileMode Sha
 	-- A subtree that is already recorded in git, with a known sha.
 	| RecordedSubTree TopFilePath Sha [TreeContent]
 	-- A subtree that has not yet been recorded in git.
 	| NewSubTree TopFilePath [TreeContent]
+	-- A commit object that is part of a tree (used for submodules)
+	| TreeCommit TopFilePath FileMode Sha
 	deriving (Show, Eq, Ord)
 
 {- Gets the Tree for a Ref. -}
@@ -93,6 +96,7 @@ mkTree (MkTreeHandle cp) l = CoProcess.query cp send receive
 			TreeBlob f fm s -> mkTreeOutput fm BlobObject s f
 			RecordedSubTree f s _ -> mkTreeOutput 0o040000 TreeObject s f
 			NewSubTree _ _ -> error "recordSubTree internal error; unexpected NewSubTree"
+			TreeCommit f fm s -> mkTreeOutput fm CommitObject s f
 		hPutStr h "\NUL" -- signal end of tree to --batch
 	receive h = getSha "mktree" (hGetLine h)
 
@@ -152,6 +156,7 @@ flattenTree n (Tree l) = Tree (concatMap (go n) l)
 	go _ b@(TreeBlob _ _ _) = [b]
 	go n' (RecordedSubTree _ _ l') = concatMap (go (n'-1)) l'
 	go n' (NewSubTree _ l') = concatMap (go (n'-1)) l'
+	go _ c@(TreeCommit _ _ _) = [c]
 
 {- Applies an adjustment to items in a tree.
  -
@@ -200,6 +205,9 @@ adjustTree adjusttreeitem addtreeitems removefiles r repo =
 					else return $ RecordedSubTree (LsTree.file i) (LsTree.sha i) [] 
 				let !modified' = modified || slmodified || wasmodified
 				go h modified' (subtree : c) depth intree is'
+			Just CommitObject -> do
+				let ti = TreeCommit (LsTree.file i) (LsTree.mode i)  (LsTree.sha i)
+				go h wasmodified (ti:c) depth intree is
 			_ -> error ("unexpected object type \"" ++ LsTree.typeobj i ++ "\"")
 		| otherwise = return (c, wasmodified, i:is)
 
@@ -236,6 +244,9 @@ extractTree l = case go [] inTopTree l of
 					let st = RecordedSubTree (LsTree.file i) (LsTree.sha i) subtree
 					in go (st:t) intree is'
 				Left e -> Left e
+			Just CommitObject ->
+				let c = TreeCommit (LsTree.file i) (LsTree.mode i) (LsTree.sha i)
+				in go (c:t) intree is
 			_ -> parseerr ("unexpected object type \"" ++ LsTree.typeobj i ++ "\"")
 		| otherwise = Right (t, i:is)
 	parseerr = Left
@@ -259,6 +270,7 @@ instance GitPath TreeContent where
 	gitPath (TreeBlob f _ _) = gitPath f
 	gitPath (RecordedSubTree f _ _) = gitPath f
 	gitPath (NewSubTree f _) = gitPath f
+	gitPath (TreeCommit f _ _) = gitPath f
 
 inTopTree :: GitPath t => t -> Bool
 inTopTree = inTree "."
diff --git a/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature.mdwn b/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature.mdwn
index 79df9e0..d5b8e27 100644
--- a/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature.mdwn
+++ b/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature.mdwn
@@ -54,3 +54,4 @@ operating system: linux x86_64
 ### 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)
 
 
+> [[fixed|done]] --[[Joey]]
diff --git a/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature/comment_1_176faba802ecd62b04c06c6dab77f5f3._comment b/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature/comment_1_176faba802ecd62b04c06c6dab77f5f3._comment
new file mode 100644
index 0000000..76e0c78
--- /dev/null
+++ b/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature/comment_1_176faba802ecd62b04c06c6dab77f5f3._comment
@@ -0,0 +1,20 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-20T17:13:54Z"
+ content="""
+Error message is:
+
+	git-annex: unexpected object type "comm"
+
+What it's actually choking on is the "commit" object for the submodule,
+in git-ls-tree output. Doesn't matter if the submodule uses
+adjusted branches or not.
+
+The parser for ls-tree output is buggy;
+it's expecting only "blob" and "tree", so pulls out a fixed width 4
+characters: "comm"
+
+Also, the adjusted branch code needs to be made to skip over CommitObjects,
+once the parser is fixed to generate them.
+"""]]

comment
diff --git a/doc/bugs/Nearline_bucket_stopped_working___40__can__39__t_even_HEAD_files__41__/comment_4_3853bebdfcb7dac647edefd6f55ba8d5._comment b/doc/bugs/Nearline_bucket_stopped_working___40__can__39__t_even_HEAD_files__41__/comment_4_3853bebdfcb7dac647edefd6f55ba8d5._comment
new file mode 100644
index 0000000..9b3bc55
--- /dev/null
+++ b/doc/bugs/Nearline_bucket_stopped_working___40__can__39__t_even_HEAD_files__41__/comment_4_3853bebdfcb7dac647edefd6f55ba8d5._comment
@@ -0,0 +1,20 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2017-02-20T17:00:55Z"
+ content="""
+I'd expect that the respone body is indeed not shown by --debug.
+
+A timestamp bug seems as good a theory as anything. In either the S3
+library git-annex is using, or the S3 emulation Google Cloud Storage is
+using. Or perhaps google has different versions of the servers that behave
+differently.
+
+Over on [[tips/using_Google_Cloud_Storage]], @Dosenpfand
+reports what looks like the same 400 when initializing a nearline remote.
+
+Since this is using a S3 interoperability layer in Google Cloud Storage,
+I'd not be surprised if there were bugs or limitations in it. 
+Using the native GCS API seems like an increasingly good idea,
+and <https://github.com/bgilbert/gcsannex> implements that.
+"""]]

comment
diff --git a/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_2_8f694afa77f5a835c826d29d46d44615._comment b/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_2_8f694afa77f5a835c826d29d46d44615._comment
index ccaeeb4..8228b6e 100644
--- a/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_2_8f694afa77f5a835c826d29d46d44615._comment
+++ b/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_2_8f694afa77f5a835c826d29d46d44615._comment
@@ -1,4 +1,4 @@
-[[!comment format=mdwn
+	[[!comment format=mdwn
  username="joey"
  subject="""comment 2"""
  date="2016-11-16T18:52:07Z"
diff --git a/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_7_63225cc9557886ae12b3450f68812815._comment b/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_7_63225cc9557886ae12b3450f68812815._comment
new file mode 100644
index 0000000..fd1c563
--- /dev/null
+++ b/doc/forum/sync_--content__44___fatal_is_outside_repository_errors/comment_7_63225cc9557886ae12b3450f68812815._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 7"""
+ date="2017-02-20T16:54:19Z"
+ content="""
+Can you give me some examples of the names of the "problem files"?
+"""]]

comment
diff --git a/doc/bugs/add_fails_with_v6_repo_when_four_levels_deep/comment_6_ce19be99100dfadc9e69729a7af98dff._comment b/doc/bugs/add_fails_with_v6_repo_when_four_levels_deep/comment_6_ce19be99100dfadc9e69729a7af98dff._comment
new file mode 100644
index 0000000..bba777c
--- /dev/null
+++ b/doc/bugs/add_fails_with_v6_repo_when_four_levels_deep/comment_6_ce19be99100dfadc9e69729a7af98dff._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 6"""
+ date="2017-02-20T16:27:39Z"
+ content="""
+I also can't reproduce any problem running the script from comment #5
+here. 
+
+(The reason that `git ls-files --modified` is
+throwing the error is because that ends up running git-annex
+when in a v6 repo.
+
+Seems like it must come down to the version of git, or some
+other part of the environment, since it is only happening on one computer
+and not others.
+
+Are there any symlinks in the path to the repository where this happens?
+Does this happen if you run the script in `/tmp/newrepo`?
+"""]]

remove
I've seen this thing, whatever it is, mentioned in spam links before,
so even if it's valid for some OS (probably not the one being asked
about), it's verboten here.
diff --git a/doc/todo/Allow_globally_limiting_filename_length/comment_6_e30124b8837a8956607164e4632502cd._comment b/doc/todo/Allow_globally_limiting_filename_length/comment_6_e30124b8837a8956607164e4632502cd._comment
deleted file mode 100644
index b7f769e..0000000
--- a/doc/todo/Allow_globally_limiting_filename_length/comment_6_e30124b8837a8956607164e4632502cd._comment
+++ /dev/null
@@ -1,9 +0,0 @@
-[[!comment format=mdwn
- username="rivera15071976@36a85c6f19ac15f9202999a3e3b15b27cc8a750a"
- nickname="rivera15071976"
- avatar="http://cdn.libravatar.org/avatar/e1ab4ef44104ce26ef4b31130b36bfe7"
- subject="Long Path Tool"
- date="2017-01-16T08:02:52Z"
- content="""
-I would recommend you to use Long Path Tool
-"""]]

comment
diff --git a/doc/todo/add_ancient_armel_build/comment_3_eaeb9aec42fde6b8a25199b1e1e6a78c._comment b/doc/todo/add_ancient_armel_build/comment_3_eaeb9aec42fde6b8a25199b1e1e6a78c._comment
new file mode 100644
index 0000000..b645d7b
--- /dev/null
+++ b/doc/todo/add_ancient_armel_build/comment_3_eaeb9aec42fde6b8a25199b1e1e6a78c._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2017-02-20T16:22:58Z"
+ content="""
+The build is set up; it's not run to completion yet, but fingers crossed it
+will eventually.
+"""]]

git-annex.cabal: Make crypto-api a dependency even when built w/o webapp and test suite.
The p2p code made it always be needed.
This commit was sponsored by Anthony DeRobertis on Patreon.
diff --git a/CHANGELOG b/CHANGELOG
index 36ae125..fe7e46a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -22,6 +22,8 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
   * config group groupwanted numcopies schedule wanted required: 
     Avoid displaying extraneous messages about repository auto-init,
     git-annex branch merging, etc, when being used to get information.
+  * git-annex.cabal: Make crypto-api a dependency even when built w/o
+    webapp and test suite.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/doc/bugs/crypto-api_is_a_global_dependency_because_of_Utility.AuthToken.mdwn b/doc/bugs/crypto-api_is_a_global_dependency_because_of_Utility.AuthToken.mdwn
index 29faab8..fcde456 100644
--- a/doc/bugs/crypto-api_is_a_global_dependency_because_of_Utility.AuthToken.mdwn
+++ b/doc/bugs/crypto-api_is_a_global_dependency_because_of_Utility.AuthToken.mdwn
@@ -22,3 +22,4 @@ We need to make `crypto-api` into a global dependency. Here is a [patch](https:/
 
 Oh yes! I use it everyday to sync collections of binary files across computers and VM's! 
 
+> [[fixed|done]], thanks! --[[Joey]]
diff --git a/git-annex.cabal b/git-annex.cabal
index 75ce829..c394693 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -361,7 +361,8 @@ Executable git-annex
    socks,
    byteable,
    stm-chans,
-   securemem
+   securemem,
+   crypto-api
   CC-Options: -Wall
   GHC-Options: -Wall -fno-warn-tabs
   Extensions: PackageImports
@@ -397,8 +398,7 @@ Executable git-annex
       Other-Modules: Utility.Touch.Old
 
   if flag(TestSuite)
-    Build-Depends: tasty (>= 0.7), tasty-hunit, tasty-quickcheck, tasty-rerun,
-     crypto-api
+    Build-Depends: tasty (>= 0.7), tasty-hunit, tasty-quickcheck, tasty-rerun
     CPP-Options: -DWITH_TESTSUITE
 
   if flag(S3)
@@ -461,7 +461,6 @@ Executable git-annex
      wai,
      wai-extra,
      blaze-builder,
-     crypto-api,
      clientsession,
      template-haskell,
      shakespeare (>= 2.0.0)

comment
diff --git a/doc/forum/Wanted_content_based_on_date_added/comment_1_af2a6e6cba4cdfe24e9ee2c819a007eb._comment b/doc/forum/Wanted_content_based_on_date_added/comment_1_af2a6e6cba4cdfe24e9ee2c819a007eb._comment
new file mode 100644
index 0000000..a10b909
--- /dev/null
+++ b/doc/forum/Wanted_content_based_on_date_added/comment_1_af2a6e6cba4cdfe24e9ee2c819a007eb._comment
@@ -0,0 +1,17 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-20T16:07:52Z"
+ content="""
+The assistant re-checks preferred content as rarely as it can get away with,
+since that can be an expensive process. Basically, it checks it when
+starting up, and when a remote is added or edited, and when it detects
+certian kinds of divergences between the local repository and a remote.
+
+I agree that it's not possible to express an expiry using a preferred
+content expression.
+
+What would work better is if you can move the old files to some other
+directory via a cron job or whatever means. Then it's easy to configure it
+not to want files in that directory.
+"""]]

comment
diff --git a/doc/bugs/Wrong_backend_extension_in_files_with_multiple_dots/comment_1_e7b8aca1e65affc993572003b0f1b532._comment b/doc/bugs/Wrong_backend_extension_in_files_with_multiple_dots/comment_1_e7b8aca1e65affc993572003b0f1b532._comment
new file mode 100644
index 0000000..a997f73
--- /dev/null
+++ b/doc/bugs/Wrong_backend_extension_in_files_with_multiple_dots/comment_1_e7b8aca1e65affc993572003b0f1b532._comment
@@ -0,0 +1,27 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-20T15:53:29Z"
+ content="""
+It is indeed to support things like `.tar.gz`, `.pdf.gz` etc.
+
+There's really no way to distinguish between what's desired to be part of
+the extension and not, other than heuristics. The heuristics for this are
+fairly narrow. Other than not allowing purely numeric parts in extenssions,
+or only taking the last extension, I don't see any change that could help
+with this case.
+
+Bear in mind that the only reason the extension is included at all is
+because some strange programs, especially on OSX, follow symlinks and look
+at the symlink of the link destination to try to guess what kind of file it
+is. There's no good reason for a program to do that, and if you're not
+using programs with that problem, you can just use the SHA256 backend and
+leave off the extensions.
+
+Bearing in mind that the extension is part of a big long ugly key name that
+you don't generally need to do anything with, including an extra short
+possibly not-really-extension part doesn't seem like a usability problem.
+The only real problem would be if you had two files with the same content,
+but different "extensions", since this would prevent them being
+deduplicated to the same key.
+"""]]

diff --git a/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature.mdwn b/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature.mdwn
new file mode 100644
index 0000000..79df9e0
--- /dev/null
+++ b/doc/bugs/Can__39__t_use_adjusted_branch_in_v6__44___if_submodule_already_is_using_this_feature.mdwn
@@ -0,0 +1,56 @@
+### Please describe the problem.
+If a v6 submodule is using an adjusted branch, `git annex adjust --unlock` fails in its superproject.
+
+### What steps will reproduce the problem?
+[[!format sh """
+#!/bin/bash
+
+set -ex
+d=$(mktemp -d)
+echo "directory: $d"
+cd $d
+git init
+git annex init --version=6
+echo whatever > file
+git annex add file
+git commit -m "file added"
+mkdir sub
+cd sub
+git init
+git annex init --version=6
+echo something > subfile
+git annex add subfile
+git commit -m "subfile added."
+cd ..
+git submodule add ./sub sub
+git commit -m "submodule added"
+cd sub
+git annex adjust --unlock
+cd ..
+git annex adjust --unlock
+
+"""]]
+### What version of git-annex are you using? On what operating system?
+[[!format sh """
+% git annex version
+git-annex version: 6.20170209+gitg16be7b5cc-1~ndall+1
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: unknown
+supported repository versions: 3 5 6
+upgrade supported from repository versions: 0 1 2 3 4 5
+operating system: linux x86_64
+"""]]
+
+### 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/bugs/git_annex_status_fails_with_submodule_in_direct_mode.mdwn b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode.mdwn
new file mode 100644
index 0000000..eafd22e
--- /dev/null
+++ b/doc/bugs/git_annex_status_fails_with_submodule_in_direct_mode.mdwn
@@ -0,0 +1,57 @@
+### Please describe the problem.
+If a submodule is in direct mode, `git annex status` fails.
+Apparently the recursive inspection of submodules is done by an internal call to `git status`, which then misses a working tree in the submodule.
+### What steps will reproduce the problem?
+[[!format sh """
+#!/bin/bash
+
+set -ex
+d=$(mktemp -d)
+echo "directory: $d"
+cd $d
+git init
+git annex init
+echo whatever > file
+git annex add file
+git commit -m "file added"
+mkdir sub
+cd sub
+git init
+git annex init
+echo something > subfile
+git annex add subfile
+git commit -m "subfile added."
+cd ..
+git submodule add ./sub sub
+git commit -m "submodule added"
+cd sub
+git annex direct
+cd ..
+git annex status
+"""]]
+### What version of git-annex are you using? On what operating system?
+[[!format sh """
+% git annex version
+git-annex version: 6.20170209+gitg16be7b5cc-1~ndall+1
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: unknown
+supported repository versions: 3 5 6
+upgrade supported from repository versions: 0 1 2 3 4 5
+operating system: linux x86_64
+"""]]
+
+### 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)
+
+Yes! I think it's a great piece of software!

Added a comment
diff --git a/doc/forum/git_annex_repairs_since_thursday/comment_2_b072ad2864e1caa7459d17d3426c8eee._comment b/doc/forum/git_annex_repairs_since_thursday/comment_2_b072ad2864e1caa7459d17d3426c8eee._comment
new file mode 100644
index 0000000..726227c
--- /dev/null
+++ b/doc/forum/git_annex_repairs_since_thursday/comment_2_b072ad2864e1caa7459d17d3426c8eee._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="openmedi"
+ avatar="http://cdn.libravatar.org/avatar/563ffaff3b492c579bd8f094472e4506"
+ subject="comment 2"
+ date="2017-02-19T22:03:26Z"
+ content="""
+I am now trying to just start again. I have initiated a completely new repo to which I'm now adding files from the old repo manually or rather I have already done so, set up two remotes (flash drive and external hdd) and have now a repo which hold at least those files which were unproblematic to move over.
+
+I try now to recover any lost files and at the same time try to get rid of the repo on my laptop. Therefore I initiated on my external drive for disk space reasons a cloned copy of my local repo to which I'm now `get`ing  everything via `git annex get -A`. After this is done, I'll move the missing files, if there are any, over to the new repo by hand and will drop all files on my laptop's repo (to make sure that the new external hdd repo includes everything) and then delete any and all repos and special remotes.
+
+A fresh start seems to be the best way to go, since the old repo just couldn't be repaired by the assistant or me for that matter - or so it seemed.
+"""]]

diff --git a/doc/bugs/S3_remote___8212___un-embedding_creds__63__.mdwn b/doc/bugs/S3_remote___8212___un-embedding_creds__63__.mdwn
new file mode 100644
index 0000000..d26cf3f
--- /dev/null
+++ b/doc/bugs/S3_remote___8212___un-embedding_creds__63__.mdwn
@@ -0,0 +1,34 @@
+### Please describe the problem.
+
+After once embedding credentials into a S3 remote, there’s no way to un-embed them.
+
+### What steps will reproduce the problem?
+
+1. Add a S3 remote with `embedcreds=yes`.
+1. Try to set `embedcreds=no`.
+1. `git annex sync` here, and in some other clone.
+1. Check `git annex info my-s3-remote` for the other clone. Credentials are still embedded.
+
+### What version of git-annex are you using? On what operating system?
+
+6.20170101 on NixOS 16.09 (stable).
+
+### Please provide any additional information below.
+
+[[!format sh """
+% g annex info test2 | grep '^creds'
+creds: embedded in git repository (gpg encrypted)
+
+% g annex enableremote test2 embedcreds=no
+enableremote test2 (encryption update) (to gpg keys: 134164FA6FAFE075) ok
+(recording state in git...)
+
+% g annex info test2 | grep '^creds'
+creds: embedded in git repository (gpg encrypted)
+
+%
+"""]]
+
+### 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, it’s awesome! Thank you!

diff --git a/doc/forum/Joey__44___when_would_you_guess_v6_to_be_ready__63__.mdwn b/doc/forum/Joey__44___when_would_you_guess_v6_to_be_ready__63__.mdwn
new file mode 100644
index 0000000..2c70e37
--- /dev/null
+++ b/doc/forum/Joey__44___when_would_you_guess_v6_to_be_ready__63__.mdwn
@@ -0,0 +1,3 @@
+A question for Joey: What's the expected schedule for v6 repos becoming solid enough to make them the default? Is it next on the priority list or are you still waiting for some git patches to propagate through or something like that?
+
+I'm asking because I make extensive use of v5 direct mode repos. They sometimes give me a bit of trouble in ways which I hope indirect, unlocked, thin v6 repos could fix. However, I don't want to switch to v6 as long as Joey considers it too experimental/unfinished to be made the default repo format. So I'm trying to decide whether I should put in the effort to investigate the issues I'm having (which are annoying but not catastrophic), or just wait until v6 is ready for prime time.

Added a comment
diff --git a/doc/forum/git_annex_repairs_since_thursday/comment_1_38b4563db47ce9bdc52eab5506de20f8._comment b/doc/forum/git_annex_repairs_since_thursday/comment_1_38b4563db47ce9bdc52eab5506de20f8._comment
new file mode 100644
index 0000000..89fa07c
--- /dev/null
+++ b/doc/forum/git_annex_repairs_since_thursday/comment_1_38b4563db47ce9bdc52eab5506de20f8._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="openmedi"
+ avatar="http://cdn.libravatar.org/avatar/563ffaff3b492c579bd8f094472e4506"
+ subject="comment 1"
+ date="2017-02-19T15:27:08Z"
+ content="""
+It's now Sunday and I stopped all three running git-annex processes on my system, after git used about 80% of my cpu, the daemon.log showing nothing and git annex info -F not responding.
+"""]]

diff --git a/doc/users/ben.mdwn b/doc/users/ben.mdwn
new file mode 100644
index 0000000..1e6295c
--- /dev/null
+++ b/doc/users/ben.mdwn
@@ -0,0 +1 @@
+No idea yet

diff --git a/doc/forum/git_annex_repairs_since_thursday.mdwn b/doc/forum/git_annex_repairs_since_thursday.mdwn
index e0ce951..c1763b1 100644
--- a/doc/forum/git_annex_repairs_since_thursday.mdwn
+++ b/doc/forum/git_annex_repairs_since_thursday.mdwn
@@ -1,4 +1,4 @@
-I have not tried to get git annex to work in a bit. My troubles of recovering this annex repo have been documented here, here and here. On Thurs day I thought I give it another try. Since Thursday it tries to repair two out of three repos: my local repo on my laptop and my repo on an external harddrive I have. The b2 special remote repo appears to be fine, or not checked, I'm not sure.
+I have not tried to get git annex to work in a bit. My troubles of recovering this annex repo have been documented [here](http://git-annex.branchable.com/forum/git_annex_wants_to_repair_every_time_it__39__s_running/), [here](http://git-annex.branchable.com/forum/how_to_disaster_recovery/) and [here](http://git-annex.branchable.com/forum/__34__git_annex_assistant_--stop__34___doesn__39__t_work_in_OSX_10.11.4/). On Thurs day I thought I give it another try. Since Thursday it tries to repair two out of three repos: my local repo on my laptop and my repo on an external harddrive I have. The b2 special remote repo appears to be fine, or not checked, I'm not sure.
 
 What can I do, to get it working again?
 

diff --git a/doc/forum/git_annex_repairs_since_thursday.mdwn b/doc/forum/git_annex_repairs_since_thursday.mdwn
new file mode 100644
index 0000000..e0ce951
--- /dev/null
+++ b/doc/forum/git_annex_repairs_since_thursday.mdwn
@@ -0,0 +1,5 @@
+I have not tried to get git annex to work in a bit. My troubles of recovering this annex repo have been documented here, here and here. On Thurs day I thought I give it another try. Since Thursday it tries to repair two out of three repos: my local repo on my laptop and my repo on an external harddrive I have. The b2 special remote repo appears to be fine, or not checked, I'm not sure.
+
+What can I do, to get it working again?
+
+P.S.: In my mind this setup should work like this: I want to move contents from my laptop to the external hdd and to b2 so that there are two copies at all times. I want to use git annex so that I don't need to carry all that stuff around with me anymore, because space on my ssd is sparse.

linkify
diff --git a/doc/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it.mdwn b/doc/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it.mdwn
index 1834e31..821c679 100644
--- a/doc/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it.mdwn
+++ b/doc/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it.mdwn
@@ -17,7 +17,8 @@ normally you'll want to avoid manually changing the remote's working tree,
 and only push changes into it in this configuration.
 
 When the remote is using [[direct_mode]] or
-[[adjusted_branches|git-annex-adjust]], you need the git-annex post-receive
+[[adjusted_branches|git-annex-adjust]], you need the 
+[[git-annex post-receive|git-annex-post-receive]]
 hook to be set up for pushes to update the remote's working tree.
 This is a new feature in git-annex 6.20170217. If the remote was
 initialized with an older version of git-annex, you will need to re-run

devblog
diff --git a/doc/devblog/day_448__git_push_to_update_remote.mdwn b/doc/devblog/day_448__git_push_to_update_remote.mdwn
new file mode 100644
index 0000000..edcccc2
--- /dev/null
+++ b/doc/devblog/day_448__git_push_to_update_remote.mdwn
@@ -0,0 +1,24 @@
+Today was all about writing
+[[tips/making_a_remote_repo_update_when_changes_are_pushed_to_it]].
+
+That's a fairly simple page, because I added workarounds for all the
+complexity of making it work in direct mode repos, adjusted branches, and
+repos on filesystems not supporting executable git hooks. Basically,
+the user should be able to set the standard
+receive.denyCurrentBranch=updateInstead configuration on a remote, and 
+then `git push` or `git annex sync` should update that remote's working tree.
+
+There are a couple of unhandled cases; `git push` to a remote on a
+filesystem like FAT won't update it, and `git annex sync` will only update
+it if it's local, not accessed over ssh. Also, the emulation of git's
+updateInstead behavior is not perfect for direct mode repos and adjusted
+branches.
+
+Still, it's good enough that most users should find it meets
+their needs, I hope. How to set this kind of thing up is a fairly common
+FAQ, and this makes it much simpler.
+
+(Oh yeah, the first ancient kernel arm build is *still*
+running. May finish before tomorrow.)
+
+Today's work was sponsored by Jake Vosloo on Patreon.

documentation updates for new receive.denyCurrentBranch=updateInstead support
This commit was sponsored by andrea rota.
diff --git a/doc/forum/Can__39__t_get_git-annex_merge_to_work_from_git_hook/comment_4_cfa52c727baaf683e91c3fbb1c78072c._comment b/doc/forum/Can__39__t_get_git-annex_merge_to_work_from_git_hook/comment_4_cfa52c727baaf683e91c3fbb1c78072c._comment
new file mode 100644
index 0000000..1890eab
--- /dev/null
+++ b/doc/forum/Can__39__t_get_git-annex_merge_to_work_from_git_hook/comment_4_cfa52c727baaf683e91c3fbb1c78072c._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2017-02-17T19:34:55Z"
+ content="""
+An easier way to set this up is available now, see 
+<https://git-annex.branchable.com/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it/>
+"""]]
diff --git a/doc/forum/USB_backup_with_files_visible/comment_1_2832f8ae24dfb0f101e06f7c18283028._comment b/doc/forum/USB_backup_with_files_visible/comment_1_2832f8ae24dfb0f101e06f7c18283028._comment
index c08a0c6..d70d859 100644
--- a/doc/forum/USB_backup_with_files_visible/comment_1_2832f8ae24dfb0f101e06f7c18283028._comment
+++ b/doc/forum/USB_backup_with_files_visible/comment_1_2832f8ae24dfb0f101e06f7c18283028._comment
@@ -7,4 +7,8 @@
 This is not something the assistant really handles yet. The issue is that if you have a non-bare repository on the USB drive, something has to run `git annex sync` in it when changes are pushed to it, to update it to display the files that are in the repository.
 
 One way to do this is to set up a non-bare repository by hand and add a git post-receive hook that runs `git annex sync`
+
+Update: Another way, recently added is
+<https://git-annex.branchable.com/making_a_remote_repo_update_when_changes_are_pushed_to_it/>
+This new approach even supports FAT filesystems!
 """]]
diff --git a/doc/forum/non-bare_repo_on_cloud_remote/comment_1_da0c023af7c78f1ef1cfe1143a900a9f._comment b/doc/forum/non-bare_repo_on_cloud_remote/comment_1_da0c023af7c78f1ef1cfe1143a900a9f._comment
index 17476db..27e908c 100644
--- a/doc/forum/non-bare_repo_on_cloud_remote/comment_1_da0c023af7c78f1ef1cfe1143a900a9f._comment
+++ b/doc/forum/non-bare_repo_on_cloud_remote/comment_1_da0c023af7c78f1ef1cfe1143a900a9f._comment
@@ -6,5 +6,7 @@
  content="""
 Sure you can.. That's how <http://downloads.kitenet.net/> works, which is where people download git-annex builds from!
 
+[[tips/making_a_remote_repo_update_when_changes_are_pushed_to_it]]
+
 [[tips/setup_a_public_repository_on_a_web_site]]
 """]]
diff --git a/doc/forum/usability__58___creating_an_archive_on_a_new_external_drive/comment_4_42beace277e009ddff449cb220775d44._comment b/doc/forum/usability__58___creating_an_archive_on_a_new_external_drive/comment_4_42beace277e009ddff449cb220775d44._comment
new file mode 100644
index 0000000..816a81d
--- /dev/null
+++ b/doc/forum/usability__58___creating_an_archive_on_a_new_external_drive/comment_4_42beace277e009ddff449cb220775d44._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2017-02-17T19:38:45Z"
+ content="""
+It's now pretty easy to set up a remote on a USB drive so that `git annex
+sync` will update the work tree. See 
+<https://git-annex.branchable.com/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it/>
+
+However, the assistant does not do this by default when adding repos on USB
+drives, due to the likely confusion that setting up such a repo would
+cause, as described in my previous comment.
+"""]]
diff --git a/doc/git-annex-merge.mdwn b/doc/git-annex-merge.mdwn
index a86886e..3001e9b 100644
--- a/doc/git-annex-merge.mdwn
+++ b/doc/git-annex-merge.mdwn
@@ -12,10 +12,6 @@ This performs the same merging (and merge conflict resolution)
 that is done by the sync command, but without pushing or pulling any
 data.
 
-One way to use this is to put `git annex merge` into a repository's
-post-receive hook. Then any syncs to the repository will update its
-working copy automatically.
-
 # SEE ALSO
 
 [[git-annex]](1)
diff --git a/doc/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it.mdwn b/doc/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it.mdwn
new file mode 100644
index 0000000..1834e31
--- /dev/null
+++ b/doc/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it.mdwn
@@ -0,0 +1,24 @@
+Normally, pushing a change into a remote git repository does not update its
+working tree. But it can be very convenient to only need to `git push`
+(or `git annex sync --content`) to a remote to update the files checked out
+there.
+
+Git has a way to let you do this, by setting `receive.denyCurrentBranch`
+to `updateInstead` in the remote repository. For example:
+
+	ssh remote
+	cd /path/to/repo
+	git config receive.denyCurrentBranch updateInstead
+
+Now after a push to the remote, its working tree will be updated.
+
+Changes in the remote's working tree can prevent this update from working;
+normally you'll want to avoid manually changing the remote's working tree,
+and only push changes into it in this configuration.
+
+When the remote is using [[direct_mode]] or
+[[adjusted_branches|git-annex-adjust]], you need the git-annex post-receive
+hook to be set up for pushes to update the remote's working tree.
+This is a new feature in git-annex 6.20170217. If the remote was
+initialized with an older version of git-annex, you will need to re-run
+`git annex init` in the remote after upgrading git-annex.
diff --git a/doc/tips/setup_a_public_repository_on_a_web_site.mdwn b/doc/tips/setup_a_public_repository_on_a_web_site.mdwn
index 3b971e0..ce6230f 100644
--- a/doc/tips/setup_a_public_repository_on_a_web_site.mdwn
+++ b/doc/tips/setup_a_public_repository_on_a_web_site.mdwn
@@ -12,44 +12,19 @@ Here's how I set it up. --[[Joey]]
 3. `git init; git annex init`
 4. `git config core.sharedrepository world` (Makes sure files
    are always added with permissions that allow everyone to read them.)
-5. We want users to be able to clone the git repository over http, because
+5. `git config receive.denyCurrentBranch updateInstead` (Makes the
+   [[working tree update when changes are pushed to it|making_a_remote_repo_update_when_changes_are_pushed_to_it]].)
+6. We want users to be able to clone the git repository over http, because
    git-annex can download files from it over http as well. For this to
    work, `git update-server-info` needs to get run after commits. The
    git `post-update` hook will take care of this, you just need to enable
    the hook. `chmod +x .git/hooks/post-update`
-6. `git annex add; git commit -m added`
-7. Make sure users can still download files from the site directly.
-8. Instruct advanced users to clone a http url that ends with the "/.git/"
+7. `git annex add; git commit -m added`
+8. Make sure users can still download files from the site directly.
+9. Instruct advanced users to clone a http url that ends with the "/.git/"
    directory. For example, for downloads.kitenet.net, the clone url
    is `https://downloads.kitenet.net/.git/`
-9. Set up a git `post-receive` hook to update the repository's working tree
-   when changes are pushed to it. See below for details.
 
 When users clone over http, and run git-annex, it will
 automatically learn all about your repository and be able to download files
 right out of it, also using http. 
-
-## post-receive hook
-
-If you have git-annex 4.20130703, the post-receive hook mentioned above
-in step 9 just needs to run `git annex merge`.
-
-With older versions of git-annex, you can instead use `git annex sync`.
-
-There are two gotchas with some versions of git to be aware of when writing
-this post-receive hook.
-
-1. The hook may be run with the current directory set to the `.git`
-   directory, and not the top of your work tree. So you need to `cd ..` or
-   similar in the hook.
-2. `GIT_DIR` may be set to `.`, which will not be right after changing
-   directory. So you will probably want to unset it.
-
-Here's a post-receive hook that takes these problems into account:
-
-<pre>
-#!/bin/sh
-unset GIT_DIR
-cd ..
-git annex merge
-</pre>
diff --git a/doc/tips/setup_a_public_repository_on_a_web_site/comment_5_55c80fd138dfc8052d2deac39b50a7ce._comment b/doc/tips/setup_a_public_repository_on_a_web_site/comment_5_55c80fd138dfc8052d2deac39b50a7ce._comment
deleted file mode 100644
index 5fdcf7d..0000000
--- a/doc/tips/setup_a_public_repository_on_a_web_site/comment_5_55c80fd138dfc8052d2deac39b50a7ce._comment
+++ /dev/null
@@ -1,10 +0,0 @@
-[[!comment format=mdwn
- username="wsha.code+ga@b38779424f41c5701bbe5937340be43ff1474b2d"
- nickname="wsha.code+ga"
- subject="post-receive hook"
- date="2015-10-09T17:41:51Z"
- content="""
-The post is pretty clear but I misinterpreted at first and got stuck for a while, so just in case this helps anyone else:
-
-The issues about the `post-receive` hook running in the `.git` directory and `GIT_DIR` being set to `.` are distinct issues and you might need to fix both them. At first, I thought they were the same thing and just doing `cd ..` would be enough to fix things, but it is not.
-"""]]
diff --git a/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn b/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
index 4f1ffba..d3ce8ca 100644
--- a/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
+++ b/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
@@ -71,3 +71,5 @@ Keeping this a command-line setup, and not something the assistant does,
 will avoid that confusion.
 
 --[[Joey]]
+
+> all above [[done]] --[[Joey]]

post-recive hook to make updateInstead work in direct mode and adjusted branches
* Added post-recieve hook, which makes updateInstead work with direct
mode and adjusted branches.
* init: Set up the post-receive hook.
This commit was sponsored by Fernando Jimenez on Patreon.
diff --git a/Annex/Hook.hs b/Annex/Hook.hs
index a073c25..b539145 100644
--- a/Annex/Hook.hs
+++ b/Annex/Hook.hs
@@ -4,7 +4,7 @@
  - not change, otherwise removing old hooks using an old version of
  - the script would fail.
  -
- - Copyright 2013-2014 Joey Hess <id@joeyh.name>
+ - Copyright 2013-2017 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
@@ -22,6 +22,9 @@ import qualified Data.Map as M
 preCommitHook :: Git.Hook
 preCommitHook = Git.Hook "pre-commit" (mkHookScript "git annex pre-commit .")
 
+postReceiveHook :: Git.Hook
+postReceiveHook = Git.Hook "post-receive" (mkHookScript "git annex post-receive")
+
 preCommitAnnexHook :: Git.Hook
 preCommitAnnexHook = Git.Hook "pre-commit-annex" ""
 
diff --git a/Annex/Init.hs b/Annex/Init.hs
index 74274ad..3427c00 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -83,8 +83,9 @@ initialize' mversion = do
 	checkLockSupport
 	checkFifoSupport
 	checkCrippledFileSystem
-	unlessM isBareRepo $
+	unlessM isBareRepo $ do
 		hookWrite preCommitHook
+		hookWrite postReceiveHook
 	setDifferences
 	unlessM (isJust <$> getVersion) $
 		setVersion (fromMaybe defaultVersion mversion)
@@ -114,6 +115,7 @@ initialize' mversion = do
 uninitialize :: Annex ()
 uninitialize = do
 	hookUnWrite preCommitHook
+	hookUnWrite postReceiveHook
 	removeRepoUUID
 	removeVersion
 
diff --git a/Annex/Perms.hs b/Annex/Perms.hs
index 80eb71f..1ce3429 100644
--- a/Annex/Perms.hs
+++ b/Annex/Perms.hs
@@ -24,7 +24,7 @@ module Annex.Perms (
 
 import Annex.Common
 import Utility.FileMode
-import Git.SharedRepository
+import Git.ConfigTypes
 import qualified Annex
 import Config
 
diff --git a/CHANGELOG b/CHANGELOG
index f5c0f3c..8710187 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,9 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
   * sync: Improve integration with receive.denyCurrentBranch=updateInstead,
     displaying error messages from the remote then it fails to update
     its checked out branch.
+  * Added post-recieve hook, which makes updateInstead work with direct
+    mode and adjusted branches.
+  * init: Set up the post-receive hook.
   * config group groupwanted numcopies schedule wanted required: 
     Avoid displaying extraneous messages about repository auto-init,
     git-annex branch merging, etc, when being used to get information.
diff --git a/CmdLine/GitAnnex.hs b/CmdLine/GitAnnex.hs
index 99cf564..0e47200 100644
--- a/CmdLine/GitAnnex.hs
+++ b/CmdLine/GitAnnex.hs
@@ -61,6 +61,7 @@ import qualified Command.AddUnused
 import qualified Command.Unlock
 import qualified Command.Lock
 import qualified Command.PreCommit
+import qualified Command.PostReceive
 import qualified Command.Find
 import qualified Command.FindRef
 import qualified Command.Whereis
@@ -148,6 +149,7 @@ cmds testoptparser testrunner =
 	, Command.Uninit.cmd
 	, Command.Reinit.cmd
 	, Command.PreCommit.cmd
+	, Command.PostReceive.cmd
 	, Command.NumCopies.cmd
 	, Command.Trust.cmd
 	, Command.Untrust.cmd
diff --git a/Command/Merge.hs b/Command/Merge.hs
index 4f19139..80a8227 100644
--- a/Command/Merge.hs
+++ b/Command/Merge.hs
@@ -17,9 +17,9 @@ cmd = command "merge" SectionMaintenance
 	paramNothing (withParams seek)
 
 seek :: CmdParams -> CommandSeek
-seek ps = do
-	withNothing mergeBranch ps
-	withNothing mergeSynced ps
+seek _ = do
+	commandAction mergeBranch
+	commandAction mergeSynced
 
 mergeBranch :: CommandStart
 mergeBranch = do
diff --git a/Command/PostReceive.hs b/Command/PostReceive.hs
new file mode 100644
index 0000000..2110333
--- /dev/null
+++ b/Command/PostReceive.hs
@@ -0,0 +1,61 @@
+{- git-annex command
+ -
+ - Copyright 2017 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+{-# LANGUAGE CPP #-}
+
+module Command.PostReceive where
+
+import Command
+import qualified Annex
+import Config
+import Annex.Version
+import Annex.AdjustedBranch
+import Git.Branch
+import Git.Types
+import Git.ConfigTypes
+import qualified Command.Merge
+
+cmd :: Command
+cmd = command "post-receive" SectionPlumbing
+	"run by git post-receive hook"
+	paramNothing
+	(withParams seek)
+
+seek :: CmdParams -> CommandSeek
+seek _ = whenM needUpdateInsteadEmulation $ do
+	fixPostReceiveHookEnv
+	updateInsteadEmulation
+
+{- When run by the post-receive hook, the cwd is the .git directory, 
+ - and GIT_DIR=. It's not clear why git does this.
+ -
+ - Fix up from that unusual situation, so that git commands
+ - won't try to treat .git as the work tree. -}
+fixPostReceiveHookEnv :: Annex ()
+fixPostReceiveHookEnv = do
+	g <- Annex.gitRepo
+	case location g of
+		Local { gitdir = ".", worktree = Just "." } ->
+			Annex.adjustGitRepo $ \g' -> pure $ g'
+				{ location = (location g')
+					{ worktree = Just ".." }
+				}
+		_ -> noop
+
+{- receive.denyCurrentBranch=updateInstead does not work in direct mode
+ - repositories or when an adjusted branch is checked out, so must be
+ - emulated. -}
+needUpdateInsteadEmulation :: Annex Bool
+needUpdateInsteadEmulation = updateinsteadset <&&> (isDirect <||> isadjusted)
+  where
+	updateinsteadset = (== UpdateInstead) . receiveDenyCurrentBranch
+		<$> Annex.getGitConfig
+	isadjusted = versionSupportsUnlockedPointers
+		<&&> (maybe False (isJust . getAdjustment) <$> inRepo Git.Branch.current)
+
+updateInsteadEmulation :: Annex ()
+updateInsteadEmulation = commandAction Command.Merge.mergeSynced
diff --git a/Git/ConfigTypes.hs b/Git/ConfigTypes.hs
new file mode 100644
index 0000000..af3dc97
--- /dev/null
+++ b/Git/ConfigTypes.hs
@@ -0,0 +1,40 @@
+{- git config types
+ -
+ - Copyright 2012, 2017 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Git.ConfigTypes where
+
+import Data.Char
+
+import Common
+import Git
+import qualified Git.Config
+
+data SharedRepository = UnShared | GroupShared | AllShared | UmaskShared Int
+	deriving (Eq)

(Diff truncated)
thoughts
diff --git a/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn b/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
index 8d25f44..4f1ffba 100644
--- a/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
+++ b/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
@@ -40,6 +40,19 @@ adjusted branches? Could install a post-update hook, that runs a git-annex
 command that checks for updateInstead, and emulates its behavior, handling
 direct mode and adjusted branches.
 
+To support direct mode repos on removable drives w/o execute bits,
+could make sync check local remotes and run the equivilant action as the
+hook would run.
+
+To fully emulate updateInstead, the post-update hook 
+should abort if the tree is unclean or if there are merge conflicts.
+But, in a direct mode repo, the only way the user will likely resolve such
+a situation is git-annex sync/merge, so the hook could just run git-annex
+merge instead of trying to fully emulate regular updateInstead behavior.
+Similarly, in an adjusted branch, the push will update master, and git
+annex sync/merge is what the user will likely do. Although they could
+choose to reset changes to the tree.
+
 ---
 
 Potential least surprise violation:

comment
diff --git a/doc/forum/dangling_blobs/comment_1_120681851a595909e19afcc0334383ec._comment b/doc/forum/dangling_blobs/comment_1_120681851a595909e19afcc0334383ec._comment
new file mode 100644
index 0000000..df086c0
--- /dev/null
+++ b/doc/forum/dangling_blobs/comment_1_120681851a595909e19afcc0334383ec._comment
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-17T16:33:02Z"
+ content="""
+This message from git fsck does not indicate any kind of serious problem
+with the repository.
+
+A dangling blob can be added to a git repository when something gets
+staged but is then never included in a commit. For example, with the
+assistant, if a file is created, and then modified soon after, the
+original version would get staged, but before it was committed, the
+new version staged and included in the commit. 
+
+There are several other scenarios, involving the assistant and not, where
+that could happen.
+
+So, git is telling you that the git repository contains
+information that's not being used. Unless you are low on disk
+space this probably doesn't matter, and git will automatically
+clean up dangling blobs after a while (or see `git gc`).
+"""]]

initial whining
diff --git a/doc/bugs/mysterious_dependency_of_git_annex_status_output_of_the_added_file.mdwn b/doc/bugs/mysterious_dependency_of_git_annex_status_output_of_the_added_file.mdwn
new file mode 100644
index 0000000..fbdf80e
--- /dev/null
+++ b/doc/bugs/mysterious_dependency_of_git_annex_status_output_of_the_added_file.mdwn
@@ -0,0 +1,81 @@
+### Please describe the problem.
+
+in v6 mode -- Result depends on having a good sleep before running 'git annex add'.
+
+Without sleep, git annex manages first to stage file to be committed into git, but then also modifies it to be added into annex  (this is not shown above -- just inspect that repository obtained without having any sleep)
+
+I guess relates to http://git-annex.branchable.com/bugs/Too_difficult_if_not_impossible_to_explicitly_add__47__keep_file_under_git___40__not_annex__41___in_v6_without_employing_.gitattributes/
+
+### What steps will reproduce the problem?
+
+Run http://www.onerussian.com/tmp/ga-3.sh  twice:  once giving 0 secs to sleep, and then 1 (or about 0.3 might work as well)
+
+
+### What version of git-annex are you using? On what operating system?
+
+6.20170209+gitg16be7b5cc-1~ndall+1
+
+### Please provide any additional information below.
+
+if we just proceed with the script (init, add, status) without any delays -- git annex status would report it 
+[[!format sh """
+$> ./ga-3.sh 0
++ s=0
+++ mktemp -d
++ d=/home/yoh/.tmp/tmp.d6g0E7scxt
++ echo 'directory: /home/yoh/.tmp/tmp.d6g0E7scxt'
+directory: /home/yoh/.tmp/tmp.d6g0E7scxt
++ cd /home/yoh/.tmp/tmp.d6g0E7scxt
++ git init
+Initialized empty Git repository in /tmp/tmp.d6g0E7scxt/.git/
++ git annex init --version=6
+init  ok
+(recording state in git...)
++ sed -i -e 's,pre-commit ,pre-commit --debug ,g' .git/hooks/pre-commit
++ echo 'I: creating a file'
+I: creating a file
++ echo whatever
++ sleep 0
++ git -c annex.largefiles=nothing annex --debug add file5
+[2017-02-17 10:19:48.91932971] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","ls-files","--others","--exclude-standard","-z","--","file5"]
+add file5 (non-large file; adding content to git repository) ok
+[2017-02-17 10:19:48.923428344] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","ls-files","--modified","-z","--","file5"]
+(recording state in git...)
+[2017-02-17 10:19:48.927922289] feed: xargs ["-0","git","--git-dir=.git","--work-tree=.","--literal-pathspecs","add","--"]
+[2017-02-17 10:19:48.956812867] process done ExitSuccess
++ git annex status
+M file5
+"""]]
+
+And if we wait just a bit before running add -- we would get it reported added
+[[!format sh """
+hopa:~/.tmp
+$> ./ga-3.sh 1
++ s=1
+++ mktemp -d
++ d=/home/yoh/.tmp/tmp.4I7ym6dSx2
++ echo 'directory: /home/yoh/.tmp/tmp.4I7ym6dSx2'
+directory: /home/yoh/.tmp/tmp.4I7ym6dSx2
++ cd /home/yoh/.tmp/tmp.4I7ym6dSx2
++ git init
+Initialized empty Git repository in /tmp/tmp.4I7ym6dSx2/.git/
++ git annex init --version=6
+init  ok
+(recording state in git...)
++ sed -i -e 's,pre-commit ,pre-commit --debug ,g' .git/hooks/pre-commit
++ echo 'I: creating a file'
+I: creating a file
++ echo whatever
++ sleep 1
++ git -c annex.largefiles=nothing annex --debug add file5
+[2017-02-17 10:19:52.529445464] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","ls-files","--others","--exclude-standard","-z","--","file5"]
+add file5 (non-large file; adding content to git repository) ok
+[2017-02-17 10:19:52.533532166] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","ls-files","--modified","-z","--","file5"]
+(recording state in git...)
+[2017-02-17 10:19:52.537789158] feed: xargs ["-0","git","--git-dir=.git","--work-tree=.","--literal-pathspecs","add","--"]
+[2017-02-17 10:19:52.567222419] process done ExitSuccess
++ git annex status
+A file5
+"""]]
+
+[[!meta author=yoh]]

Added a comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_7_63b3ec113d52501237abbe6ee1ef5fa5._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_7_63b3ec113d52501237abbe6ee1ef5fa5._comment
new file mode 100644
index 0000000..9206ba3
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_7_63b3ec113d52501237abbe6ee1ef5fa5._comment
@@ -0,0 +1,45 @@
+[[!comment format=mdwn
+ username="lasitus"
+ avatar="http://cdn.libravatar.org/avatar/dfe778f28027aeb75876172022aa5de3"
+ subject="comment 7"
+ date="2017-02-17T03:23:46Z"
+ content="""
+Ok, I have a script that generates the error. This generates a repository and 30 GB of random binary files with many folders 2 layers deep. Just put in an empty folder and run with python. No remotes are necessary. This was run in Windows 10 in a git bash window.
+
+```
+#!/usr/bin/env python
+
+import logging
+import os
+import shutil
+import subprocess
+import uuid
+
+logging.basicConfig(level=logging.DEBUG)
+
+repositoryPath = os.path.abspath(\"./bigRepoTest\")	
+os.makedirs(repositoryPath)
+
+subprocess.call(\"git init\", cwd=repositoryPath)
+subprocess.call(\"git annex init pc\", cwd=repositoryPath)
+
+def makeRandomDirectories(level1FolderCount, level2FolderCount, fileCount):
+	for directoryIndex in range(0, level1FolderCount):
+		logging.info(\"Adding top level folder \" + str(directoryIndex + 1) + \" of \" + str(level1FolderCount))
+		newDirectory = os.path.join(repositoryPath, str(uuid.uuid1()))
+		os.makedirs(newDirectory)
+		for directoryIndex in range(0, level2FolderCount):
+			newNestedDirectory = os.path.join(newDirectory, str(uuid.uuid1()))
+			os.makedirs(newNestedDirectory)
+			for fileIndex in range(0, fileCount):
+				newFile = os.path.join(newNestedDirectory, str(uuid.uuid1()) + \".bin\")
+				with open(newFile, 'wb') as fileOut:
+					fileOut.write(os.urandom(500000))
+
+makeRandomDirectories(32, 1000, 1)
+with open(os.path.join(repositoryPath, \"assistant.log\"), 'w') as output:
+	subprocess.Popen([\"git\", \"annex\", \"assistant\", \"--debug\"], cwd=repositoryPath, stdout=output, stderr=output)
+	makeRandomDirectories(32, 1000, 1)
+	subprocess.call(\"tail -f daemon.log\", cwd=os.path.join(repositoryPath, \".git\", \"annex\"))
+```
+"""]]

diff --git a/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json.mdwn b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json.mdwn
new file mode 100644
index 0000000..b9283ae
--- /dev/null
+++ b/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json.mdwn
@@ -0,0 +1,20 @@
+ATM I am experiencing sporadic failures of the batched  git annex addurl call -- seems to report failure (success: False) once in a while, but succeeds on a retry:
+
+[[!format sh """
+(Pdb) p url
+'http://openneuro.s3.amazonaws.com/ds000001/ds000001_R1.1.0/uncompressed/sub016/BOLD/task001_run003/QA/QA_report.pdf?versionId=null'
+
+(Pdb) p out_json
+{u'note': u'from datalad', u'command': u'addurl', u'file': u'ds000001_R1.1.0/uncompressed/sub016/BOLD/task001_run003/QA/QA_report.pdf', u'success': False}
+
+(Pdb) up
+> /home/yoh/proj/datalad/datalad/datalad/support/gitrepo.py(210)newfunc()
+-> return func(self, file_new, *args, **kwargs)
+
+(Pdb) func(self, file_new, *args, **kwargs)
+{u'note': u'from datalad', u'file': u'ds000001_R1.1.0/uncompressed/sub016/BOLD/task001_run003/QA/QA_report.pdf', u'command': u'addurl', u'key': u'MD5E-s1191419--cb4efab8104b5117f64b58ee6d6a79ba.pdf', u'success': True}
+"""]]
+
+besides me blindly trying to re-run it e.g. 3 times and only then declare total failure, I wondered if json output could provide more information (if any known) about the failure... e.g. if a custom remote crashed/errorred (I guess the case here due to "from datalad") -- what was stderr/exit code for that process if crashed/ERROR msg... if wget -- what was stderr there
+
+[[!meta name=yoh]]

diff --git a/doc/forum/dangling_blobs.mdwn b/doc/forum/dangling_blobs.mdwn
new file mode 100644
index 0000000..dc3cfbd
--- /dev/null
+++ b/doc/forum/dangling_blobs.mdwn
@@ -0,0 +1,27 @@
+Revisiting an issue I reported a couple of months ago but never figured out. I am trying to use git annex assistant on two separate machines to automatically mirror files between them. But after I start the second assistant and add new files to the annex, I find that git fsck reports dangling blobs. Is there a conflict between the two assistants?
+
+On the server:
+
+    $ mkdir ~/annex
+    $ cd ~/annex
+    $ git init
+    $ git annex init u --version=6
+    $ echo This is test file 1. >testfile1.txt
+    $ git annex add testfile1.txt
+    $ git annex sync
+    $ git remote add ml2 ssh://laptop/Users/username/annex
+    $ git annex assistant
+
+After all that, I do this on the laptop:
+
+    $ cd ~/
+    $ git clone ssh://server/home/username/annex
+    $ cd annex
+    $ git annex init ml2 --version=6
+    $ git annex sync
+    $ git annex assistant
+
+At this point git fsck is happy. But when I add files to the annex on either machine and run git fsck, I get messages like:
+
+    Checking object directories: 100% (256/256), done.
+    dangling blob 31a30177d1e37faf8eac96524302a61713d3d522

cleanup
diff --git a/doc/bugs/git_add_not_annexing_file_in_v6_repo/comment_1_8b7b638f7312ff4bfc46179b97ec300d._comment b/doc/bugs/git_add_not_annexing_file_in_v6_repo/comment_1_8b7b638f7312ff4bfc46179b97ec300d._comment
deleted file mode 100644
index a80fbdd..0000000
--- a/doc/bugs/git_add_not_annexing_file_in_v6_repo/comment_1_8b7b638f7312ff4bfc46179b97ec300d._comment
+++ /dev/null
@@ -1,8 +0,0 @@
-[[!comment format=mdwn
- username="JohnKozak"
- avatar="http://cdn.libravatar.org/avatar/23489adfe85e3e389a8ef9e9d83d4d60"
- subject="comment 1"
- date="2017-02-16T18:44:36Z"
- content="""
-Yes, it is me!  The files are being annexed, they're just unlocked.  Mea culpa.  Apologies!
-"""]]

removed
diff --git a/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn b/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn
deleted file mode 100644
index 511b1df..0000000
--- a/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn
+++ /dev/null
@@ -1,86 +0,0 @@
-### Please describe the problem.
-
-`git add` doesn't put files inrto the annex.  I suspect this is me, but I've checked it a few times now, and I'm pretty sure this worked last year.
-
-### What steps will reproduce the problem?
-
-Create v6 repo, create gitattributes to make anything a largefile, create file, `git add` it
-
-### What version of git-annex are you using? On what operating system?
-
-Tried current neurodebian and stretch
-
-### 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
-
-renn:/tmp$ mkdir test
-renn:/tmp$ cd test
-renn:/tmp/test$ git init
-Initialized empty Git repository in /tmp/test/.git/
-renn:/tmp/test$ git annex init --version=6
-init  ok
-(recording state in git...)
-renn:/tmp/test$ git annex version
-git-annex version: 6.20170101
-build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify ConcurrentOutput TorrentParser MagicMime Feeds Quvi
-key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
-remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
-local repository version: 6
-supported repository versions: 3 5 6
-upgrade supported from repository versions: 0 1 2 3 4 5
-operating system: linux x86_64
-renn:/tmp/test$ git annex info
-repository mode: indirect
-trusted repositories: 0
-semitrusted repositories: 3
-        00000000-0000-0000-0000-000000000001 -- web
-        00000000-0000-0000-0000-000000000002 -- bittorrent
-        cccf82b9-37ff-4bec-9996-f78bd101a033 -- jk@renn:/tmp/test [here]
-untrusted repositories: 0
-transfers in progress: none
-available local disk space: 340.69 gigabytes (+1 megabyte reserved)
-local annex keys: 0
-local annex size: 0 bytes
-annexed files in working tree: 0
-size of annexed files in working tree: 0 bytes
-bloom filter size: 32 mebibytes (0% full)
-backend usage: 
-renn:/tmp/test$ echo '* annex.largefiles=anything' > .gitattributes
-renn:/tmp/test$ git add .
-renn:/tmp/test$ git commit -m init
-[master (root-commit) ee0af94] init
- 1 file changed, 1 insertion(+)
- create mode 100644 .gitattributes
-renn:/tmp/test$ echo xxx>xxx
-renn:/tmp/test$ git add .
-renn:/tmp/test$ ls -l
-total 4
--rw-rw-r-- 1 jk users 4 Feb 16 13:48 xxx
-renn:/tmp/test$ git commit -m test
-(recording state in git...)
-[master 96bc23c] test
- 1 file changed, 1 insertion(+)
- create mode 100644 xxx
-renn:/tmp/test$ ls -la
-total 56
-drwxrwxr-x  3 jk   users  4096 Feb 16 13:48 .
-drwxrwxrwt 52 root root  36864 Feb 16 13:46 ..
-drwxrwxr-x  9 jk   users  4096 Feb 16 13:48 .git
--rw-rw-r--  1 jk   users    28 Feb 16 13:47 .gitattributes
--rw-rw-r--  1 jk   users     4 Feb 16 13:48 xxx
-
-renn:/tmp/test$ git check-attr --all xxx
-xxx: annex.largefiles: anything
-xxx: filter: annex
-
-
-# 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, like it a lot.  Many thanks.
-

Added a comment
diff --git a/doc/bugs/git_add_not_annexing_file_in_v6_repo/comment_1_8b7b638f7312ff4bfc46179b97ec300d._comment b/doc/bugs/git_add_not_annexing_file_in_v6_repo/comment_1_8b7b638f7312ff4bfc46179b97ec300d._comment
new file mode 100644
index 0000000..a80fbdd
--- /dev/null
+++ b/doc/bugs/git_add_not_annexing_file_in_v6_repo/comment_1_8b7b638f7312ff4bfc46179b97ec300d._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="JohnKozak"
+ avatar="http://cdn.libravatar.org/avatar/23489adfe85e3e389a8ef9e9d83d4d60"
+ subject="comment 1"
+ date="2017-02-16T18:44:36Z"
+ content="""
+Yes, it is me!  The files are being annexed, they're just unlocked.  Mea culpa.  Apologies!
+"""]]

remove crud from transcript
diff --git a/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn b/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn
index 2f75e58..511b1df 100644
--- a/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn
+++ b/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn
@@ -71,22 +71,12 @@ drwxrwxrwt 52 root root  36864 Feb 16 13:46 ..
 drwxrwxr-x  9 jk   users  4096 Feb 16 13:48 .git
 -rw-rw-r--  1 jk   users    28 Feb 16 13:47 .gitattributes
 -rw-rw-r--  1 jk   users     4 Feb 16 13:48 xxx
-renn:/tmp/test$ git config annex
-error: key does not contain a section: annex
-renn:/tmp/test$ exit
-Script done, file is git-annex-mime-bug.txt
-renn:/tmp$ git check-attr --all raw/20160325/drone/DJI00147.MP4
-fatal: Not a git repository (or any of the parent directories): .git
-renn:/tmp$ cd test/
-renn:/tmp/test$ git check-attr --all xxx
-xxx: annex.largefiles: anything
-xxx: filter: annex
-renn:/tmp/test$ 
 
 renn:/tmp/test$ git check-attr --all xxx
 xxx: annex.largefiles: anything
 xxx: filter: annex
 
+
 # End of transcript or log.
 """]]
 

make query commands not output extraneous messages
config group groupwanted numcopies schedule wanted required: Avoid
displaying extraneous messages about repository auto-init, git-annex branch
merging, etc, when being used to get information.
diff --git a/CHANGELOG b/CHANGELOG
index 456b129..f5c0f3c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,9 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
   * sync: Improve integration with receive.denyCurrentBranch=updateInstead,
     displaying error messages from the remote then it fails to update
     its checked out branch.
+  * config group groupwanted numcopies schedule wanted required: 
+    Avoid displaying extraneous messages about repository auto-init,
+    git-annex branch merging, etc, when being used to get information.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/Command.hs b/Command.hs
index f8d4fe3..58f5776 100644
--- a/Command.hs
+++ b/Command.hs
@@ -22,12 +22,14 @@ import CmdLine.GlobalSetter as ReExported
 import CmdLine.GitAnnex.Options as ReExported
 import CmdLine.Batch as ReExported
 import Options.Applicative as ReExported hiding (command)
+import qualified Annex
 import qualified Git
 import Annex.Init
 import Config
 import Utility.Daemon
 import Types.Transfer
 import Types.ActionItem
+import Types.Messages
 
 {- Generates a normal Command -}
 command :: String -> CommandSection -> String -> CmdParamsDesc -> (CmdParamsDesc -> CommandParser) -> Command
@@ -63,6 +65,16 @@ noCommit c = c { cmdnocommit = True }
 noMessages :: Command -> Command
 noMessages c = c { cmdnomessages = True }
 
+{- Undoes noMessages -}
+allowMessages :: Annex ()
+allowMessages = do
+	curr <- Annex.getState Annex.output
+	case outputType curr of
+		QuietOutput -> Annex.setOutput NormalOutput
+		_ -> noop
+	Annex.changeState $ \s -> s
+		{ Annex.output = (Annex.output s) { implicitMessages = True } }
+
 {- Adds a fallback action to a command, that will be run if it's used
  - outside a git repository. -}
 noRepo :: (String -> Parser (IO ())) -> Command -> Command
diff --git a/Command/Config.hs b/Command/Config.hs
index 690c8d2..c9b6a7b 100644
--- a/Command/Config.hs
+++ b/Command/Config.hs
@@ -11,7 +11,8 @@ import Command
 import Logs.Config
 
 cmd :: Command
-cmd = command "config" SectionSetup "configuration stored in git-annex branch"
+cmd = noMessages $ command "config" SectionSetup
+	"configuration stored in git-annex branch"
 	paramNothing (seek <$$> optParser)
 
 data Action
@@ -47,11 +48,13 @@ optParser _ = setconfig <|> getconfig <|> unsetconfig
 
 seek :: Action -> CommandSeek
 seek (SetConfig name val) = commandAction $ do
+	allowMessages
 	showStart name val
 	next $ next $ do
 		setGlobalConfig name val
 		return True
 seek (UnsetConfig name) = commandAction $ do
+	allowMessages
 	showStart name "unset"
 	next $ next $ do
 		unsetGlobalConfig name
diff --git a/Command/Group.hs b/Command/Group.hs
index 6d9b4ab..65e0625 100644
--- a/Command/Group.hs
+++ b/Command/Group.hs
@@ -15,7 +15,7 @@ import Types.Group
 import qualified Data.Set as S
 
 cmd :: Command
-cmd = command "group" SectionSetup "add a repository to a group"
+cmd = noMessages $ command "group" SectionSetup "add a repository to a group"
 	(paramPair paramRemote paramDesc) (withParams seek)
 
 seek :: CmdParams -> CommandSeek
@@ -23,12 +23,13 @@ seek = withWords start
 
 start :: [String] -> CommandStart
 start (name:g:[]) = do
+	allowMessages
 	showStart "group" name
 	u <- Remote.nameToUUID name
 	next $ setGroup u g
 start (name:[]) = do
 	u <- Remote.nameToUUID name
-	showRaw . unwords . S.toList =<< lookupGroups u
+	liftIO . putStrLn . unwords . S.toList =<< lookupGroups u
 	stop
 start _ = giveup "Specify a repository and a group."
 
diff --git a/Command/GroupWanted.hs b/Command/GroupWanted.hs
index c0be246..939b303 100644
--- a/Command/GroupWanted.hs
+++ b/Command/GroupWanted.hs
@@ -12,7 +12,7 @@ import Logs.PreferredContent
 import Command.Wanted (performGet, performSet)
 
 cmd :: Command
-cmd = command "groupwanted" SectionSetup 
+cmd = noMessages $ command "groupwanted" SectionSetup 
 	"get or set groupwanted expression"
 	(paramPair paramGroup (paramOptional paramExpression))
 	(withParams seek)
@@ -23,6 +23,7 @@ seek = withWords start
 start :: [String] -> CommandStart
 start (g:[]) = next $ performGet groupPreferredContentMapRaw g
 start (g:expr:[]) = do
+	allowMessages
 	showStart "groupwanted" g
 	next $ performSet groupPreferredContentSet expr g
 start _ = giveup "Specify a group."
diff --git a/Command/NumCopies.hs b/Command/NumCopies.hs
index 005a0d1..9e467da 100644
--- a/Command/NumCopies.hs
+++ b/Command/NumCopies.hs
@@ -10,10 +10,9 @@ module Command.NumCopies where
 import Command
 import qualified Annex
 import Annex.NumCopies
-import Types.Messages
 
 cmd :: Command
-cmd = command "numcopies" SectionSetup 
+cmd = noMessages $ command "numcopies" SectionSetup 
 	"configure desired number of copies"
 	paramNumber (withParams seek)
 
@@ -35,7 +34,6 @@ start _ = giveup "Specify a single number."
 
 startGet :: CommandStart
 startGet = next $ next $ do
-	Annex.setOutput QuietOutput
 	v <- getGlobalNumCopies
 	case v of
 		Just n -> liftIO $ putStrLn $ show $ fromNumCopies n
@@ -49,6 +47,7 @@ startGet = next $ next $ do
 
 startSet :: Int -> CommandStart
 startSet n = do
+	allowMessages
 	showStart "numcopies" (show n)
 	next $ next $ do
 		setGlobalNumCopies $ NumCopies n
diff --git a/Command/Schedule.hs b/Command/Schedule.hs
index c9d4f91..5814d99 100644
--- a/Command/Schedule.hs
+++ b/Command/Schedule.hs
@@ -8,16 +8,14 @@
 module Command.Schedule where
 
 import Command
-import qualified Annex
 import qualified Remote
 import Logs.Schedule
 import Types.ScheduledActivity
-import Types.Messages
 
 import qualified Data.Set as S
 
 cmd :: Command
-cmd = command "schedule" SectionSetup "get or set scheduled jobs"
+cmd = noMessages $ command "schedule" SectionSetup "get or set scheduled jobs"
 	(paramPair paramRemote (paramOptional paramExpression))
 	(withParams seek)
 
@@ -29,6 +27,7 @@ start = parse
   where
 	parse (name:[]) = go name performGet
 	parse (name:expr:[]) = go name $ \uuid -> do
+		allowMessages
 		showStart "schedule" name
 		performSet expr uuid
 	parse _ = giveup "Specify a repository."
@@ -39,7 +38,6 @@ start = parse
 
 performGet :: UUID -> CommandPerform
 performGet uuid = do
-	Annex.setOutput QuietOutput
 	s <- scheduleGet uuid
 	liftIO $ putStrLn $ intercalate "; " $ 
 		map fromScheduledActivity $ S.toList s
diff --git a/Command/Wanted.hs b/Command/Wanted.hs
index 8fd369d..fc1fa86 100644
--- a/Command/Wanted.hs

(Diff truncated)
Added a comment
diff --git a/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages/comment_2_c43e838b750448fe4d1519e72c43242f._comment b/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages/comment_2_c43e838b750448fe4d1519e72c43242f._comment
new file mode 100644
index 0000000..dbd8edb
--- /dev/null
+++ b/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages/comment_2_c43e838b750448fe4d1519e72c43242f._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="yarikoptic"
+ avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4"
+ subject="comment 2"
+ date="2017-02-16T15:54:18Z"
+ content="""
+Thank you CandyAngel for the feedback.  I do know how to avoid it, but my point is that git-annex here uses stdout for both \"log messages\" and the output of the log command. IIRC some other commands, and git uses stderr for log/informational messages in cases where stdout is used for communicating output
+"""]]

Added a comment
diff --git a/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages/comment_1_bfbf428da46eaea52cc54878f119512a._comment b/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages/comment_1_bfbf428da46eaea52cc54878f119512a._comment
new file mode 100644
index 0000000..60a7036
--- /dev/null
+++ b/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages/comment_1_bfbf428da46eaea52cc54878f119512a._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="CandyAngel"
+ avatar="http://cdn.libravatar.org/avatar/15c0aade8bec5bf004f939dd73cf9ed8"
+ subject="comment 1"
+ date="2017-02-16T14:10:56Z"
+ content="""
+In your example, it is polluted by these messages because git-annex is initialising the repository as a git-annex. There should be a 'git annex init' after the 'cd', before you run git-annex commands (e.g. wanted).
+"""]]

diff --git a/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn b/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn
new file mode 100644
index 0000000..2f75e58
--- /dev/null
+++ b/doc/bugs/git_add_not_annexing_file_in_v6_repo.mdwn
@@ -0,0 +1,96 @@
+### Please describe the problem.
+
+`git add` doesn't put files inrto the annex.  I suspect this is me, but I've checked it a few times now, and I'm pretty sure this worked last year.
+
+### What steps will reproduce the problem?
+
+Create v6 repo, create gitattributes to make anything a largefile, create file, `git add` it
+
+### What version of git-annex are you using? On what operating system?
+
+Tried current neurodebian and stretch
+
+### 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
+
+renn:/tmp$ mkdir test
+renn:/tmp$ cd test
+renn:/tmp/test$ git init
+Initialized empty Git repository in /tmp/test/.git/
+renn:/tmp/test$ git annex init --version=6
+init  ok
+(recording state in git...)
+renn:/tmp/test$ git annex version
+git-annex version: 6.20170101
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: 6
+supported repository versions: 3 5 6
+upgrade supported from repository versions: 0 1 2 3 4 5
+operating system: linux x86_64
+renn:/tmp/test$ git annex info
+repository mode: indirect
+trusted repositories: 0
+semitrusted repositories: 3
+        00000000-0000-0000-0000-000000000001 -- web
+        00000000-0000-0000-0000-000000000002 -- bittorrent
+        cccf82b9-37ff-4bec-9996-f78bd101a033 -- jk@renn:/tmp/test [here]
+untrusted repositories: 0
+transfers in progress: none
+available local disk space: 340.69 gigabytes (+1 megabyte reserved)
+local annex keys: 0
+local annex size: 0 bytes
+annexed files in working tree: 0
+size of annexed files in working tree: 0 bytes
+bloom filter size: 32 mebibytes (0% full)
+backend usage: 
+renn:/tmp/test$ echo '* annex.largefiles=anything' > .gitattributes
+renn:/tmp/test$ git add .
+renn:/tmp/test$ git commit -m init
+[master (root-commit) ee0af94] init
+ 1 file changed, 1 insertion(+)
+ create mode 100644 .gitattributes
+renn:/tmp/test$ echo xxx>xxx
+renn:/tmp/test$ git add .
+renn:/tmp/test$ ls -l
+total 4
+-rw-rw-r-- 1 jk users 4 Feb 16 13:48 xxx
+renn:/tmp/test$ git commit -m test
+(recording state in git...)
+[master 96bc23c] test
+ 1 file changed, 1 insertion(+)
+ create mode 100644 xxx
+renn:/tmp/test$ ls -la
+total 56
+drwxrwxr-x  3 jk   users  4096 Feb 16 13:48 .
+drwxrwxrwt 52 root root  36864 Feb 16 13:46 ..
+drwxrwxr-x  9 jk   users  4096 Feb 16 13:48 .git
+-rw-rw-r--  1 jk   users    28 Feb 16 13:47 .gitattributes
+-rw-rw-r--  1 jk   users     4 Feb 16 13:48 xxx
+renn:/tmp/test$ git config annex
+error: key does not contain a section: annex
+renn:/tmp/test$ exit
+Script done, file is git-annex-mime-bug.txt
+renn:/tmp$ git check-attr --all raw/20160325/drone/DJI00147.MP4
+fatal: Not a git repository (or any of the parent directories): .git
+renn:/tmp$ cd test/
+renn:/tmp/test$ git check-attr --all xxx
+xxx: annex.largefiles: anything
+xxx: filter: annex
+renn:/tmp/test$ 
+
+renn:/tmp/test$ git check-attr --all xxx
+xxx: annex.largefiles: anything
+xxx: filter: annex
+
+# 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, like it a lot.  Many thanks.
+

Added a comment
diff --git a/doc/bugs/Can__39__t_add_a_git_repo_to_git_annex__58_____34__Invalid_path_repo__47__.git__47__X__34___for_many_X/comment_1_5d23b1f02c6a0db0b43939210c427994._comment b/doc/bugs/Can__39__t_add_a_git_repo_to_git_annex__58_____34__Invalid_path_repo__47__.git__47__X__34___for_many_X/comment_1_5d23b1f02c6a0db0b43939210c427994._comment
new file mode 100644
index 0000000..ff4b301
--- /dev/null
+++ b/doc/bugs/Can__39__t_add_a_git_repo_to_git_annex__58_____34__Invalid_path_repo__47__.git__47__X__34___for_many_X/comment_1_5d23b1f02c6a0db0b43939210c427994._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="andy"
+ avatar="http://cdn.libravatar.org/avatar/1f1c630290d8b02d7faddc9fa4482c8d"
+ subject="comment 1"
+ date="2017-02-16T06:34:50Z"
+ content="""
+I've had the same problem; I solve it by packing the repositories into a compressed file of some sort (currently a 7z archive) and committing that to Git Annex. I have a script that makes that a one-line job. If I need to make changes to the repo, I can unpack the archive and work on the repo as usual.
+"""]]

diff --git a/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages.mdwn b/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages.mdwn
new file mode 100644
index 0000000..0dd6a97
--- /dev/null
+++ b/doc/todo/output_of_wanted___40__and_possibly_group_etc__41___should_not_be_polluted_with___34__informational__34___messages.mdwn
@@ -0,0 +1,11 @@
+[[!format sh """
+$> git  clone http://datasets.datalad.org/labs/haxby/raiders/.git ; cd raiders; git annex wanted origin 2>/dev/null     
+Cloning into 'raiders'...
+(merging origin/git-annex into git-annex...)
+(recording state in git...)
+not metadata=distribution-restrictions=*
+"""]]
+
+so it is necessary to avoid considering all the merging and recording messages, complicating using wanted in the scripts etc
+
+[[!meta author=yoh]]

devblog
diff --git a/doc/devblog/day_447__bug_class.mdwn b/doc/devblog/day_447__bug_class.mdwn
new file mode 100644
index 0000000..c7b3d38
--- /dev/null
+++ b/doc/devblog/day_447__bug_class.mdwn
@@ -0,0 +1,48 @@
+When you see a command like "ssh somehost rm -f file", you probably don't
+think that consumes stdin. After all, the `rm -f` doesn't. But, `ssh`
+can pass stdin over the network even if it's not being consumed, and it
+turns out git-annex was bitten by this.
+
+That bug made `git-annex-checkpresentkey --batch` with remote accessed
+over ssh not see all the batch-mode input that was passed into it, because
+ssh sometimes consumed some of it.
+
+Shell scripts using git-annex could also be impacted by the bug, for
+example:
+
+	#!/bin/sh
+	find . -type l -atime 100 | \
+		while read file; do
+			echo "gonna drop $file that has not been used in a while"
+			git annex drop "$file"
+		done
+
+Depending on what remotes `git annex drop` talks to, it might consume
+parts of the output of find.
+
+I've fixed this in git-annex now (using `ssh -n` when running commands
+that are not fed some stdin of their own), but this seems like a class of
+bug that could impact lots of programs that run ssh.
+
+----
+
+I've been thinking about [[simpler_setup_for_remote_worktree_update_on_push]].
+
+One nice way to make a remote update its worktree on push is available
+in recent-ish gits, receive.denyCurrentBranch=updateInstead. That could
+already be used with `git annex sync`, but it hid any error messages
+when pushing the master branch to the remote (since that push fails with
+a large error message in default configurations). Found a way to make
+the error message be displayed when the remote's receive.denyCurrentBranch
+does not have the default configuration.
+
+The remaining problem is that direct mode and adjusted branch remotes
+won't get their works trees updated even when configured that way. I am
+thinking about adding a post-update hook to support those.
+
+----
+
+Also continuing to bring up the ancient kernel arm autobuilder. It's running
+its first build now.
+
+Today's work was sponsored by Riku Voipio.
diff --git a/doc/todo/simpler_setup_for_post-update_merge.mdwn b/doc/todo/simpler_setup_for_post-update_merge.mdwn
deleted file mode 100644
index 8d25f44..0000000
--- a/doc/todo/simpler_setup_for_post-update_merge.mdwn
+++ /dev/null
@@ -1,60 +0,0 @@
-A git post-update hook can run git-annex merge and so make all pushes
-into a repository update its working tree.
-
-But, there are some complications to writing that hook. See
-<http://git-annex.branchable.com/tips/setup_a_public_repository_on_a_web_site/>
-IIRC different versions of git may behave differently.
-
-And, such a hook can't be used on a filesystem that doesn't support
-executables. (Except on Windows which has a workaround to allow
-non-executable hooks.)
-
-Could there be a single command that sets it up? Something like 
-`git annex merge --run-automatically`
-
-That could install the hook, and also set an annex.automerge config.
-
-The config could be checked by git-annex sync (and assistant) when pushing
-to a local remote, and they could perform a merge on the remote. This way,
-it would work for repos on removable drives that don't support execute
-bits. (Ssh remotes on such filesystems would not be handled, but that's a
-rare configuration; the hook would handle ssh remotes on non-crippled
-filesystems, and on Windows.)
-
----
-
-Alternatively, receive.denyCurrentBranch can be set to updateInstead.
-With this configuration, `git annex sync` automatically updates the
-work-tree of the remote already. 
-
-This wouldn't work for direct mode repositories, which are often used
-on removable drives, since git thinks they're bare repos.
-
-Nor will it work for adjusted branches, since the adjusted branch is not
-updated by the push.
-
----
-
-Could the updateInstead configuration be made to work for direct mode and
-adjusted branches? Could install a post-update hook, that runs a git-annex
-command that checks for updateInstead, and emulates its behavior, handling
-direct mode and adjusted branches.
-
----
-
-Potential least surprise violation:
-
-If a repository is updating when git annex pushes changes to it, 
-the user might also expect that the same git annex sync
-would pull changes from that repository. Even though nothing has been
-run on the repository to commit changes made there.
-
-Particularly when the assistant is being used, this seems an easy confusion 
-to have. In one clone the user sees every file change getting committed
-and synced around, so why would that not happen in the other clone, on the
-removable drive?
-
-Keeping this a command-line setup, and not something the assistant does,
-will avoid that confusion.
-
---[[Joey]]
diff --git a/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn b/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
new file mode 100644
index 0000000..8d25f44
--- /dev/null
+++ b/doc/todo/simpler_setup_for_remote_worktree_update_on_push.mdwn
@@ -0,0 +1,60 @@
+A git post-update hook can run git-annex merge and so make all pushes
+into a repository update its working tree.
+
+But, there are some complications to writing that hook. See
+<http://git-annex.branchable.com/tips/setup_a_public_repository_on_a_web_site/>
+IIRC different versions of git may behave differently.
+
+And, such a hook can't be used on a filesystem that doesn't support
+executables. (Except on Windows which has a workaround to allow
+non-executable hooks.)
+
+Could there be a single command that sets it up? Something like 
+`git annex merge --run-automatically`
+
+That could install the hook, and also set an annex.automerge config.
+
+The config could be checked by git-annex sync (and assistant) when pushing
+to a local remote, and they could perform a merge on the remote. This way,
+it would work for repos on removable drives that don't support execute
+bits. (Ssh remotes on such filesystems would not be handled, but that's a
+rare configuration; the hook would handle ssh remotes on non-crippled
+filesystems, and on Windows.)
+
+---
+
+Alternatively, receive.denyCurrentBranch can be set to updateInstead.
+With this configuration, `git annex sync` automatically updates the
+work-tree of the remote already. 
+
+This wouldn't work for direct mode repositories, which are often used
+on removable drives, since git thinks they're bare repos.
+
+Nor will it work for adjusted branches, since the adjusted branch is not
+updated by the push.
+
+---
+
+Could the updateInstead configuration be made to work for direct mode and
+adjusted branches? Could install a post-update hook, that runs a git-annex
+command that checks for updateInstead, and emulates its behavior, handling
+direct mode and adjusted branches.
+
+---
+
+Potential least surprise violation:
+
+If a repository is updating when git annex pushes changes to it, 
+the user might also expect that the same git annex sync
+would pull changes from that repository. Even though nothing has been
+run on the repository to commit changes made there.
+
+Particularly when the assistant is being used, this seems an easy confusion 
+to have. In one clone the user sees every file change getting committed
+and synced around, so why would that not happen in the other clone, on the
+removable drive?
+
+Keeping this a command-line setup, and not something the assistant does,
+will avoid that confusion.
+
+--[[Joey]]

sync: Improve integration with receive.denyCurrentBranch=updateInstead
By displaying error messages from the remote then it fails to update
its checked out branch.
Error messages in the default receive.denyCurrentBranch are still
suppressed, which matches user expectations.
This commit was sponsored by Nick Daly on Patreon.
diff --git a/CHANGELOG b/CHANGELOG
index 7fbbf01..456b129 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,9 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
     git-annex commands that communicate with a remote over ssh may also
     have been consuming stdin that they shouldn't have, which could have
     impacted using them in eg, shell scripts.
+  * sync: Improve integration with receive.denyCurrentBranch=updateInstead,
+    displaying error messages from the remote then it fails to update
+    its checked out branch.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/Command/Sync.hs b/Command/Sync.hs
index d095ae2..ca6e862 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -389,18 +389,20 @@ pushRemote o remote (Just branch, _) = stopUnless (pure (pushOption o) <&&> need
 {- Pushes a regular branch like master to a remote. Also pushes the git-annex
  - branch.
  -
- - If the remote is a bare git repository, it's best to push the regular 
+ - If the remote is a bare git repository, it's best to push the regular
  - branch directly to it, so that cloning/pulling will get it.
  - On the other hand, if it's not bare, pushing to the checked out branch
- - will fail, and this is why we push to its syncBranch.
+ - will generally fail (except with receive.denyCurrentBranch=updateInstead),
+ - and this is why we push to its syncBranch.
  -
  - Git offers no way to tell if a remote is bare or not, so both methods
  - are tried.
  -
- - The direct push is likely to spew an ugly error message, so stderr is
- - elided. Since git progress display goes to stderr too, the sync push
- - is done first, and actually sends the data. Then the direct push is
- - tried, with stderr discarded, to update the branch ref on the remote.
+ - The direct push is likely to spew an ugly error message, so its stderr is
+ - often elided. Since git progress display goes to stderr too, the 
+ - sync push is done first, and actually sends the data. Then the
+ - direct push is tried, with stderr discarded, to update the branch ref
+ - on the remote.
  -
  - The sync push forces the update of the remote synced/git-annex branch.
  - This is necessary if a transition has rewritten the git-annex branch.
@@ -416,16 +418,30 @@ pushRemote o remote (Just branch, _) = stopUnless (pure (pushOption o) <&&> need
  - set on the remote.
  -}
 pushBranch :: Remote -> Git.Branch -> Git.Repo -> IO Bool
-pushBranch remote branch g = tryIO (directpush g) `after` syncpush g
+pushBranch remote branch g = directpush `after` syncpush
   where
-	syncpush = Git.Command.runBool $ pushparams
+	syncpush = flip Git.Command.runBool g $ pushparams
 		[ Git.Branch.forcePush $ refspec Annex.Branch.name
 		, refspec $ fromAdjustedBranch branch
 		]
-	directpush = Git.Command.runQuiet $ pushparams
-		[ Git.fromRef $ Git.Ref.base $ Annex.Branch.name
-		, Git.fromRef $ Git.Ref.base $ fromDirectBranch $ fromAdjustedBranch branch
-		]
+	directpush = do
+		-- Git prints out an error message when this fails.
+		-- In the default configuration of receive.denyCurrentBranch,
+		-- the error message mentions that config setting
+		-- (and should even if it is localized), and is quite long,
+		-- and the user was not intending to update the checked out
+		-- branch, so in that case, avoid displaying the error
+		-- message. Do display other error messages though,
+		-- including the error displayed when
+		-- receive.denyCurrentBranch=updateInstead -- the user
+		-- will want to see that one.
+		let p = flip Git.Command.gitCreateProcess g $ pushparams
+			[ Git.fromRef $ Git.Ref.base $ Annex.Branch.name
+			, Git.fromRef $ Git.Ref.base $ fromDirectBranch $ fromAdjustedBranch branch
+			]
+		(transcript, ok) <- processTranscript' p Nothing
+		when (not ok && not ("denyCurrentBranch" `isInfixOf` transcript)) $
+			hPutStr stderr transcript
 	pushparams branches =
 		[ Param "push"
 		, Param $ Remote.name remote
diff --git a/doc/todo/simpler_setup_for_post-update_merge.mdwn b/doc/todo/simpler_setup_for_post-update_merge.mdwn
index 27bace3..8d25f44 100644
--- a/doc/todo/simpler_setup_for_post-update_merge.mdwn
+++ b/doc/todo/simpler_setup_for_post-update_merge.mdwn
@@ -25,18 +25,20 @@ filesystems, and on Windows.)
 
 Alternatively, receive.denyCurrentBranch can be set to updateInstead.
 With this configuration, `git annex sync` automatically updates the
-work-tree of the remote already.
-
-However, any differences in the remote's work tree or index (other than new
-unstaged files) prevent the work tree update. Currently, `git annex sync`
-does the master:master push quietly, because in standard non-bare repos
-that's expected to fail. So, failures to update the remote work tree
-won't be noticed. (`git annex sync` could look at the remote's
-receive.denyCurrentBranch setting, but this would be hard to do for ssh
-remotes).
-
-Also, this wouldn't work for direct mode repositories, which are often used
-on removable drives.
+work-tree of the remote already. 
+
+This wouldn't work for direct mode repositories, which are often used
+on removable drives, since git thinks they're bare repos.
+
+Nor will it work for adjusted branches, since the adjusted branch is not
+updated by the push.
+
+---
+
+Could the updateInstead configuration be made to work for direct mode and
+adjusted branches? Could install a post-update hook, that runs a git-annex
+command that checks for updateInstead, and emulates its behavior, handling
+direct mode and adjusted branches.
 
 ---
 

Run ssh with -n whenever input is not being piped into it
... to avoid it consuming stdin that it shouldn't.
This fixes git-annex-checkpresentkey --batch remote, which didn't output
results for all keys passed into it.
Other git-annex commands that communicate with a remote over ssh may also
have been consuming stdin that they shouldn't have, which could have
impacted using them in eg, shell scripts. For example, a shell script
reading files from stdin and passing them to git annex drop would be
impacted by this bug, whenever git annex drop ran git-annex-shell
checkpresent, it would consume part/all of the stdin that the shell script
was supposed to consume.
Fixed by adding a ConsumeStdin parameter to Annex.Ssh.sshOptions, which
is used throughout git-annex to run ssh (in order for ssh connection
caching to work). Every call site was checked to see if it used
CreatePipe for stdin, and if not was marked NoConsumeStdin.
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 512f037..285680f 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -1,6 +1,6 @@
 {- git-annex ssh interface, with connection caching
  -
- - Copyright 2012-2015 Joey Hess <id@joeyh.name>
+ - Copyright 2012-2017 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
@@ -8,6 +8,7 @@
 {-# LANGUAGE CPP #-}
 
 module Annex.Ssh (
+	ConsumeStdin(..),
 	sshOptions,
 	sshCacheDir,
 	sshReadPort,
@@ -41,10 +42,15 @@ import Annex.Perms
 import Annex.LockPool
 #endif
 
+{- Some ssh commands are fed stdin on a pipe and so should be allowed to
+ - consume it. But ssh commands that are not piped stdin should generally
+ - not be allowed to consume the process's stdin. -}
+data ConsumeStdin = ConsumeStdin | NoConsumeStdin
+
 {- Generates parameters to ssh to a given host (or user@host) on a given
  - port. This includes connection caching parameters, and any ssh-options. -}
-sshOptions :: (String, Maybe Integer) -> RemoteGitConfig -> [CommandParam] -> Annex [CommandParam]
-sshOptions (host, port) gc opts = go =<< sshCachingInfo (host, port)
+sshOptions :: ConsumeStdin -> (String, Maybe Integer) -> RemoteGitConfig -> [CommandParam] -> Annex [CommandParam]
+sshOptions cs (host, port) gc opts = go =<< sshCachingInfo (host, port)
   where
 	go (Nothing, params) = ret params
 	go (Just socketfile, params) = do
@@ -55,6 +61,9 @@ sshOptions (host, port) gc opts = go =<< sshCachingInfo (host, port)
 		, map Param (remoteAnnexSshOptions gc)
 		, opts
 		, portParams port
+		, case cs of
+			ConsumeStdin -> []
+			NoConsumeStdin -> [Param "-n"]
 		, [Param "-T"]
 		]
 
diff --git a/Assistant/WebApp/Configurators/Ssh.hs b/Assistant/WebApp/Configurators/Ssh.hs
index 9502902..66f45d6 100644
--- a/Assistant/WebApp/Configurators/Ssh.hs
+++ b/Assistant/WebApp/Configurators/Ssh.hs
@@ -746,7 +746,9 @@ testGitLabUrl glu = case parseGitLabUrl glu of
 	probeuuid sshdata = do
 		r <- inRepo $ Git.Construct.fromRemoteLocation (fromJust $ sshRepoUrl sshdata)
 		getUncachedUUID . either (const r) fst <$>
-			Remote.Helper.Ssh.onRemote r (Git.Config.fromPipe r, return (Left $ error "configlist failed")) "configlist" [] []
+			Remote.Helper.Ssh.onRemote NoConsumeStdin r
+				(Git.Config.fromPipe r, return (Left $ error "configlist failed"))
+				"configlist" [] []
 	verifysshworks sshdata = inRepo $ Git.Command.runBool
 		[ Param "send-pack"
 		, Param (fromJust $ sshRepoUrl sshdata)
diff --git a/CHANGELOG b/CHANGELOG
index 94d3e25..7fbbf01 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,13 @@ git-annex (6.20170215) UNRELEASED; urgency=medium
 
   * sync, merge: Fail when the current branch has no commits yet, instead
     of not merging in anything from remotes and appearing to succeed.
+  * Run ssh with -n whenever input is not being piped into it,
+    to avoid it consuming stdin that it shouldn't.
+    This fixes git-annex-checkpresentkey --batch remote,
+    which didn't output results for all keys passed into it. Other
+    git-annex commands that communicate with a remote over ssh may also
+    have been consuming stdin that they shouldn't have, which could have
+    impacted using them in eg, shell scripts.
 
  -- Joey Hess <id@joeyh.name>  Tue, 14 Feb 2017 15:54:25 -0400
 
diff --git a/Command/Map.hs b/Command/Map.hs
index b04beb4..eb08037 100644
--- a/Command/Map.hs
+++ b/Command/Map.hs
@@ -16,6 +16,7 @@ import qualified Git.Config
 import qualified Git.Construct
 import qualified Remote
 import qualified Annex
+import Annex.Ssh
 import Annex.UUID
 import Logs.UUID
 import Logs.Trust
@@ -219,10 +220,11 @@ tryScan r
 	  where
 		p = proc pcmd $ toCommand params
 
-	configlist = Ssh.onRemote r (pipedconfig, return Nothing) "configlist" [] []
+	configlist = Ssh.onRemote NoConsumeStdin r
+		(pipedconfig, return Nothing) "configlist" [] []
 	manualconfiglist = do
 		gc <- Annex.getRemoteGitConfig r
-		sshparams <- Ssh.toRepo r gc [Param sshcmd]
+		sshparams <- Ssh.toRepo NoConsumeStdin r gc [Param sshcmd]
 		liftIO $ pipedconfig "ssh" sshparams
 	  where
 		sshcmd = "sh -c " ++ shellEscape
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index 9bdb22e..5594bac 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -28,6 +28,7 @@ import Remote.Helper.Messages
 import Utility.Hash
 import Utility.UserInfo
 import Annex.UUID
+import Annex.Ssh
 import Utility.Metered
 
 type BupRepo = String
@@ -213,7 +214,7 @@ storeBupUUID u buprepo = do
 onBupRemote :: Git.Repo -> (FilePath -> [CommandParam] -> IO a) -> FilePath -> [CommandParam] -> Annex a
 onBupRemote r a command params = do
 	c <- Annex.getRemoteGitConfig r
-	sshparams <- Ssh.toRepo r c [Param $
+	sshparams <- Ssh.toRepo NoConsumeStdin r c [Param $
 			"cd " ++ dir ++ " && " ++ unwords (command : toCommand params)]
 	liftIO $ a "ssh" sshparams
   where
diff --git a/Remote/Ddar.hs b/Remote/Ddar.hs
index 603eccd..1469284 100644
--- a/Remote/Ddar.hs
+++ b/Remote/Ddar.hs
@@ -118,11 +118,11 @@ splitRemoteDdarRepo ddarrepo =
 
 {- Return the command and parameters to use for a ddar call that may need to be
  - made on a remote repository. This will call ssh if needed. -}
-ddarRemoteCall :: DdarRepo -> Char -> [CommandParam] -> Annex (String, [CommandParam])
-ddarRemoteCall ddarrepo cmd params
+ddarRemoteCall :: ConsumeStdin -> DdarRepo -> Char -> [CommandParam] -> Annex (String, [CommandParam])
+ddarRemoteCall cs ddarrepo cmd params
 	| ddarLocal ddarrepo = return ("ddar", localParams)
 	| otherwise = do
-		os <- sshOptions (host, Nothing) (ddarRepoConfig ddarrepo) []
+		os <- sshOptions cs (host, Nothing) (ddarRepoConfig ddarrepo) []
 		return ("ssh", os ++ remoteParams)
   where
 	(host, ddarrepo') = splitRemoteDdarRepo ddarrepo
@@ -130,13 +130,13 @@ ddarRemoteCall ddarrepo cmd params
 	remoteParams = Param host : Param "ddar" : Param [cmd] : Param ddarrepo' : params
 
 {- Specialized ddarRemoteCall that includes extraction command and flags -}
-ddarExtractRemoteCall :: DdarRepo -> Key -> Annex (String, [CommandParam])
-ddarExtractRemoteCall ddarrepo k =
-	ddarRemoteCall ddarrepo 'x' [Param "--force-stdout", Param $ key2file k]
+ddarExtractRemoteCall :: ConsumeStdin -> DdarRepo -> Key -> Annex (String, [CommandParam])
+ddarExtractRemoteCall cs ddarrepo k =
+	ddarRemoteCall cs ddarrepo 'x' [Param "--force-stdout", Param $ key2file k]
 
 retrieve :: DdarRepo -> Retriever
 retrieve ddarrepo = byteRetriever $ \k sink -> do
-	(cmd, params) <- ddarExtractRemoteCall ddarrepo k
+	(cmd, params) <- ddarExtractRemoteCall NoConsumeStdin ddarrepo k
 	let p = (proc cmd $ toCommand params) { std_out = CreatePipe }
 	(_, Just h, _, pid) <- liftIO $ createProcess p
 	liftIO (hClose h >> forceSuccessProcess p pid)
@@ -147,7 +147,8 @@ retrieveCheap _ _ _ = return False
 
 remove :: DdarRepo -> Remover
 remove ddarrepo key = do
-	(cmd, params) <- ddarRemoteCall ddarrepo 'd' [Param $ key2file key]
+	(cmd, params) <- ddarRemoteCall NoConsumeStdin ddarrepo 'd'
+		[Param $ key2file key]
 	liftIO $ boolSystem cmd params
 
 ddarDirectoryExists :: DdarRepo -> Annex (Either String Bool)
@@ -158,7 +159,8 @@ ddarDirectoryExists ddarrepo
 			Left _ -> Right False
 			Right status -> Right $ isDirectory status
 	| otherwise = do
-		ps <- sshOptions (host, Nothing) (ddarRepoConfig ddarrepo) []
+		ps <- sshOptions NoConsumeStdin (host, Nothing)
+			(ddarRepoConfig ddarrepo) []
 		exitCode <- liftIO $ safeSystem "ssh" (ps ++ params)
 		case exitCode of
 			ExitSuccess -> return $ Right True
@@ -178,7 +180,7 @@ ddarDirectoryExists ddarrepo
 {- Use "ddar t" to determine if a given key is present in a ddar archive -}
 inDdarManifest :: DdarRepo -> Key -> Annex (Either String Bool)
 inDdarManifest ddarrepo k = do
-	(cmd, params) <- ddarRemoteCall ddarrepo 't' []
+	(cmd, params) <- ddarRemoteCall NoConsumeStdin ddarrepo 't' []
 	let p = proc cmd $ toCommand params
 	liftIO $ catchMsgIO $ withHandle StdoutHandle createProcessSuccess p $ \h -> do
 		contents <- hGetContents h
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs
index 78b1eed..79020f4 100644
--- a/Remote/GCrypt.hs
+++ b/Remote/GCrypt.hs
@@ -159,7 +159,7 @@ rsyncTransport r gc
 		let rsyncpath = if "/~/" `isPrefixOf` path

(Diff truncated)
add the new armel-ancient build
diff --git a/doc/builds.mdwn b/doc/builds.mdwn
index 77c9351..db1c9d7 100644
--- a/doc/builds.mdwn
+++ b/doc/builds.mdwn
@@ -15,6 +15,9 @@
 <h2>Linux i386-ancient</h2>
 <iframe width=1024 height=20em scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/i386-ancient/build-version">
 </iframe>
+<h2>Linux armel-ancient</h2>
+<iframe width=1024 height=20em scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/armel-ancient/build-version">
+</iframe>
 <h2>Android</h2>
 <iframe width=1024 height=20em scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/android/4.3/build-version">
 </iframe>
@@ -40,6 +43,9 @@
 <h2>Linux i386-ancient</h2>
 <iframe width=1024 scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/i386-ancient/">
 </iframe>
+<h2>Linux armel-ancient</h2>
+<iframe width=1024 scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/armel-ancient/">
+</iframe>
 <h2>Android</h2>
 <iframe width=1024 scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/android/">
 </iframe>

Added a comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_6_5b0310038a8b45d2083f39ea75c1a979._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_6_5b0310038a8b45d2083f39ea75c1a979._comment
new file mode 100644
index 0000000..36a1633
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_6_5b0310038a8b45d2083f39ea75c1a979._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="lasitus"
+ avatar="http://cdn.libravatar.org/avatar/dfe778f28027aeb75876172022aa5de3"
+ subject="comment 6"
+ date="2017-02-15T16:01:38Z"
+ content="""
+Note: The last run was the Windows side
+"""]]

diff --git a/doc/bugs/checkpresentkey_batch_stops_at_97_or_98_keys.mdwn b/doc/bugs/checkpresentkey_batch_stops_at_97_or_98_keys.mdwn
new file mode 100644
index 0000000..fd13340
--- /dev/null
+++ b/doc/bugs/checkpresentkey_batch_stops_at_97_or_98_keys.mdwn
@@ -0,0 +1,61 @@
+### Please describe the problem.
+
+**git annex checkpresentkey --batch $remote** doesn't check all the keys it is provided with.
+
+Depending how this is run, given 8000 keys, it may return info only the first handful or ~97.
+
+### What steps will reproduce the problem?
+
+The directory contains 8000 symlinks whose filename is the same as their key. The content is not in 'spearmint' (or any other configured remotes, but is present 'here').
+
+    $ find . -type l -printf "%f\n" | git annex checkpresentkey --batch | wc -l
+    8000
+    $ find . -type l -printf "%f\n" | git annex checkpresentkey --batch spearmint | wc -l
+    97
+    $ find . -type l -printf "%f\n" | git annex checkpresentkey --batch spearmint | wc -l
+    97
+
+Without a remote, all get checked..
+
+    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch | wc -l
+    8000
+    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch | sort | uniq -c
+       8000 0
+
+Specifying a remote only checks a small handful of keys (count changes each time)..
+
+    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
+    6
+    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
+    14
+    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
+    7
+    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
+    8
+
+Putting the keys into a file seems to make this more consistent (more in line with *find -type f*)
+
+    $ git annex find --format '${key}\n' . > /tmp/keys.txt
+    $ cat /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
+    96
+    $ cat /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
+    96
+
+Shuffling the key order doesn't matter much either..
+
+    $ shuf /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
+    97
+    $ shuf /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
+    96
+    $ shuf /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
+    97
+
+
+### What version of git-annex are you using? On what operating system?
+git-annex version: 6.20161231-g8740cd971
+
+Arch Linux (installed from 'community')
+
+### 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 only find (what I think are) bugs because I use it and I use it because I like it. I like it because it works (except for when I find actual bugs :]).

Added a comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_0453ae9123b359757e63c6eb5f12811b._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_0453ae9123b359757e63c6eb5f12811b._comment
new file mode 100644
index 0000000..fe27fba
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_0453ae9123b359757e63c6eb5f12811b._comment
@@ -0,0 +1,40 @@
+[[!comment format=mdwn
+ username="lasitus"
+ avatar="http://cdn.libravatar.org/avatar/dfe778f28027aeb75876172022aa5de3"
+ subject="comment 5"
+ date="2017-02-15T02:17:25Z"
+ content="""
+Got a decent result this last run:
+
+Console output
+
+```
+[2017-02-14 20:40:25.3493472] logging to .git\annex\daemon.log
+[2017-02-14 20:40:25.3493472] chat: C:\Program Files (x86)\Git\usr\bin\git-annex.exe [\"assistant\",\"--debug\"]
+[2017-02-14 20:47:21.2931135] process done ExitFailure 1
+```
+
+daemon.log ending
+
+```
+[2017-02-14 20:47:17.4915947] process done ExitSuccess
+[2017-02-14 20:47:19.7279831] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"symbolic-ref\",\"-q\",\"HEAD\"]
+[2017-02-14 20:47:19.7436092] process done ExitSuccess
+[2017-02-14 20:47:19.7436092] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"refs/heads/annex/direct/master\"]
+[2017-02-14 20:47:19.7748596] process done ExitSuccess
+[2017-02-14 20:47:19.7748596] Pusher: pushing to [Remote { name =\"origin\" }]
+[2017-02-14 20:47:19.8217363] Committer: queued Upload UUID \"b77aaec0-e75b-4eec-a08c-b09cbe2947d5\" LR Main\LR Main Smart Previews.lrdata\1\117C\117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng Nothing : new file created
+[2017-02-14 20:47:19.8529873] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"push\",\"origin\",\"+git-annex:synced/git-annex\",\"annex/direct/master:synced/master\"]
+[2017-02-14 20:47:19.9154902] Transferrer: Transferring: Upload UUID \"b77aaec0-e75b-4eec-a08c-b09cbe2947d5\" LR Main\LR Main Smart Previews.lrdata\1\117C\117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng Nothing
+[2017-02-14 20:47:19.9154902] Watcher: add LR Main\LR Main Smart Previews.lrdata\1\162B\162B90D0-CC7C-4BD9-AC2B-BA2D4C72B555.dng
+
+117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng
+      1,792,000 100%  152.52MB/s    0:00:00 (xfr#1, to-chk=0/1)
+git-annex.exe: out of memory
+(recording state in git...)
+To storage.lan:/srv/annex/pictures
+   0623558..669c99c  git-annex -> synced/git-annex
+   6309934..b8e043d  annex/direct/master -> synced/master
+
+```
+"""]]

removed
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_c7857cf62868c857b817e1d9a1bf68c3._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_c7857cf62868c857b817e1d9a1bf68c3._comment
deleted file mode 100644
index a8cade8..0000000
--- a/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_c7857cf62868c857b817e1d9a1bf68c3._comment
+++ /dev/null
@@ -1,69 +0,0 @@
-[[!comment format=mdwn
- username="lasitus"
- avatar="http://cdn.libravatar.org/avatar/dfe778f28027aeb75876172022aa5de3"
- subject="comment 5"
- date="2017-02-15T02:13:25Z"
- content="""
-Ran it again with the following output:
-
-[2017-02-14 20:40:25.3493472] logging to .git\annex\daemon.log
-[2017-02-14 20:40:25.3493472] chat: C:\Program Files (x86)\Git\usr\bin\git-annex.exe [\"assistant\",\"--debug\"]
-[2017-02-14 20:47:21.2931135] process done ExitFailure 1
-
-[2017-02-14 20:46:28.9071201] Committer: committing 5011 changes
-[2017-02-14 20:46:28.9071201] Committer: Committing changes to git
-(recording state in git...)
-[2017-02-14 20:46:28.9071201] Watcher: add LR Main\LR Main Smart Previews.lrdata\1\162B\162B90D0-CC7C-4BD9-AC2B-BA2D4C72B555.dng
-[2017-02-14 20:46:28.9071201] feed: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-index\",\"-z\",\"--index-info\"]
-[2017-02-14 20:46:29.1102531] process done ExitSuccess
-[2017-02-14 20:46:29.1102531] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"symbolic-ref\",\"-q\",\"HEAD\"]
-[2017-02-14 20:46:29.1415037] process done ExitSuccess
-[2017-02-14 20:46:29.1415037] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"--hash\",\"refs/heads/annex/direct/master\"]
-[2017-02-14 20:46:29.1571295] process done ExitSuccess
-[2017-02-14 20:46:29.1571295] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"write-tree\"]
-[2017-02-14 20:46:40.4079405] process done ExitSuccess
-[2017-02-14 20:46:40.4079405] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"rev-parse\",\"630993481b2e5d2b1953c012195809d84eb844b9:\"]
-[2017-02-14 20:46:40.4200043] process done ExitSuccess
-[2017-02-14 20:46:40.4200043] chat: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"commit-tree\",\"57b8d6e2db6c040a66f22fbb2de0fec02eb40c5c\",\"-p\",\"630993481b2e5d2b1953c012195809d84eb844b9\"]
-[2017-02-14 20:46:40.670014] process done ExitSuccess
-[2017-02-14 20:46:40.670014] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-ref\",\"refs/heads/annex/direct/master\",\"b8e043db632fb234ac83aafa4266528e2b7f9fc5\"]
-[2017-02-14 20:46:40.9095882] process done ExitSuccess
-[2017-02-14 20:46:40.9095882] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"symbolic-ref\",\"-q\",\"HEAD\"]
-[2017-02-14 20:46:40.9305986] process done ExitSuccess
-[2017-02-14 20:46:40.9305986] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"refs/heads/annex/direct/master\"]
-[2017-02-14 20:46:40.9523179] process done ExitSuccess
-[2017-02-14 20:46:40.9523179] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"branch\",\"-f\",\"synced/master\",\"refs/heads/annex/direct/master\"]
-[2017-02-14 20:46:41.1867012] process done ExitSuccess
-[2017-02-14 20:46:41.1867012] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"branch\",\"-f\",\"master\",\"refs/heads/annex/direct/master\"]
-[2017-02-14 20:46:41.4248053] process done ExitSuccess
-[2017-02-14 20:46:41.4248053] Pusher: Syncing with origin
-[2017-02-14 20:46:41.4268061] feed: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-index\",\"-z\",\"--index-info\"]
-[2017-02-14 20:46:55.5442409] process done ExitSuccess
-[2017-02-14 20:46:55.5442409] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"]
-[2017-02-14 20:46:55.5754916] process done ExitSuccess
-(recording state in git...)
-[2017-02-14 20:46:55.5754916] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"write-tree\"]
-[2017-02-14 20:47:16.9749173] process done ExitSuccess
-[2017-02-14 20:47:16.9749173] chat: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"commit-tree\",\"b15548ff48d5afcc47456ad64c3fe194c78c64c2\",\"-p\",\"refs/heads/git-annex\"]
-[2017-02-14 20:47:17.2415842] process done ExitSuccess
-[2017-02-14 20:47:17.2415842] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-ref\",\"refs/heads/git-annex\",\"669c99c1f423bdb0ae941fd0aad4dd45996f4ec5\"]
-[2017-02-14 20:47:17.4915947] process done ExitSuccess
-[2017-02-14 20:47:19.7279831] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"symbolic-ref\",\"-q\",\"HEAD\"]
-[2017-02-14 20:47:19.7436092] process done ExitSuccess
-[2017-02-14 20:47:19.7436092] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"refs/heads/annex/direct/master\"]
-[2017-02-14 20:47:19.7748596] process done ExitSuccess
-[2017-02-14 20:47:19.7748596] Pusher: pushing to [Remote { name =\"origin\" }]
-[2017-02-14 20:47:19.8217363] Committer: queued Upload UUID \"b77aaec0-e75b-4eec-a08c-b09cbe2947d5\" LR Main\LR Main Smart Previews.lrdata\1\117C\117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng Nothing : new file created
-[2017-02-14 20:47:19.8529873] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"push\",\"origin\",\"+git-annex:synced/git-annex\",\"annex/direct/master:synced/master\"]
-[2017-02-14 20:47:19.9154902] Transferrer: Transferring: Upload UUID \"b77aaec0-e75b-4eec-a08c-b09cbe2947d5\" LR Main\LR Main Smart Previews.lrdata\1\117C\117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng Nothing
-[2017-02-14 20:47:19.9154902] Watcher: add LR Main\LR Main Smart Previews.lrdata\1\162B\162B90D0-CC7C-4BD9-AC2B-BA2D4C72B555.dng
-
-117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng
-      1,792,000 100%  152.52MB/s    0:00:00 (xfr#1, to-chk=0/1)
-git-annex.exe: out of memory
-(recording state in git...)
-To storage.lan:/srv/annex/pictures
-   0623558..669c99c  git-annex -> synced/git-annex
-   6309934..b8e043d  annex/direct/master -> synced/master
-
-"""]]

Added a comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_c7857cf62868c857b817e1d9a1bf68c3._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_c7857cf62868c857b817e1d9a1bf68c3._comment
new file mode 100644
index 0000000..a8cade8
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_5_c7857cf62868c857b817e1d9a1bf68c3._comment
@@ -0,0 +1,69 @@
+[[!comment format=mdwn
+ username="lasitus"
+ avatar="http://cdn.libravatar.org/avatar/dfe778f28027aeb75876172022aa5de3"
+ subject="comment 5"
+ date="2017-02-15T02:13:25Z"
+ content="""
+Ran it again with the following output:
+
+[2017-02-14 20:40:25.3493472] logging to .git\annex\daemon.log
+[2017-02-14 20:40:25.3493472] chat: C:\Program Files (x86)\Git\usr\bin\git-annex.exe [\"assistant\",\"--debug\"]
+[2017-02-14 20:47:21.2931135] process done ExitFailure 1
+
+[2017-02-14 20:46:28.9071201] Committer: committing 5011 changes
+[2017-02-14 20:46:28.9071201] Committer: Committing changes to git
+(recording state in git...)
+[2017-02-14 20:46:28.9071201] Watcher: add LR Main\LR Main Smart Previews.lrdata\1\162B\162B90D0-CC7C-4BD9-AC2B-BA2D4C72B555.dng
+[2017-02-14 20:46:28.9071201] feed: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-index\",\"-z\",\"--index-info\"]
+[2017-02-14 20:46:29.1102531] process done ExitSuccess
+[2017-02-14 20:46:29.1102531] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"symbolic-ref\",\"-q\",\"HEAD\"]
+[2017-02-14 20:46:29.1415037] process done ExitSuccess
+[2017-02-14 20:46:29.1415037] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"--hash\",\"refs/heads/annex/direct/master\"]
+[2017-02-14 20:46:29.1571295] process done ExitSuccess
+[2017-02-14 20:46:29.1571295] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"write-tree\"]
+[2017-02-14 20:46:40.4079405] process done ExitSuccess
+[2017-02-14 20:46:40.4079405] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"rev-parse\",\"630993481b2e5d2b1953c012195809d84eb844b9:\"]
+[2017-02-14 20:46:40.4200043] process done ExitSuccess
+[2017-02-14 20:46:40.4200043] chat: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"commit-tree\",\"57b8d6e2db6c040a66f22fbb2de0fec02eb40c5c\",\"-p\",\"630993481b2e5d2b1953c012195809d84eb844b9\"]
+[2017-02-14 20:46:40.670014] process done ExitSuccess
+[2017-02-14 20:46:40.670014] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-ref\",\"refs/heads/annex/direct/master\",\"b8e043db632fb234ac83aafa4266528e2b7f9fc5\"]
+[2017-02-14 20:46:40.9095882] process done ExitSuccess
+[2017-02-14 20:46:40.9095882] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"symbolic-ref\",\"-q\",\"HEAD\"]
+[2017-02-14 20:46:40.9305986] process done ExitSuccess
+[2017-02-14 20:46:40.9305986] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"refs/heads/annex/direct/master\"]
+[2017-02-14 20:46:40.9523179] process done ExitSuccess
+[2017-02-14 20:46:40.9523179] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"branch\",\"-f\",\"synced/master\",\"refs/heads/annex/direct/master\"]
+[2017-02-14 20:46:41.1867012] process done ExitSuccess
+[2017-02-14 20:46:41.1867012] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"branch\",\"-f\",\"master\",\"refs/heads/annex/direct/master\"]
+[2017-02-14 20:46:41.4248053] process done ExitSuccess
+[2017-02-14 20:46:41.4248053] Pusher: Syncing with origin
+[2017-02-14 20:46:41.4268061] feed: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-index\",\"-z\",\"--index-info\"]
+[2017-02-14 20:46:55.5442409] process done ExitSuccess
+[2017-02-14 20:46:55.5442409] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"]
+[2017-02-14 20:46:55.5754916] process done ExitSuccess
+(recording state in git...)
+[2017-02-14 20:46:55.5754916] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"write-tree\"]
+[2017-02-14 20:47:16.9749173] process done ExitSuccess
+[2017-02-14 20:47:16.9749173] chat: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"commit-tree\",\"b15548ff48d5afcc47456ad64c3fe194c78c64c2\",\"-p\",\"refs/heads/git-annex\"]
+[2017-02-14 20:47:17.2415842] process done ExitSuccess
+[2017-02-14 20:47:17.2415842] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"update-ref\",\"refs/heads/git-annex\",\"669c99c1f423bdb0ae941fd0aad4dd45996f4ec5\"]
+[2017-02-14 20:47:17.4915947] process done ExitSuccess
+[2017-02-14 20:47:19.7279831] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"symbolic-ref\",\"-q\",\"HEAD\"]
+[2017-02-14 20:47:19.7436092] process done ExitSuccess
+[2017-02-14 20:47:19.7436092] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"show-ref\",\"refs/heads/annex/direct/master\"]
+[2017-02-14 20:47:19.7748596] process done ExitSuccess
+[2017-02-14 20:47:19.7748596] Pusher: pushing to [Remote { name =\"origin\" }]
+[2017-02-14 20:47:19.8217363] Committer: queued Upload UUID \"b77aaec0-e75b-4eec-a08c-b09cbe2947d5\" LR Main\LR Main Smart Previews.lrdata\1\117C\117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng Nothing : new file created
+[2017-02-14 20:47:19.8529873] call: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"core.bare=false\",\"push\",\"origin\",\"+git-annex:synced/git-annex\",\"annex/direct/master:synced/master\"]
+[2017-02-14 20:47:19.9154902] Transferrer: Transferring: Upload UUID \"b77aaec0-e75b-4eec-a08c-b09cbe2947d5\" LR Main\LR Main Smart Previews.lrdata\1\117C\117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng Nothing
+[2017-02-14 20:47:19.9154902] Watcher: add LR Main\LR Main Smart Previews.lrdata\1\162B\162B90D0-CC7C-4BD9-AC2B-BA2D4C72B555.dng
+
+117C0B4F-1D99-4DF6-9E7B-7C0B655876D9.dng
+      1,792,000 100%  152.52MB/s    0:00:00 (xfr#1, to-chk=0/1)
+git-annex.exe: out of memory
+(recording state in git...)
+To storage.lan:/srv/annex/pictures
+   0623558..669c99c  git-annex -> synced/git-annex
+   6309934..b8e043d  annex/direct/master -> synced/master
+
+"""]]

thoughts
diff --git a/doc/todo/simpler_setup_for_post-update_merge.mdwn b/doc/todo/simpler_setup_for_post-update_merge.mdwn
new file mode 100644
index 0000000..27bace3
--- /dev/null
+++ b/doc/todo/simpler_setup_for_post-update_merge.mdwn
@@ -0,0 +1,58 @@
+A git post-update hook can run git-annex merge and so make all pushes
+into a repository update its working tree.
+
+But, there are some complications to writing that hook. See
+<http://git-annex.branchable.com/tips/setup_a_public_repository_on_a_web_site/>
+IIRC different versions of git may behave differently.
+
+And, such a hook can't be used on a filesystem that doesn't support
+executables. (Except on Windows which has a workaround to allow
+non-executable hooks.)
+
+Could there be a single command that sets it up? Something like 
+`git annex merge --run-automatically`
+
+That could install the hook, and also set an annex.automerge config.
+
+The config could be checked by git-annex sync (and assistant) when pushing
+to a local remote, and they could perform a merge on the remote. This way,
+it would work for repos on removable drives that don't support execute
+bits. (Ssh remotes on such filesystems would not be handled, but that's a
+rare configuration; the hook would handle ssh remotes on non-crippled
+filesystems, and on Windows.)
+
+---
+
+Alternatively, receive.denyCurrentBranch can be set to updateInstead.
+With this configuration, `git annex sync` automatically updates the
+work-tree of the remote already.
+
+However, any differences in the remote's work tree or index (other than new
+unstaged files) prevent the work tree update. Currently, `git annex sync`
+does the master:master push quietly, because in standard non-bare repos
+that's expected to fail. So, failures to update the remote work tree
+won't be noticed. (`git annex sync` could look at the remote's
+receive.denyCurrentBranch setting, but this would be hard to do for ssh
+remotes).
+
+Also, this wouldn't work for direct mode repositories, which are often used
+on removable drives.
+
+---
+
+Potential least surprise violation:
+
+If a repository is updating when git annex pushes changes to it, 
+the user might also expect that the same git annex sync
+would pull changes from that repository. Even though nothing has been
+run on the repository to commit changes made there.
+
+Particularly when the assistant is being used, this seems an easy confusion 
+to have. In one clone the user sees every file change getting committed
+and synced around, so why would that not happen in the other clone, on the
+removable drive?
+
+Keeping this a command-line setup, and not something the assistant does,
+will avoid that confusion.
+
+--[[Joey]]

Added a comment
diff --git a/doc/bugs/Too_difficult_if_not_impossible_to_explicitly_add__47__keep_file_under_git___40__not_annex__41___in_v6_without_employing_.gitattributes/comment_5_9707d9dda7ebb2c94c71f1ea2f99064d._comment b/doc/bugs/Too_difficult_if_not_impossible_to_explicitly_add__47__keep_file_under_git___40__not_annex__41___in_v6_without_employing_.gitattributes/comment_5_9707d9dda7ebb2c94c71f1ea2f99064d._comment
new file mode 100644
index 0000000..cf1822b
--- /dev/null
+++ b/doc/bugs/Too_difficult_if_not_impossible_to_explicitly_add__47__keep_file_under_git___40__not_annex__41___in_v6_without_employing_.gitattributes/comment_5_9707d9dda7ebb2c94c71f1ea2f99064d._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="db48x"
+ avatar="http://cdn.libravatar.org/avatar/ad2688127feb555a92154b16d8eeb5d3"
+ subject="comment 5"
+ date="2017-02-14T21:10:13Z"
+ content="""
+I've got a repository that has a small file that gets updated regularly. I've given up trying to keep it unannexed and just started unlocking it every time I run the automated script that updates it.
+"""]]

Added a comment
diff --git a/doc/git-annex-enableremote/comment_3_4bc11d1df0ff6962b12f5b8a1bb6188e._comment b/doc/git-annex-enableremote/comment_3_4bc11d1df0ff6962b12f5b8a1bb6188e._comment
new file mode 100644
index 0000000..e3a926d
--- /dev/null
+++ b/doc/git-annex-enableremote/comment_3_4bc11d1df0ff6962b12f5b8a1bb6188e._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="https://me.yahoo.com/a/80VlVB0Bx9TaNOXIj3OCQ8eimAtIOhqjUQ--#1e80e"
+ nickname="Sundar Raman"
+ avatar="http://cdn.libravatar.org/avatar/a5db56ac8777aee80bbe2b1e1d697c3961973049a22def38b4d15b7507e59c01"
+ subject="comment 3"
+ date="2017-02-14T20:21:41Z"
+ content="""
+Thanks much, did not think to use the 'describe' for that but that's very intuitive!
+"""]]

Added a comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_4_204764bb40509d8650386227ea166a6e._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_4_204764bb40509d8650386227ea166a6e._comment
new file mode 100644
index 0000000..6aae581
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_4_204764bb40509d8650386227ea166a6e._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="lasitus"
+ avatar="http://cdn.libravatar.org/avatar/dfe778f28027aeb75876172022aa5de3"
+ subject="comment 4"
+ date="2017-02-14T19:08:38Z"
+ content="""
+The high memory use and load were on the Linux side.
+
+Again these were two different behaviors on separate runs. Most runs, the linux side was fine and the windows side crashed. This one I can reproduce easily by just copying my data into an empty repo. I'll try it a few times later tonight and see if it always happens on a particular file.
+
+One time, the windows side stopped sensing files and the Linux side had heavy cpu usage and high memory usage) Sadly, I don't recall the exact time as the hang up happened over night, so hard to find in the log file. So, I guess I will focus on the first one.
+"""]]

add news item for git-annex 6.20170214
diff --git a/doc/news/version_6.20161031.mdwn b/doc/news/version_6.20161031.mdwn
deleted file mode 100644
index 69b0bb9..0000000
--- a/doc/news/version_6.20161031.mdwn
+++ /dev/null
@@ -1,7 +0,0 @@
-git-annex 6.20161031 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * Assistant, repair: Fix ignoring of git fsck errors due to
-     duplicate file entries in tree objects.
-   * Linux standalone: Fix location of locale files in the bundle.
-   * Fix reversion in 6.20161012 that prevented adding files with a space
-     in their name."""]]
\ No newline at end of file
diff --git a/doc/news/version_6.20161111.mdwn b/doc/news/version_6.20161111.mdwn
deleted file mode 100644
index 6c237a7..0000000
--- a/doc/news/version_6.20161111.mdwn
+++ /dev/null
@@ -1,20 +0,0 @@
-git-annex 6.20161111 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * Restarting a crashing git process could result in filename encoding
-     issues when not in a unicode locale, as the restarted processes's
-     handles were not read in raw mode.
-   * Make .git/annex/ssh.config file work with versions of ssh older than
-     7.3, which don't support Include. When used with an older version
-     of ssh, any ServerAliveInterval in ~/.ssh/config will be overridden
-     by .git/annex/ssh.config.
-   * S3: Support the special case endpoint needed for the cn-north-1 region.
-   * Webapp: Don't list the Frankfurt S3 region, as this (and some other new
-     regions) need V4 authorization which the aws library does not yet use.
-   * reinject --known: Avoid second, unncessary checksum of file.
-   * OSX: Remove RPATHs from git-annex binary, which are not needed,
-     slow down startup, and break the OSX Sierra linker.
-   * webapp: Explicitly avoid checking for auth in static subsite
-     requests. Yesod didn't used to do auth checks for that, but this may
-     have changed.
-   * Linux standalone: Avoid using hard links in the tarball so it can be
-     untarred on eg, afs which does not support them."""]]
\ No newline at end of file
diff --git a/doc/news/version_6.20170214.mdwn b/doc/news/version_6.20170214.mdwn
new file mode 100644
index 0000000..bc40e75
--- /dev/null
+++ b/doc/news/version_6.20170214.mdwn
@@ -0,0 +1,56 @@
+git-annex 6.20170214 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * Increase default cost for p2p remotes from 200 to 1000.
+     This makes git-annex prefer transferring data from special
+     remotes when possible.
+   * Remove -j short option for --json-progress; that option was already
+     taken for --json.
+   * vicfg: Include the numcopies configuation.
+   * config: New command for storing configuration in the git-annex branch.
+   * annex.autocommit can be configured via git-annex config, to control
+     the default behavior in all clones of a repository.
+   * New annex.synccontent config setting, which can be set to true to make
+     git annex sync default to --content. This may become the default at
+     some point in the future. As well as being configuable by git config,
+     it can be configured by git-annex config to control the default
+     behavior in all clones of a repository.
+   * stack.yaml: Update to lts-7.18.
+   * Some optimisations to string splitting code.
+   * unused: When large files are checked right into git, avoid buffering
+     their contents in memory.
+   * unused: Improved memory use significantly when there are a lot
+     of differences between branches.
+   * Wormhole pairing will start to provide an appid to wormhole on
+     2021-12-31. An appid can't be provided now because Debian stable is going
+     to ship a older version of git-annex that does not provide an appid.
+     Assumption is that by 2021-12-31, this version of git-annex will be
+     shipped in a Debian stable release. If that turns out to not be the
+     case, this change will need to be cherry-picked into the git-annex in
+     Debian stable, or its wormhole pairing will break.
+   * Fix build with aws 0.16. Thanks, aristidb.
+   * assistant: Make --autostart --foreground wait for the children it
+     starts. Before, the --foreground was ignored when autostarting.
+   * initremote: When a uuid= parameter is passed, use the specified
+     UUID for the new special remote, instead of generating a UUID.
+     This can be useful in some situations, eg when the same data can be
+     accessed via two different special remote backends.
+   * import: Changed how --deduplicate, --skip-duplicates, and
+     --clean-duplicates determine if a file is a duplicate.
+     Before, only content known to be present somewhere was considered
+     a duplicate. Now, any content that has been annexed before will be
+     considered a duplicate, even if all annexed copies of the data have
+     been lost.
+     Note that --clean-duplicates and --deduplicate still check
+     numcopies, so won't delete duplicate files unless there's an annexed
+     copy.
+   * import: --deduplicate and --skip-duplicates were implemented
+     inneficiently; they unncessarily hashed each file twice. They have
+     been improved to only hash once.
+   * import: Added --reinject-duplicates.
+   * Added git template directory to Linux standalone tarball and OSX
+     app bundle.
+   * Improve pid locking code to work on filesystems that don't support hard
+     links.
+   * S3: Fix check of uuid file stored in bucket, which was not working.
+   * Work around sqlite's incorrect handling of umask when creating
+     databases."""]]
\ No newline at end of file

comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_3_eabad530a55adfa4be3eae0f743d3309._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_3_eabad530a55adfa4be3eae0f743d3309._comment
new file mode 100644
index 0000000..5cf9b66
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_3_eabad530a55adfa4be3eae0f743d3309._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2017-02-14T18:50:02Z"
+ content="""
+With a weird crash like this, I was thinking there might be an error message
+output to the console. I guess you showed the full console output though.
+
+Was the 85% of system memory happening on Windows or on Linux?
+
+I have no clues how to debug this. If there's useful information anywhere,
+it's probably in some windows crash log or system log thing that I know
+nothing about.
+"""]]

Added a comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_2_c6c04006b1d9aa6be92f5a970ba60618._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_2_c6c04006b1d9aa6be92f5a970ba60618._comment
new file mode 100644
index 0000000..987c928
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_2_c6c04006b1d9aa6be92f5a970ba60618._comment
@@ -0,0 +1,15 @@
+[[!comment format=mdwn
+ username="lasitus"
+ avatar="http://cdn.libravatar.org/avatar/dfe778f28027aeb75876172022aa5de3"
+ subject="comment 2"
+ date="2017-02-14T18:46:22Z"
+ content="""
+\"\"ExitFailure (-1073741819)\" looks kind of like an overflow of the exit status code, which is very strange.\"
+It isn't the only number I have received. I believe it was 5 on one run and 3 on another, but that is just from memory. I don't think the error was ever printed to the daemon.log. I can try and run it again and get more definite results.
+
+\"Is there an error message output anywhere when this happens?\"
+I gave you the end of daemon.log and everything that was printed after the crash. Any other logs you would like?
+
+\"It looks like you might have a ton of files in this repository, and that might have something to do with the memory use and load.\"
+After restarting and getting it going again, it was happily moving along with not much memory usage and 0.5 load. It seemed like both the client and the server were hung up on something that time. I had left it to chew on the files for quite some time. (That time the client didn't crash, but it stopped sensing any changes. Restarts of the assistant also didn't fix the issue, only a reboot on the Windows side.) I suppose I could have found whatever was running instead in task manager, but I'm saying a ctrl-c and apparent restart didn't help.
+"""]]

response
diff --git a/doc/git-annex-enableremote/comment_2_43876327581d6bcfb69c318c02d6389a._comment b/doc/git-annex-enableremote/comment_2_43876327581d6bcfb69c318c02d6389a._comment
new file mode 100644
index 0000000..e3b51b6
--- /dev/null
+++ b/doc/git-annex-enableremote/comment_2_43876327581d6bcfb69c318c02d6389a._comment
@@ -0,0 +1,21 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2017-02-14T18:16:52Z"
+ content="""
+@Sundar, good question.
+
+`git annex enableremote` will always refuse to enable the remote if there's
+a missing parameter, and prompt for the parameter. Finding the right value
+is up to you. Most of the time, no additional parameters are needed, or
+the parameters are fairly self-explanatory, eg login passwords for remote
+services.
+
+The difficulty with directory special remotes is that my /foo may not be
+the same as your /foo, so it can't reuse the directory= that was provided
+to initremote, and it's up to you to enter the right directory path.
+
+I think this needs to come down to documentation in the repository. The
+description of the remote (set by `git annex describe` 
+is a reasonable place to put that, unless you have somewhere better.
+"""]]

diff --git a/doc/special_remotes/S3.mdwn b/doc/special_remotes/S3.mdwn
index 3803115..d526d35 100644
--- a/doc/special_remotes/S3.mdwn
+++ b/doc/special_remotes/S3.mdwn
@@ -33,7 +33,7 @@ the S3 remote.
   Think carefully about who can access your repository before using
   embedcreds without gpg encryption.
 
-* `datacenter` - Defaults to "US". Other values include "EU",
+* `datacenter` - Defaults to "US". Other values include "EU" (which is EU/Ireland),
   "us-west-1", "us-west-2", "ap-southeast-1", "ap-southeast-2", and
   "sa-east-1".
 

Added a comment
diff --git a/doc/forum/Use_existing_S3_bucket/comment_2_6b108846fca4a514d507f56d1052fdde._comment b/doc/forum/Use_existing_S3_bucket/comment_2_6b108846fca4a514d507f56d1052fdde._comment
new file mode 100644
index 0000000..5e9fa1f
--- /dev/null
+++ b/doc/forum/Use_existing_S3_bucket/comment_2_6b108846fca4a514d507f56d1052fdde._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="http://xgm.de/oid/"
+ nickname="Horus"
+ avatar="http://cdn.libravatar.org/avatar/4c5c0e290374d76c713f482e41f60a3cbee0fa64bb94c6da94e5a61a50824811"
+ subject="comment 2"
+ date="2017-02-14T18:03:27Z"
+ content="""
+Ok, I can confirm it works with an existing bucket in Europe/Ireland.
+
+Looks like I shouldn't count on being able to use Frankfurt anytime soon, since this PR has not been worked on since april last year.
+
+Best Thanks!
+"""]]

removed
diff --git a/doc/git-annex-enableremote/comment_1_b34197834cd40b4bb086c7cb82453c61._comment b/doc/git-annex-enableremote/comment_1_b34197834cd40b4bb086c7cb82453c61._comment
deleted file mode 100644
index 16a4483..0000000
--- a/doc/git-annex-enableremote/comment_1_b34197834cd40b4bb086c7cb82453c61._comment
+++ /dev/null
@@ -1,33 +0,0 @@
-[[!comment format=mdwn
- username="https://me.yahoo.com/a/80VlVB0Bx9TaNOXIj3OCQ8eimAtIOhqjUQ--#1e80e"
- nickname="Sundar Raman"
- avatar="http://cdn.libravatar.org/avatar/a5db56ac8777aee80bbe2b1e1d697c3961973049a22def38b4d15b7507e59c01"
- subject="Retrieving initremote parameters for new user"
- date="2017-02-14T00:03:35Z"
- content="""
-Is there a way to determine the parameters that an enableremote command must use, if one does not know it? The use case is as follows:
-* Dev 1 performs an `initremote annexed-media directory=/path/to/media ...`
-* Dev 1 syncs content
-* Dev 2 comes along (or Dev 1 comes along months later with a different machine) and clones the repo, but needs to know the directory=/path... in order to 'enableremote'. Is there any way to glean this information from the source repo itself?
-
-The steps would be:
-
-dev1$ git clone git@gitserver:myproject.git && cd myproject
-dev1$ mkdir images && touch images/foo1.png
-dev1$ git annex initremote annexation.dir directory=/mnt/media/myproject.annex/ encrypted=false
-dev1$ git commit && git push && git annex sync --content
-
-<time passes >
-dev2$ git clone git@gitserver:myproject.git && cd myproject
-dev2$ git annex whereis 
-# shows something like ...
-#    whereis images/foo1.png (7 copies) ...
-#        38e67e39-7dfb-45e8-90fc-8c5d01aae0b4 -- annexation.dir
-dev2$ git annex enableremote annexation.dir directory=???
-
-So how does the new developer know how to define the annexation.dir? Is there any way to extract from the repo itself? Or must this information be saved into the repo's documentation to avoid losing the reference?
-
-Thanks!
-
-
-"""]]

Added a comment: Retrieving initremote parameters for new user
diff --git a/doc/git-annex-enableremote/comment_2_78223f5c6ad120d5e0b98583543425db._comment b/doc/git-annex-enableremote/comment_2_78223f5c6ad120d5e0b98583543425db._comment
new file mode 100644
index 0000000..a42e2c6
--- /dev/null
+++ b/doc/git-annex-enableremote/comment_2_78223f5c6ad120d5e0b98583543425db._comment
@@ -0,0 +1,37 @@
+[[!comment format=mdwn
+ username="https://me.yahoo.com/a/80VlVB0Bx9TaNOXIj3OCQ8eimAtIOhqjUQ--#1e80e"
+ nickname="Sundar Raman"
+ avatar="http://cdn.libravatar.org/avatar/a5db56ac8777aee80bbe2b1e1d697c3961973049a22def38b4d15b7507e59c01"
+ subject="Retrieving initremote parameters for new user"
+ date="2017-02-14T00:04:50Z"
+ content="""
+Is there a way to determine the parameters that an enableremote command must use, if one does not know it? The use case is as follows:
+* Dev 1 performs an `initremote annexed-media directory=/path/to/media ...`
+* Dev 1 syncs content
+* Dev 2 comes along (or Dev 1 comes along months later with a different machine) and clones the repo, but needs to know the directory=/path... in order to 'enableremote'. Is there any way to glean this information from the source repo itself?
+
+The steps would be:
+
+```
+dev1$ git clone git@gitserver:myproject.git && cd myproject
+dev1$ mkdir images && touch images/foo1.png
+dev1$ git annex initremote annexation.dir directory=/mnt/media/myproject.annex/ encrypted=false
+dev1$ git commit && git push && git annex sync --content
+```
+
+<time passes >
+
+```
+dev2$ git clone git@gitserver:myproject.git && cd myproject
+dev2$ git annex whereis 
+# shows something like ...
+#    whereis images/foo1.png (7 copies) ...
+#        38e67e39-7dfb-45e8-90fc-8c5d01aae0b4 -- annexation.dir
+dev2$ git annex enableremote annexation.dir directory=???
+```
+
+So how does the new developer know how to define the annexation.dir? Is there any way to extract from the repo itself? Or must this information be saved into the repo's documentation to avoid losing the reference?
+
+Thanks!
+
+"""]]

Added a comment: Retrieving initremote parameters for new user
diff --git a/doc/git-annex-enableremote/comment_1_b34197834cd40b4bb086c7cb82453c61._comment b/doc/git-annex-enableremote/comment_1_b34197834cd40b4bb086c7cb82453c61._comment
new file mode 100644
index 0000000..16a4483
--- /dev/null
+++ b/doc/git-annex-enableremote/comment_1_b34197834cd40b4bb086c7cb82453c61._comment
@@ -0,0 +1,33 @@
+[[!comment format=mdwn
+ username="https://me.yahoo.com/a/80VlVB0Bx9TaNOXIj3OCQ8eimAtIOhqjUQ--#1e80e"
+ nickname="Sundar Raman"
+ avatar="http://cdn.libravatar.org/avatar/a5db56ac8777aee80bbe2b1e1d697c3961973049a22def38b4d15b7507e59c01"
+ subject="Retrieving initremote parameters for new user"
+ date="2017-02-14T00:03:35Z"
+ content="""
+Is there a way to determine the parameters that an enableremote command must use, if one does not know it? The use case is as follows:
+* Dev 1 performs an `initremote annexed-media directory=/path/to/media ...`
+* Dev 1 syncs content
+* Dev 2 comes along (or Dev 1 comes along months later with a different machine) and clones the repo, but needs to know the directory=/path... in order to 'enableremote'. Is there any way to glean this information from the source repo itself?
+
+The steps would be:
+
+dev1$ git clone git@gitserver:myproject.git && cd myproject
+dev1$ mkdir images && touch images/foo1.png
+dev1$ git annex initremote annexation.dir directory=/mnt/media/myproject.annex/ encrypted=false
+dev1$ git commit && git push && git annex sync --content
+
+<time passes >
+dev2$ git clone git@gitserver:myproject.git && cd myproject
+dev2$ git annex whereis 
+# shows something like ...
+#    whereis images/foo1.png (7 copies) ...
+#        38e67e39-7dfb-45e8-90fc-8c5d01aae0b4 -- annexation.dir
+dev2$ git annex enableremote annexation.dir directory=???
+
+So how does the new developer know how to define the annexation.dir? Is there any way to extract from the repo itself? Or must this information be saved into the repo's documentation to avoid losing the reference?
+
+Thanks!
+
+
+"""]]

devblog
diff --git a/doc/devblog/day_446__quiet_progress.mdwn b/doc/devblog/day_446__quiet_progress.mdwn
new file mode 100644
index 0000000..87c7c64
--- /dev/null
+++ b/doc/devblog/day_446__quiet_progress.mdwn
@@ -0,0 +1,14 @@
+Last week I only had energy to work most of each day on git-annex,
+or to blog about it. I chose quiet work. The changelog did grow
+a good amount.
+
+Today, fixed some autobuilder problems, and I am gearing up to add another
+autobuild, targeting arm boxes with older linux kernels, since I got a
+chance to upgrade the arm autobuilder's disk this weekend.
+
+Also, some work on the S3 special remote, and worked around a bug in
+sqlite's handling of umask.
+
+Backlog is down to 243 messages.
+
+Today's work was sponsored by Trenton Cronholm on Patreon.

Work around sqlite's incorrect handling of umask when creating databases.
Refactored some common code into initDb.
This only deals with the problem when creating new databases. If a repo
got bad permissions into it, it's up to the user to deal with it.
This commit was sponsored by Ole-Morten Duesund on Patreon.
diff --git a/CHANGELOG b/CHANGELOG
index b359ff8..19826d6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -52,6 +52,8 @@ git-annex (6.20170102) UNRELEASED; urgency=medium
   * Improve pid locking code to work on filesystems that don't support hard
     links.
   * S3: Fix check of uuid file stored in bucket, which was not working.
+  * Work around sqlite's incorrect handling of umask when creating
+    databases.
 
  -- Joey Hess <id@joeyh.name>  Fri, 06 Jan 2017 15:22:06 -0400
 
diff --git a/Database/Fsck.hs b/Database/Fsck.hs
index 702b529..9affeac 100644
--- a/Database/Fsck.hs
+++ b/Database/Fsck.hs
@@ -22,11 +22,10 @@ module Database.Fsck (
 
 import Database.Types
 import qualified Database.Queue as H
+import Database.Init
 import Annex.Locations
-import Utility.PosixFiles
 import Utility.Exception
 import Annex.Common
-import Annex.Perms
 import Annex.LockFile
 
 import Database.Persist.TH
@@ -61,17 +60,8 @@ openDb u = do
 	dbdir <- fromRepo (gitAnnexFsckDbDir u)
 	let db = dbdir </> "db"
 	unlessM (liftIO $ doesFileExist db) $ do
-		let tmpdbdir = dbdir ++ ".tmp"
-		let tmpdb = tmpdbdir </> "db"
-		liftIO $ do
-			createDirectoryIfMissing True tmpdbdir
-			H.initDb tmpdb $ void $
-				runMigrationSilent migrateFsck
-		setAnnexDirPerm tmpdbdir
-		setAnnexFilePerm tmpdb
-		liftIO $ do
-			void $ tryIO $ removeDirectoryRecursive dbdir
-			rename tmpdbdir dbdir
+		initDb db $ void $
+			runMigrationSilent migrateFsck
 	lockFileCached =<< fromRepo (gitAnnexFsckDbLock u)
 	h <- liftIO $ H.openDbQueue db "fscked"
 	return $ FsckHandle h u
diff --git a/Database/Handle.hs b/Database/Handle.hs
index d84ce5b..7827be7 100644
--- a/Database/Handle.hs
+++ b/Database/Handle.hs
@@ -9,7 +9,6 @@
 
 module Database.Handle (
 	DbHandle,
-	initDb,
 	openDb,
 	TableName,
 	queryDb,
@@ -38,26 +37,6 @@ import System.IO
  - the database. It has a MVar which Jobs are submitted to. -}
 data DbHandle = DbHandle (Async ()) (MVar Job)
 
-{- Ensures that the database is initialized. Pass the migration action for
- - the database.
- -
- - The database is initialized using WAL mode, to prevent readers
- - from blocking writers, and prevent a writer from blocking readers.
- -}
-initDb :: FilePath -> SqlPersistM () -> IO ()
-initDb f migration = do
-	let db = T.pack f
-	enableWAL db
-	runSqlite db migration
-
-enableWAL :: T.Text -> IO ()
-enableWAL db = do
-	conn <- Sqlite.open db
-	stmt <- Sqlite.prepare conn (T.pack "PRAGMA journal_mode=WAL;")
-	void $ Sqlite.step stmt
-	void $ Sqlite.finalize stmt
-	Sqlite.close conn
-
 {- Name of a table that should exist once the database is initialized. -}
 type TableName = String
 
diff --git a/Database/Init.hs b/Database/Init.hs
new file mode 100644
index 0000000..d7a7f68
--- /dev/null
+++ b/Database/Init.hs
@@ -0,0 +1,55 @@
+{- Persistent sqlite database initialization
+ -
+ - Copyright 2015-2017 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Database.Init where
+
+import Annex.Common
+import Annex.Perms
+import Utility.FileMode
+
+import Database.Persist.Sqlite
+import qualified Database.Sqlite as Sqlite
+import Control.Monad.IO.Class (liftIO)
+import qualified Data.Text as T
+
+{- Ensures that the database is freshly initialized. Deletes any
+ - existing database. Pass the migration action for the database.
+ -
+ - The database is initialized using WAL mode, to prevent readers
+ - from blocking writers, and prevent a writer from blocking readers.
+ -
+ - The permissions of the database are set based on the
+ - core.sharedRepository setting. Setting these permissions on the main db
+ - file causes Sqlite to always use the same permissions for additional
+ - files it writes later on
+ -}
+initDb :: FilePath -> SqlPersistM () -> Annex ()
+initDb db migration = do
+	let dbdir = takeDirectory db
+	let tmpdbdir = dbdir ++ ".tmp"
+	let tmpdb = tmpdbdir </> "db"
+	liftIO $ do
+		createDirectoryIfMissing True tmpdbdir
+		let tdb = T.pack tmpdb
+		enableWAL tdb
+		runSqlite tdb migration
+	setAnnexDirPerm tmpdbdir
+	-- Work around sqlite bug that prevents it from honoring
+	-- less restrictive umasks.
+	liftIO $ setFileMode tmpdb =<< defaultFileMode
+	setAnnexFilePerm tmpdb
+	liftIO $ do
+		void $ tryIO $ removeDirectoryRecursive dbdir
+		rename tmpdbdir dbdir
+
+enableWAL :: T.Text -> IO ()
+enableWAL db = do
+	conn <- Sqlite.open db
+	stmt <- Sqlite.prepare conn (T.pack "PRAGMA journal_mode=WAL;")
+	void $ Sqlite.step stmt
+	void $ Sqlite.finalize stmt
+	Sqlite.close conn
diff --git a/Database/Keys.hs b/Database/Keys.hs
index 0f2f349..b9440ac 100644
--- a/Database/Keys.hs
+++ b/Database/Keys.hs
@@ -25,11 +25,11 @@ import qualified Database.Keys.SQL as SQL
 import Database.Types
 import Database.Keys.Handle
 import qualified Database.Queue as H
+import Database.Init
 import Annex.Locations
 import Annex.Common hiding (delete)
 import Annex.Version (versionUsesKeysDatabase)
 import qualified Annex
-import Annex.Perms
 import Annex.LockFile
 import Utility.InodeCache
 import Annex.InodeSentinal
@@ -120,11 +120,7 @@ openDb createdb _ = catchPermissionDenied permerr $ withExclusiveLock gitAnnexKe
 	case (dbexists, createdb) of
 		(True, _) -> open db
 		(False, True) -> do
-			liftIO $ do
-				createDirectoryIfMissing True dbdir
-				H.initDb db SQL.createTables
-			setAnnexDirPerm dbdir
-			setAnnexFilePerm db
+			initDb db SQL.createTables
 			open db
 		(False, False) -> return DbUnavailable
   where
diff --git a/Database/Queue.hs b/Database/Queue.hs
index c4186b8..1438710 100644
--- a/Database/Queue.hs
+++ b/Database/Queue.hs
@@ -9,7 +9,6 @@
 
 module Database.Queue (
 	DbQueue,
-	initDb,
 	openDbQueue,
 	queryDbQueue,
 	closeDbQueue,
diff --git a/Utility/FileMode.hs b/Utility/FileMode.hs
index bb3780c..fe9cbf5 100644
--- a/Utility/FileMode.hs
+++ b/Utility/FileMode.hs
@@ -1,6 +1,6 @@
 {- File mode utilities.
  -
- - Copyright 2010-2012 Joey Hess <id@joeyh.name>

(Diff truncated)
response
diff --git a/doc/forum/Accessing_files_in_SSH_remotes_while_SSHed_into_remote/comment_4_650ebbe4e7b57361a42882f3092122f0._comment b/doc/forum/Accessing_files_in_SSH_remotes_while_SSHed_into_remote/comment_4_650ebbe4e7b57361a42882f3092122f0._comment
new file mode 100644
index 0000000..8d08278
--- /dev/null
+++ b/doc/forum/Accessing_files_in_SSH_remotes_while_SSHed_into_remote/comment_4_650ebbe4e7b57361a42882f3092122f0._comment
@@ -0,0 +1,15 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2017-02-13T20:14:31Z"
+ content="""
+In your original message, you mentioned NFS won't work due to locking.
+However, as far as I know, those NFS locking problems can be worked
+around by `git config annex.pidlock true`. That said, I encourage
+*not* using NFS if there is any alternative and it sounds like you've
+found an alternative, so great.
+
+Re your question about the assistant, have you tried running the assistant
+in the repo on the server? Once it's running, it should update the
+repository whenever the client pushes over a change.
+"""]]

comment
diff --git a/doc/bugs/git_annex_assistant_exits_with_failure/comment_1_247d4da208cd700851d48f13534d5f7c._comment b/doc/bugs/git_annex_assistant_exits_with_failure/comment_1_247d4da208cd700851d48f13534d5f7c._comment
new file mode 100644
index 0000000..f791798
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure/comment_1_247d4da208cd700851d48f13534d5f7c._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-13T20:08:32Z"
+ content="""
+"ExitFailure (-1073741819)" looks kind of like an overflow of the exit
+status code, which is very strange.
+
+Is there an error message output anywhere when this happens?
+
+It looks like you might have a ton of files in this repository, and that
+might have something to do with the memory use and load.
+"""]]

remove recent addition of receive.denyNonFastForwards to walkthrough
That is a dangerous setting, and not needed.
I tried the walkthrough as it was without it, and syncing in the USB
remote worked ok. There was a problem merging from origin/master, since
that branch didn't exist yet, but that didn't prevent sync from working
at all.
To avoid even that problem, reordered the walkthrough, so files get
committed to the repo before the remote gets set up.
This commit was sponsored by Ole-Morten Duesund on Patreon.
diff --git a/doc/walkthrough.mdwn b/doc/walkthrough.mdwn
index b35cf80..4745ca1 100644
--- a/doc/walkthrough.mdwn
+++ b/doc/walkthrough.mdwn
@@ -9,8 +9,8 @@ but following along will teach you the basic concepts from the ground up.
 
 [[!inline feeds=no trail=yes show=0 template=walkthrough pagenames="""
 	walkthrough/creating_a_repository
-	walkthrough/adding_a_remote
 	walkthrough/adding_files
+	walkthrough/adding_a_remote
 	walkthrough/renaming_files
 	walkthrough/getting_file_content
 	walkthrough/syncing
diff --git a/doc/walkthrough/creating_a_repository.mdwn b/doc/walkthrough/creating_a_repository.mdwn
index c5e389d..b5b3ab4 100644
--- a/doc/walkthrough/creating_a_repository.mdwn
+++ b/doc/walkthrough/creating_a_repository.mdwn
@@ -4,4 +4,3 @@ This is very straightforward.
 	# cd ~/annex
 	# git init
 	# git annex init
-	# git config receive.denyNonFastForwards false

fix commit id
diff --git a/doc/forum/_illegal_control_characters_in_pairing_message__59___ignoring/comment_7_625df33e70f2f959c574d918a706648d._comment b/doc/forum/_illegal_control_characters_in_pairing_message__59___ignoring/comment_7_625df33e70f2f959c574d918a706648d._comment
index c843534..e6303d1 100644
--- a/doc/forum/_illegal_control_characters_in_pairing_message__59___ignoring/comment_7_625df33e70f2f959c574d918a706648d._comment
+++ b/doc/forum/_illegal_control_characters_in_pairing_message__59___ignoring/comment_7_625df33e70f2f959c574d918a706648d._comment
@@ -7,7 +7,7 @@ Seems we can rule out user/hostname/directory, which probably leaves
 the ssh public key as the culprit, but I'm not sure.
 
 So, I changed the error message to display the problem data,
-in [[!commit 5fd15677042b66be81936f081fe0a17f5960096f]]. Once you have a
+in [[!commit f36adc2dbc46ec50ee7c88962de0a0d1473681eb]]. Once you have a
 git-annex version with that commit, if you see the problem, paste in the
 error message and I should be able to get to the bottom of this.
 """]]

include problem PairData in error message
Users occasionally report this error firing, and I can't see why,
so include the rejected PairData in the error message.
This is safe even if it contains evil escape characters, because showing
it displays them in escaped form.
This commit was sponsored by Bruno BEAUFILS on Patreon.
diff --git a/Assistant/Threads/PairListener.hs b/Assistant/Threads/PairListener.hs
index 5075759..09eaf1f 100644
--- a/Assistant/Threads/PairListener.hs
+++ b/Assistant/Threads/PairListener.hs
@@ -49,8 +49,8 @@ pairListenerThread urlrenderer = namedThread "PairListener" $ do
 					debug ["ignoring message that looped back"]
 					go reqs cache sock
 				(_, _, False, _) -> do
-					liftAnnex $ warning
-						"illegal control characters in pairing message; ignoring"
+					liftAnnex $ warning $
+						"illegal control characters in pairing message; ignoring (" ++ show (pairMsgData m) ++ ")"
 					go reqs cache sock
 				-- PairReq starts a pairing process, so a
 				-- new one is always heeded, even if
diff --git a/doc/forum/_illegal_control_characters_in_pairing_message__59___ignoring/comment_7_625df33e70f2f959c574d918a706648d._comment b/doc/forum/_illegal_control_characters_in_pairing_message__59___ignoring/comment_7_625df33e70f2f959c574d918a706648d._comment
new file mode 100644
index 0000000..c843534
--- /dev/null
+++ b/doc/forum/_illegal_control_characters_in_pairing_message__59___ignoring/comment_7_625df33e70f2f959c574d918a706648d._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 7"""
+ date="2017-02-13T19:52:36Z"
+ content="""
+Seems we can rule out user/hostname/directory, which probably leaves
+the ssh public key as the culprit, but I'm not sure.
+
+So, I changed the error message to display the problem data,
+in [[!commit 5fd15677042b66be81936f081fe0a17f5960096f]]. Once you have a
+git-annex version with that commit, if you see the problem, paste in the
+error message and I should be able to get to the bottom of this.
+"""]]

comment
diff --git a/doc/forum/Backup_of_git-annex_repos/comment_1_ed90e524606e394f7669fcba10846930._comment b/doc/forum/Backup_of_git-annex_repos/comment_1_ed90e524606e394f7669fcba10846930._comment
new file mode 100644
index 0000000..3c38efe
--- /dev/null
+++ b/doc/forum/Backup_of_git-annex_repos/comment_1_ed90e524606e394f7669fcba10846930._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-13T19:36:11Z"
+ content="""
+Suggest you restore everything except for `.git/annex/objects`.
+That should not be a lot of data to restore, but it will get
+you a fully working git repository back. Then you won't need the two-step
+process to restore a file, and can instead just restore the `.git/annex/objects`
+file that a symlink points to.
+"""]]

comment
diff --git a/doc/forum/Use_existing_S3_bucket/comment_1_ed0ead0b09ddbe52d42150a281d84f5c._comment b/doc/forum/Use_existing_S3_bucket/comment_1_ed0ead0b09ddbe52d42150a281d84f5c._comment
new file mode 100644
index 0000000..87c4c13
--- /dev/null
+++ b/doc/forum/Use_existing_S3_bucket/comment_1_ed0ead0b09ddbe52d42150a281d84f5c._comment
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-13T18:01:40Z"
+ content="""
+It's not supposed to fail when the bucket already exists. There is an
+explicit check to see whether the bucket exists in current versions.
+
+Unfortunately, git-annex can't support the Frankfurt datacenter,
+until this API problem gets fixed <https://github.com/aristidb/aws/pull/199>
+
+In my tests, it doesn't fail that way when the bucket already exists.
+I didn't create the bucket in Frankfurt though, and it could be
+that due to the API problem it fails to notice that the bucket in Frankfurt
+already exists.
+"""]]

comment
diff --git a/doc/bugs/Debian_and_MacOSX_cannot_read_eachother__39__s_S3_credentials/comment_1_e307e5d0ec02ed76dc7c3f0894770539._comment b/doc/bugs/Debian_and_MacOSX_cannot_read_eachother__39__s_S3_credentials/comment_1_e307e5d0ec02ed76dc7c3f0894770539._comment
new file mode 100644
index 0000000..840bfda
--- /dev/null
+++ b/doc/bugs/Debian_and_MacOSX_cannot_read_eachother__39__s_S3_credentials/comment_1_e307e5d0ec02ed76dc7c3f0894770539._comment
@@ -0,0 +1,28 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-13T18:27:02Z"
+ content="""
+The .git/annex/creds/uuid files for S3 special remotes are supposed to
+contain the S3 access credentials, the same values you set
+`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` to. Since it's just some
+high-entropy credentials, perhaps that's why you thought it looked garbled?
+
+I doubt that the error message about the cause of the gpg error is
+right; that is a workaround for an old bug in git-annex 5.20140916. Unless
+you used such an old version to set up the special remote, it's probably
+not related to that problem at all.
+
+The actual problem seems to be:
+
+	gpg: packet(2) with unknown version 13
+	gpg: [don't know]: invalid packet (ctb=6b)
+
+This probably points to an incompatability between the gpg versions.
+The easiest fix is probably to upgrade Debian to gpg 2.
+
+With embedcreds, the S3 creds are symmetrically encrypted/decrypted
+using gpg --symmetric. This is a less common way to use gpg,
+and it could be that there's an incompatability with how different
+versions of gpg do it.
+"""]]

diff --git a/doc/bugs/git_annex_assistant_exits_with_failure.mdwn b/doc/bugs/git_annex_assistant_exits_with_failure.mdwn
new file mode 100644
index 0000000..934149e
--- /dev/null
+++ b/doc/bugs/git_annex_assistant_exits_with_failure.mdwn
@@ -0,0 +1,161 @@
+### Please describe the problem
+Git annex assistant on windows exits with a failure upon large sync. It has done so about 6 times while messing with it. (I've been seeing if it is a good solution for my photos or not before taking the leap.) I am syncing between windows 10 and debian servers using the backup group and assistant/webapp. Debian is quite out of date, so I first used stable, then upped it to jessie-backports. Jessie backports is still, however, major version 5, so I upped it to neuro debian's build to see if it needed to match version numbers. I haven't quite matched the date though, so don't know if that could be an issue. I have tried the webapp as well, and it goes down during this issue. I have also had failures on the linux side. The second to last run git annex was using 85% of my system memory and the load was 2.5. I had to kill git annex assistant and restart. The Windows git annex assistant just became unresponsive that time and I had to reboot the system to get it to sense any files again. These could be separate issues, but it involved the same data set.
+
+### What steps will reproduce the problem?
+Setup git annex with assistant on windows 10 as a client and debian 8 latest neurodebian build running assistant. Copy in a lightroom catalog with previews, smart previews, and photos. Mine amounted to about 39 GB, 22k files, and 17k folders
+### What version of git-annex are you using? On what operating system?
+client, windows 10 running git bash window: 
+
+git-annex version: 6.20161231-gc8eeb17
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV ConcurrentOutput TorrentParser Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: 5
+supported repository versions: 3 5 6
+upgrade supported from repository versions: 2 3 4 5
+operating system: mingw32 i386
+
+server Debian 8:
+
+git-annex version: 6.20170209+gitg16be7b5cc-1~ndall+1
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: 5
+supported repository versions: 3 5 6
+upgrade supported from repository versions: 0 1 2 3 4 5
+operating system: linux x86_64
+
+### Please provide any additional information below.
+This is happens for both my large and smaller lightroom catalogs. I'm wondering if it is a peculiarity with how some of the files are formatted or the fact that it is a huge GUID for a file name. I can fairly consistently reproduce this issue on my setup, and I'm a software engineer (just don't know haskell yet.) So, I'm willing to do further debugging steps to help out.
+
+[[!format sh """
+# If you can, paste a complete transcript of the problem occurring here.
+$ git annex assistant --debug
+[2017-02-12 15:10:11.3151425] logging to .git\annex\daemon.log
+[2017-02-12 15:10:11.3151425] chat: C:\Program Files (x86)\Git\usr\bin\git-annex.exe ["assistant","--debug"]
+[2017-02-12 15:25:00.1479375] process done ExitFailure (-1073741819)
+
+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
+I assume you don't want the entire log in here right? It is 40k lines. I searched for ExitFailure and found only 3 instances, but none of them were at the end of the log.
+
+[2017-02-12 15:10:29.0507794] call: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","show-ref","--verify","-q","refs/remotes/origin/annex/direct/master"]
+[2017-02-12 15:10:29.1132817] process done ExitFailure 1
+
+[2017-02-12 15:10:30.1769265] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","push","origin","git-annex","master"]
+[2017-02-12 15:10:30.5990043] process done ExitFailure 1
+
+Last error:
+[2017-02-12 15:20:07.8259699] Watcher: add .\LR Main\LR Main Previews.lrdata\6\6D0A\6D0A45BF-E2F7-4094-A3C5-C0659456A383-05daea287739b47c27cea4102e72ecd9.lrprev
+[2017-02-12 15:20:07.8259699] process done ExitFailure 1
+
+
+Here are the last 100 or so lines, let me know if you want more:
+add .\LR Main\LR Main Previews.lrdata\5\5E0E\5E0EACCF-16F7-4D95-A01F-BA17EA4BFA48-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5E05\5E05C2FD-107F-4CC8-8B22-375F0B09F43F-a1140a4f04c71f00fb85fd8ac71d471c.lrfprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5E05\5E05C2FD-107F-4CC8-8B22-375F0B09F43F-269826a76ee94c785b873f891dc7aa04.lrfprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5E05\5E05C2FD-107F-4CC8-8B22-375F0B09F43F-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:05.2466023] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5E05\\5E05C2FD-107F-4CC8-8B22-375F0B09F43F-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:05.293479] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5DF5\5DF55627-D6A1-4E4D-96F3-00BFFBE07DE3-1c47c3bee58f7f7ae5b0b166edb1df35.lrprev [2017-02-12 15:24:05.3091052] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5DF5\\5DF55627-D6A1-4E4D-96F3-00BFFBE07DE3-1c47c3bee58f7f7ae5b0b166edb1df35.lrprev"]
+[2017-02-12 15:24:05.355981] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5DB9\5DB91865-DCDD-4987-8FBE-126861B802FC-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5DB3\5DB317AF-CE90-4B37-A65A-E7394E0D8364-d28c9daea957f6c969fa48154e27ccfa.lrfprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5DB3\5DB317AF-CE90-4B37-A65A-E7394E0D8364-0dcfb6f1963162fa2616cf6950b64f23.lrfprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5DB3\5DB317AF-CE90-4B37-A65A-E7394E0D8364-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5DAF\5DAFD546-32A8-4087-9DA9-E0C13C2EDE0E-077b070982fd42045ed5e932196fb988.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D9E\5D9E0F0C-082F-4A2B-AF9C-3A3288B3A2AE-91a29824ad0a349e888a7db35e28325f.lrfprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D9E\5D9E0F0C-082F-4A2B-AF9C-3A3288B3A2AE-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:05.5123925] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5D9E\\5D9E0F0C-082F-4A2B-AF9C-3A3288B3A2AE-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:05.559269] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5D71\5D71BB4D-8322-47C0-B779-3542311E59DE-077b070982fd42045ed5e932196fb988.lrprev [2017-02-12 15:24:05.5748955] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5D71\\5D71BB4D-8322-47C0-B779-3542311E59DE-077b070982fd42045ed5e932196fb988.lrprev"]
+[2017-02-12 15:24:05.6217725] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5D6C\5D6C374E-FA1E-4526-A215-63B315BA82B2-9453b0b0faf115dd4cbf4a4ca3fd5ee7.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D69\5D69C130-CDB9-4B67-8061-C0C0EF345D26-077b070982fd42045ed5e932196fb988.lrprev [2017-02-12 15:24:05.6842751] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5D69\\5D69C130-CDB9-4B67-8061-C0C0EF345D26-077b070982fd42045ed5e932196fb988.lrprev"]
+[2017-02-12 15:24:05.7155263] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5D47\5D479A01-2B69-4B85-AF2C-2CA2BF6BA66D-dfea411588b2a11b7e314d4691ee3d2f.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D43\5D43DB0F-30D9-4071-B96C-25D2D82F6E40-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D42\5D42D098-917E-46F6-AE24-2FB6242BE60D-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:05.7936545] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5D42\\5D42D098-917E-46F6-AE24-2FB6242BE60D-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:05.8092806] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5D3D\5D3DF631-9D24-446F-84F9-C858F398B23B-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D36\5D3642E1-BBA6-4C0B-89B6-9451B375D47A-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D29\5D29AB0B-E5A7-4930-BA0E-592675856EE8-b422a73fe8f4257d07ddd8c5d62692c9.lrfprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D29\5D29AB0B-E5A7-4930-BA0E-592675856EE8-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:05.9066036] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5D29\\5D29AB0B-E5A7-4930-BA0E-592675856EE8-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:05.9509479] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5D21\5D21CA81-F662-4566-8E69-B7587441A60B-c55693145cbd7408f494d96dc6feac77.lrfprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5D21\5D21CA81-F662-4566-8E69-B7587441A60B-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:05.9978244] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5D21\\5D21CA81-F662-4566-8E69-B7587441A60B-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:06.0134498] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5D21\5D2174E4-5440-46C9-B852-0164DFB9912A-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5CF0\5CF09660-99B4-409F-8CF7-ADE34A6785B3-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:06.0603269] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5CF0\\5CF09660-99B4-409F-8CF7-ADE34A6785B3-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:06.1072033] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5CDA\5CDA3518-0AC4-4B77-9485-AC40246094C9-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:06.1228291] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5CDA\\5CDA3518-0AC4-4B77-9485-AC40246094C9-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:06.1384542] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5CCE\5CCE8E71-8668-45D7-9053-DBC59DBECEDA-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:06.1697055] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5CCE\\5CCE8E71-8668-45D7-9053-DBC59DBECEDA-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:06.2165819] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5CB2\5CB2A82E-E4E4-4999-B976-2650F63003D4-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:06.2322077] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5CB2\\5CB2A82E-E4E4-4999-B976-2650F63003D4-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:06.2790841] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5C8B\5C8BBE9D-4E0C-429E-BB54-0B39AA043ABA-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5C55\5C553361-7EF4-4B77-B568-FEAD5381CFCC-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:06.3103357] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5C55\\5C553361-7EF4-4B77-B568-FEAD5381CFCC-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:06.3415866] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5C2E\5C2EAB4B-3986-4038-855D-F9DB3A5EE390-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5C2D\5C2DE3F6-D523-4729-81E2-34DA2D66843D-05daea287739b47c27cea4102e72ecd9.lrprev [2017-02-12 15:24:06.3728379] read: sha256sum [".\\LR Main\\LR Main Previews.lrdata\\5\\5C2D\\5C2DE3F6-D523-4729-81E2-34DA2D66843D-05daea287739b47c27cea4102e72ecd9.lrprev"]
+[2017-02-12 15:24:06.4036538] process done ExitSuccess
+ok
+add .\LR Main\LR Main Previews.lrdata\5\5C21\5C21C472-7230-464F-ADFA-8F93D30280F1-05daea287739b47c27cea4102e72ecd9.lrprev ok
+add .\LR Main\LR Main Previews.lrdata\5\5C1C\5C1C2A2C-BFA9-42EA-A647-6F5138F5CEB4-077b070982fd42045ed5e932196fb988.lrprev ok
+[2017-02-12 15:24:06.449992] Committer: committing 5214 changes
+[2017-02-12 15:24:06.449992] Committer: Committing changes to git
+(recording state in git...)
+[2017-02-12 15:24:06.449992] feed: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","update-index","-z","--index-info"]
+[2017-02-12 15:24:06.6687496] process done ExitSuccess
+[2017-02-12 15:24:06.6687496] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","symbolic-ref","-q","HEAD"]
+[2017-02-12 15:24:06.6843757] process done ExitSuccess
+[2017-02-12 15:24:06.6843757] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","show-ref","--hash","refs/heads/annex/direct/master"]
+[2017-02-12 15:24:06.7156263] process done ExitSuccess
+[2017-02-12 15:24:06.7156263] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","write-tree"]
+[2017-02-12 15:24:18.823257] process done ExitSuccess
+[2017-02-12 15:24:18.823257] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","rev-parse","e27617a27919a1942924c791c7963898b558f9c2:"]
+[2017-02-12 15:24:18.8388825] process done ExitSuccess
+[2017-02-12 15:24:18.8388825] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","commit-tree","c3f9659d704711122cfd83d3f4742635116ca96d","-p","e27617a27919a1942924c791c7963898b558f9c2"]
+[2017-02-12 15:24:19.0888926] process done ExitSuccess
+[2017-02-12 15:24:19.0888926] call: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","update-ref","refs/heads/annex/direct/master","8af641f066e30426a591bcf51a4244f127847431"]
+[2017-02-12 15:24:19.338833] process done ExitSuccess
+[2017-02-12 15:24:19.338833] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","symbolic-ref","-q","HEAD"]
+[2017-02-12 15:24:19.3700836] process done ExitSuccess
+[2017-02-12 15:24:19.3700836] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","show-ref","refs/heads/annex/direct/master"]
+[2017-02-12 15:24:19.3857092] process done ExitSuccess
+[2017-02-12 15:24:19.3857092] call: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","branch","-f","synced/master","refs/heads/annex/direct/master"]
+[2017-02-12 15:24:19.6400219] process done ExitSuccess
+[2017-02-12 15:24:19.6400219] call: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","branch","-f","master","refs/heads/annex/direct/master"]
+[2017-02-12 15:24:19.9025509] process done ExitSuccess
+[2017-02-12 15:24:19.9025509] Pusher: Syncing with origin 
+[2017-02-12 15:24:19.9025509] feed: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","update-index","-z","--index-info"]
+[2017-02-12 15:24:34.1218776] process done ExitSuccess
+[2017-02-12 15:24:34.1218776] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","show-ref","--hash","refs/heads/git-annex"]
+[2017-02-12 15:24:34.1531288] process done ExitSuccess
+(recording state in git...)
+[2017-02-12 15:24:34.1531288] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","write-tree"]
+[2017-02-12 15:24:57.3948994] process done ExitSuccess
+[2017-02-12 15:24:57.3948994] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","commit-tree","df397eef838882ccb0cba9d6ceca056aad905520","-p","refs/heads/git-annex"]
+[2017-02-12 15:24:57.6449095] process done ExitSuccess
+[2017-02-12 15:24:57.6449095] call: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","update-ref","refs/heads/git-annex","14b3e08b23f938d901447b1b7fcbf020a8bc517c"]
+[2017-02-12 15:24:57.8960758] process done ExitSuccess
+[2017-02-12 15:25:00.0854341] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","symbolic-ref","-q","HEAD"]
+[2017-02-12 15:25:00.1010592] 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 have had luck in manual mode using only linux. I only shied away from it, because I am chained to Windows in order to use some tools, e.g. lightroom, and it wasn't so nice there. Seeing support grow in Windows and the automatic features are amazing. It looks exactly like what I want, knowing where any of my files are at any given time and be able to setup more complicated transfer schemes to fit my needs exactly. Not to mention the ease of backing up over ssh to any of my linux boxes or offsite, etc. Oh and being able to checksum all of my photos and know they are all present and intact and being able to remove duplicate unorganized backups all over the place would be so great. I also need to work on a small subset on my macbook, so great solution for that as well.
+

diff --git a/doc/forum/Use_existing_S3_bucket.mdwn b/doc/forum/Use_existing_S3_bucket.mdwn
new file mode 100644
index 0000000..5f215b5
--- /dev/null
+++ b/doc/forum/Use_existing_S3_bucket.mdwn
@@ -0,0 +1,8 @@
+Hello,
+
+is it possible to use an existing AWS S3 bucket (one I created in the AWS web interface) when executing initremote? I tried but git annex failed with s3ErrorCode = "BucketAlreadyOwnedByYou".
+
+Background is that http://git-annex.branchable.com/special_remotes/S3/ only mentions EU for datacenter. But there are three possible EU datacenters now. So I created a bucket in EU (Frankfurt) and tried to use this one with bucket=mybucket
+
+Best Thanks!
+

correct spelling mistakes
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index 9d963f9..af29b02 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -574,7 +574,7 @@ checkBranchDifferences ref = do
 		<$> catFile ref differenceLog
 	mydiffs <- annexDifferences <$> Annex.getGitConfig
 	when (theirdiffs /= mydiffs) $
-		giveup "Remote repository is tuned in incompatable way; cannot be merged with local repository."
+		giveup "Remote repository is tuned in incompatible way; cannot be merged with local repository."
 
 ignoreRefs :: [Git.Sha] -> Annex ()
 ignoreRefs rs = do
diff --git a/Annex/Init.hs b/Annex/Init.hs
index 8a208fe..74274ad 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -119,7 +119,7 @@ uninitialize = do
 
 {- Will automatically initialize if there is already a git-annex
  - branch from somewhere. Otherwise, require a manual init
- - to avoid git-annex accidentially being run in git
+ - to avoid git-annex accidentally being run in git
  - repos that did not intend to use it.
  -
  - Checks repository version and handles upgrades too.
diff --git a/Annex/Perms.hs b/Annex/Perms.hs
index 6444025..80eb71f 100644
--- a/Annex/Perms.hs
+++ b/Annex/Perms.hs
@@ -148,7 +148,7 @@ thawPerms a = ifM crippledFileSystem
 	)
 
 {- Blocks writing to the directory an annexed file is in, to prevent the
- - file accidentially being deleted. However, if core.sharedRepository
+ - file accidentally being deleted. However, if core.sharedRepository
  - is set, this is not done, since the group must be allowed to delete the
  - file.
  -}
diff --git a/CHANGELOG b/CHANGELOG
index 9a5d181..20014ea 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1048,7 +1048,7 @@ git-annex (5.20150731) unstable; urgency=medium
   * webapp: Support enabling known gitlab.com remotes.
   * Fix rsync special remote to work when -Jn is used for concurrent
     uploads.
-  * The last release accidentially removed a number of options from the
+  * The last release accidentally removed a number of options from the
     copy command. (-J, file matching options, etc). These have been added
     back.
   * init: Detect when the filesystem is crippled such that it ignores
@@ -1258,7 +1258,7 @@ git-annex (5.20150508) unstable; urgency=medium
     (endpoint, port, storage class)
   * S3: Let git annex enableremote be used, without trying to recreate
     a bucket that should already exist.
-  * S3: Fix incompatability with bucket names used by hS3; the aws library
+  * S3: Fix incompatibility with bucket names used by hS3; the aws library
     cannot handle upper-case bucket names. git-annex now converts them to
     lower case automatically.
   * import: Check for gitignored files before moving them into the tree.
@@ -1655,7 +1655,7 @@ git-annex (5.20141125) unstable; urgency=medium
 
   * Remove fixup code for bad bare repositories created by
     versions 5.20131118 through 5.20131127. That fixup code would
-    accidentially fire when --git-dir was incorrectly
+    accidentally fire when --git-dir was incorrectly
     pointed at the working tree of a git-annex repository,
     possibly resulting in data loss. Closes: #768093
   * Windows: Fix crash when user.name is not set in git config.
@@ -3441,7 +3441,7 @@ git-annex (3.20130124) unstable; urgency=low
   * webapp: Has a page to view the log, accessed from the control menu.
   * webapp: Fix crash adding removable drive that has an annex directory
     in it that is not a git repository.
-  * Deal with incompatability in gpg2, which caused prompts for encryption
+  * Deal with incompatibility in gpg2, which caused prompts for encryption
     passphrases rather than using the supplied --passphrase-fd.
   * bugfix: Union merges involving two or more repositories could sometimes
     result in data from one repository getting lost. This could result
@@ -3541,7 +3541,7 @@ git-annex (3.20121211) unstable; urgency=low
     associated with a file.
   * webapp: S3 and Glacier forms now have a select list of all
     currently-supported AWS regions.
-  * webdav: Avoid trying to set props, avoiding incompatability with
+  * webdav: Avoid trying to set props, avoiding incompatibility with
     livedrive.com. Needs DAV version 0.3.
   * webapp: Prettify error display.
   * webapp: Fix bad interaction between required fields and modals.
@@ -4970,7 +4970,7 @@ git-annex (0.04) unstable; urgency=low
   * Note that git-annex 0.04 cannot transfer content from old repositories
     that have not yet been upgraded.
   * Annexed file contents are now made unwritable and put in unwriteable
-    directories, to avoid them accidentially being removed or modified.
+    directories, to avoid them accidentally being removed or modified.
     (Thanks Josh Triplett for the idea.)
   * Add build dep on libghc6-testpack-dev. Closes: #603016
   * Avoid using runghc to run test suite as it is not available on all
diff --git a/Command/Direct.hs b/Command/Direct.hs
index 06adf0e..817cedd 100644
--- a/Command/Direct.hs
+++ b/Command/Direct.hs
@@ -26,7 +26,7 @@ seek = withNothing start
 start :: CommandStart
 start = ifM versionSupportsDirectMode
 	( ifM isDirect ( stop , next perform )
-	, giveup "Direct mode is not suppported by this repository version. Use git-annex unlock instead."
+	, giveup "Direct mode is not supported by this repository version. Use git-annex unlock instead."
 	)
 
 perform :: CommandPerform
diff --git a/Command/Unannex.hs b/Command/Unannex.hs
index e744b51..e3e8d51 100644
--- a/Command/Unannex.hs
+++ b/Command/Unannex.hs
@@ -26,7 +26,7 @@ import Git.FilePath
 cmd :: Command
 cmd = withGlobalOptions annexedMatchingOptions $
 	command "unannex" SectionUtility
-		"undo accidential add command"
+		"undo accidental add command"
 		paramPaths (withParams seek)
 
 seek :: CmdParams -> CommandSeek
diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs
index 029ac4b..b72a60e 100644
--- a/Remote/Helper/Encryptable.hs
+++ b/Remote/Helper/Encryptable.hs
@@ -70,7 +70,7 @@ encryptionSetup c gc = do
 			(map ("encryption=" ++)
 				["none","shared","hybrid","pubkey", "sharedpubkey"])
 			++ "."
-	key = fromMaybe (giveup "Specifiy keyid=...") $ M.lookup "keyid" c
+	key = fromMaybe (giveup "Specify keyid=...") $ M.lookup "keyid" c
 	newkeys = maybe [] (\k -> [(True,k)]) (M.lookup "keyid+" c) ++
 		maybe [] (\k -> [(False,k)]) (M.lookup "keyid-" c)
 	cannotchange = giveup "Cannot set encryption type of existing remotes."
diff --git a/Test.hs b/Test.hs
index 7174d65..cb3df90 100644
--- a/Test.hs
+++ b/Test.hs
@@ -122,7 +122,7 @@ runner = Just $ \opts -> isolateGitConfig $ do
 		Just act -> ifM act
 			( exitSuccess
 			, do
-				putStrLn "  (This could be due to a bug in git-annex, or an incompatability"
+				putStrLn "  (This could be due to a bug in git-annex, or an incompatibility"
 				putStrLn "   with utilities, such as git, installed on this system.)"
 				exitFailure
 			)
@@ -452,7 +452,7 @@ test_drop_untrustedremote = intmpclonerepo $ do
 	git_annex "untrust" ["origin"] @? "untrust of origin failed"
 	git_annex "get" [annexedfile] @? "get failed"
 	annexed_present annexedfile
-	not <$> git_annex "drop" [annexedfile] @? "drop wrongly suceeded with only an untrusted copy of the file"
+	not <$> git_annex "drop" [annexedfile] @? "drop wrongly succeeded with only an untrusted copy of the file"
 	annexed_present annexedfile
 	inmainrepo $ annexed_present annexedfile
 
diff --git a/Utility/LockFile/Windows.hs b/Utility/LockFile/Windows.hs
index d05a447..e761573 100644
--- a/Utility/LockFile/Windows.hs
+++ b/Utility/LockFile/Windows.hs
@@ -38,7 +38,7 @@ lockExclusive = openLock fILE_SHARE_NONE
 {- Windows considers just opening a file enough to lock it. This will
  - create the LockFile if it does not already exist.
  -
- - Will fail if the file is already open with an incompatable ShareMode.
+ - Will fail if the file is already open with an incompatible ShareMode.
  - Note that this may happen if an unrelated process, such as a virus
  - scanner, even looks at the file. See http://support.microsoft.com/kb/316609
  -
diff --git a/Utility/PartialPrelude.hs b/Utility/PartialPrelude.hs
index 5579556..47e9831 100644
--- a/Utility/PartialPrelude.hs
+++ b/Utility/PartialPrelude.hs
@@ -2,7 +2,7 @@
  - bugs.
  -
  - This exports functions that conflict with the prelude, which avoids
- - them being accidentially used.
+ - them being accidentally used.
  -}
 
 {-# OPTIONS_GHC -fno-warn-tabs #-}
diff --git a/doc/bugs/20151116_tests_fail_on_OS_X.mdwn b/doc/bugs/20151116_tests_fail_on_OS_X.mdwn
index 17b66bb..fcd32f9 100644
--- a/doc/bugs/20151116_tests_fail_on_OS_X.mdwn
+++ b/doc/bugs/20151116_tests_fail_on_OS_X.mdwn
@@ -33,7 +33,7 @@ FAIL (0.29s)
       addurl failed on file:///private/var/folders/4j/br7bdhjx4b384_snb2087gt00000gn/T/nix-build-git-annex-5.20151116.drv-0/git-annex-5.20151116/.t/tmprepo0/myurl
 
 2 out of 150 tests failed (126.13s)
-  (This could be due to a bug in git-annex, or an incompatability
+  (This could be due to a bug in git-annex, or an incompatibility
    with utilities, such as git, installed on this system.)
 ```
 
diff --git a/doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn b/doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn
index 9532d0f..b0bf84a 100644
--- a/doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn

(Diff truncated)
correct spelling mistake
diff --git a/doc/git-annex-adjust.mdwn b/doc/git-annex-adjust.mdwn
index a2e6566..140de63 100644
--- a/doc/git-annex-adjust.mdwn
+++ b/doc/git-annex-adjust.mdwn
@@ -20,7 +20,7 @@ While in the adjusted branch, you can use git-annex and git commands as
 usual. Any commits that you make will initially only be made to the
 adjusted branch. 
 
-To propigate changes from the adjusted branch back to the original branch,
+To propagate changes from the adjusted branch back to the original branch,
 and to other repositories, as well as to merge in changes from other
 repositories, use `git annex sync`.
 

correct spelling mistake
diff --git a/doc/git-annex-shell.mdwn b/doc/git-annex-shell.mdwn
index 9b3d126..167f540 100644
--- a/doc/git-annex-shell.mdwn
+++ b/doc/git-annex-shell.mdwn
@@ -149,7 +149,7 @@ and fully lock it down to read-only mode:
 
 Obviously, `ssh-rsa AAAAB3NzaC1y[...] user@example.com` needs to
 replaced with your SSH key. The above also assumes `git-annex-shell`
-is availble in your `$PATH`, use an absolute path if it is not the
+is available in your `$PATH`, use an absolute path if it is not the
 case.
 
 # SEE ALSO

Improve pid locking code to work on filesystems that don't support hard links.
Probing for hard link support in the pid locking code is redundant since
git-annex init already probes that. But, it didn't seem worth threading
that data through; the pid locking code runs at most once per git-annex
process, and only on unusual filesystems. Optimising a single hard link
and unlink isn't worth it.
This commit was sponsored by Francois Marier on Patreon.
diff --git a/CHANGELOG b/CHANGELOG
index 9e27912..9a5d181 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -49,6 +49,8 @@ git-annex (6.20170102) UNRELEASED; urgency=medium
   * import: Added --reinject-duplicates.
   * Added git template directory to Linux standalone tarball and OSX
     app bundle.
+  * Improve pid locking code to work on filesystems that don't support hard
+    links.
 
  -- Joey Hess <id@joeyh.name>  Fri, 06 Jan 2017 15:22:06 -0400
 
diff --git a/Utility/LockFile/PidLock.hs b/Utility/LockFile/PidLock.hs
index bc8ddfe..87c11c0 100644
--- a/Utility/LockFile/PidLock.hs
+++ b/Utility/LockFile/PidLock.hs
@@ -150,14 +150,30 @@ tryLock lockfile = trySideLock lockfile $ \sidelock -> do
 -- open(2) suggests that link can sometimes appear to fail
 -- on NFS but have actually succeeded, and the way to find out is to stat
 -- the file and check its link count etc.
+--
+-- However, not all filesystems support hard links. So, first probe
+-- to see if they are supported. If not, use open with O_EXCL.
 linkToLock :: SideLockHandle -> FilePath -> FilePath -> IO Bool
 linkToLock Nothing _ _ = return False
 linkToLock (Just _) src dest = do
-	_ <- tryIO $ createLink src dest
-	ifM (catchBoolIO checklinked)
-		( catchBoolIO $ not <$> checkInsaneLustre dest
-		, return False
-		)
+	let probe = src ++ ".lnk"
+	v <- tryIO $ createLink src probe
+	nukeFile probe
+	case v of
+		Right _ -> do
+			_ <- tryIO $ createLink src dest
+			ifM (catchBoolIO checklinked)
+				( catchBoolIO $ not <$> checkInsaneLustre dest
+				, return False
+				)
+		Left _ -> catchBoolIO $ do
+			fd <- openFd dest WriteOnly
+				(Just $ combineModes readModes)
+				(defaultFileFlags {exclusive = True})
+			h <- fdToHandle fd
+			readFile src >>= hPutStr h
+			hClose h
+			return True
   where
 	checklinked = do
 		x <- getSymbolicLinkStatus src
diff --git a/doc/forum/git_annex_init_timeout/comment_2_bf15b686b07c5e6e95796affa497a541._comment b/doc/forum/git_annex_init_timeout/comment_2_bf15b686b07c5e6e95796affa497a541._comment
new file mode 100644
index 0000000..c7f39ae
--- /dev/null
+++ b/doc/forum/git_annex_init_timeout/comment_2_bf15b686b07c5e6e95796affa497a541._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2017-02-10T18:52:59Z"
+ content="""
+I was able to reproduce the problem with a FAT filesystem
+mounted on Linux, if I manually enabled annex.pidlock
+before git-annex init. Hard linking does not work on FAT, so that
+matches my earlier guess.
+
+I've committed a fix for this, so try again with a recent autobuild of
+git-annex and it will probably fix your problem.
+"""]]

comment
diff --git a/doc/forum/git_annex_init_timeout/comment_1_e456f5367af5a5a3a31fc982952079e3._comment b/doc/forum/git_annex_init_timeout/comment_1_e456f5367af5a5a3a31fc982952079e3._comment
new file mode 100644
index 0000000..06aed07
--- /dev/null
+++ b/doc/forum/git_annex_init_timeout/comment_1_e456f5367af5a5a3a31fc982952079e3._comment
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-02-10T18:06:28Z"
+ content="""
+git-annex needs flock locking to be supported by the filesystem it's used
+on. There's a workaround using pid locks, but that is apparently not
+working on OSX in your case. I've only tested it on Linux.
+
+I tried reproducing this on OSX by enabling annex.pidlock before using
+git-annex. But it worked ok.
+
+So, I suspect there may be a problem with the network filesystem's handling
+of the pidlock file. One likely problem is if it doesn't support hard
+links, since the pidlock file is hard linked into place.
+
+You can check if it supports hard links by running this on the drive where
+you had the problem:
+
+	touch foo
+	ln foo bar
+"""]]