Recent changes to this wiki:

Added a comment: annex.tune.objecthashlower=true is not just "lower" letters used but a different strategy altogether
diff --git a/doc/tuning/comment_1_f8af8e9b696d32d238ebd56a3b8058c4._comment b/doc/tuning/comment_1_f8af8e9b696d32d238ebd56a3b8058c4._comment
new file mode 100644
index 0000000..92a26fb
--- /dev/null
+++ b/doc/tuning/comment_1_f8af8e9b696d32d238ebd56a3b8058c4._comment
@@ -0,0 +1,17 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnx8kHW66N3BqmkVpgtXDlYMvr8TJ5VvfY"
+ nickname="Yaroslav"
+ subject="annex.tune.objecthashlower=true is not just "lower" letters used but a different strategy altogether"
+ date="2015-02-01T02:58:26Z"
+ content="""
+it starts to use 2 levels (even if annex.tune.objecthash1=true) of hash directories having 3 characters in the filename at each level.  So it is not just \"taken existing hash directories (1 or 2 levels) and use their lower-case version.  It is a different way to create the hash directories:
+
+e.g.  one with objecthas1=true
+
+1 -> .git/annex/objects/qj/SHA256E-s6--ecdc5536f73bdae8816f0ea40726ef5e9b810d914493075903bb90623d97b1d8/SHA256E-s6--ecdc5536f73bdae8816f0ea40726ef5e9b810d914493075903bb90623d97b1d8
+
+and if I provide all three options at once:
+
+1 -> .git/annex/objects/ccf/a40/SHA256E-s6--ecdc5536f73bdae8816f0ea40726ef5e9b810d914493075903bb90623d97b1d8/SHA256E-s6--ecdc5536f73bdae8816f0ea40726ef5e9b810d914493075903bb90623d97b1d8
+
+"""]]

Added a comment: any particular reason for the chosen characters for base32 encoding
diff --git a/doc/internals/hashing/comment_3_19b7d20ca392078f14f9f10992f288ec._comment b/doc/internals/hashing/comment_3_19b7d20ca392078f14f9f10992f288ec._comment
new file mode 100644
index 0000000..6ba3e09
--- /dev/null
+++ b/doc/internals/hashing/comment_3_19b7d20ca392078f14f9f10992f288ec._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="josch"
+ subject="any particular reason for the chosen characters for base32 encoding"
+ date="2015-01-31T17:13:57Z"
+ content="""
+are the characters \"0123456789zqjxkmvwgpfZQJXKMVWGPF\" chosen randomly for the base32 encoding or was there a reason to choose exactly these?
+"""]]

diff --git a/doc/forum/Alternative_to_XMPP_on_Windows__63__.mdwn b/doc/forum/Alternative_to_XMPP_on_Windows__63__.mdwn
new file mode 100644
index 0000000..7edd703
--- /dev/null
+++ b/doc/forum/Alternative_to_XMPP_on_Windows__63__.mdwn
@@ -0,0 +1 @@
+Is there an alternative to XMPP to sync Windows machines?

Added a comment: pre-commit is OK on windows now - auto adding last mod datetime
diff --git a/doc/tips/automatically_adding_metadata/comment_7_94877b21bf80374c2874b971f26f0e55._comment b/doc/tips/automatically_adding_metadata/comment_7_94877b21bf80374c2874b971f26f0e55._comment
new file mode 100644
index 0000000..74bd602
--- /dev/null
+++ b/doc/tips/automatically_adding_metadata/comment_7_94877b21bf80374c2874b971f26f0e55._comment
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnW_CrhP9p50n9UUhTg_a9glyKWSvnrjRQ"
+ nickname="Michele"
+ subject="pre-commit is OK on windows now - auto adding last mod datetime"
+ date="2015-01-30T11:48:24Z"
+ content="""
+@Joey just tested a nightly build and now pre-commit-annex is called, and with my modifications it autoadds last modified times for content.
+Trivially it's just the matter of adding:
+
+	field=\"datemod\"
+	value=$(stat -c %Y $f)
+	addmeta \"$f\" \"$field\" \"$value\"
+
+to the body of the process() function to the supplied pre-commit-annex script.
+thanks
+"""]]

diff --git a/doc/forum/Add_annex_files_outside_git_root_directory.mdwn b/doc/forum/Add_annex_files_outside_git_root_directory.mdwn
new file mode 100644
index 0000000..8d90cbf
--- /dev/null
+++ b/doc/forum/Add_annex_files_outside_git_root_directory.mdwn
@@ -0,0 +1,24 @@
+Hi,
+
+I love the idea of git-annex, and I'm trying to do my first steps with it. I'm stuck on the following issue:
+
+When creating a git repository and annexing a file in the root directory, everything works as expected:
+
+    git init
+    git annex init "mytest"
+    echo 1 > annexfile
+    git annex add annexfile
+    # add annexfile ok
+    # (Recording state in git...)
+
+However, when I try to add a file in a subdirectory of the repository, the adding command fails without any error message:
+
+    mkdir mydir
+    echo 1 > mydir/myfile
+    git annex add mydir/myfile
+    # no message, no status change, nothing
+    # note that I can add the file in the root dir and then move it to `mydir`
+
+Am I doing something wrong here?
+
+Thank you!

Added a comment: add MD5SUM (with E) backend?
diff --git a/doc/backends/comment_11_f0f6316bbdc971a9ab157de9bbb9f74c._comment b/doc/backends/comment_11_f0f6316bbdc971a9ab157de9bbb9f74c._comment
new file mode 100644
index 0000000..fc19964
--- /dev/null
+++ b/doc/backends/comment_11_f0f6316bbdc971a9ab157de9bbb9f74c._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnx8kHW66N3BqmkVpgtXDlYMvr8TJ5VvfY"
+ nickname="Yaroslav"
+ subject="add MD5SUM (with E) backend?"
+ date="2015-01-29T22:07:40Z"
+ content="""
+probably in many cases MD5SUM might be sufficient to cover the space of the available load and 
+
+- its size would be even smaller than SHA1 (thus smaller git-annex footprint)
+- immediate matching to often distributed MD5SUMs
+- matching to ETags (whenever wasn't a multipart upload) in S3 buckets
+
+or use of MD5SUM hash is really not recommended for non-encryption-critical cases too?
+"""]]

Added a comment
diff --git a/doc/forum/git:___39__annex__39___is_not_a_git_command_error_after_installing/comment_1_8a2e3be32800b7b8a6fa78bbdcba7608._comment b/doc/forum/git:___39__annex__39___is_not_a_git_command_error_after_installing/comment_1_8a2e3be32800b7b8a6fa78bbdcba7608._comment
new file mode 100644
index 0000000..b856d79
--- /dev/null
+++ b/doc/forum/git:___39__annex__39___is_not_a_git_command_error_after_installing/comment_1_8a2e3be32800b7b8a6fa78bbdcba7608._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawk53Hn5PfMJ9Y0rmLdAeRGmgq7XSGWcoNA"
+ nickname="Iain"
+ subject="comment 1"
+ date="2015-01-29T16:28:59Z"
+ content="""
+Solved it, you need to add git/cmd to your windows path variable
+"""]]

diff --git a/doc/forum/git:___39__annex__39___is_not_a_git_command_error_after_installing.mdwn b/doc/forum/git:___39__annex__39___is_not_a_git_command_error_after_installing.mdwn
new file mode 100644
index 0000000..ac6560e
--- /dev/null
+++ b/doc/forum/git:___39__annex__39___is_not_a_git_command_error_after_installing.mdwn
@@ -0,0 +1,38 @@
+Installed git and git annex precisely as directed on my Windows 7 system, but 'git annex test' fails with above mentioned error - as if it's not been installed.
+I tried uninstalling and reinstalling
+
+These are the contents of my git directory (from git bash prompt):
+
+-rw-r--r--    1 iainso   Administ      708 Dec 17 21:23 Git Bash.vbs
+
+-rw-r--r--    1 iainso   Administ    46106 Dec 17 21:23 ReleaseNotes.rtf
+
+drwxr-xr-x  147 iainso   Administ    40960 Jan 29 14:44 bin
+
+drwxr-xr-x   51 iainso   Administ    12288 Jan 29 16:10 cmd
+
+drwxr-xr-x    3 iainso   Administ        0 Jan 29 14:44 doc
+
+drwxr-xr-x   13 iainso   Administ     4096 Jan 29 14:44 etc
+
+-rw-r--r--    1 iainso   Administ      103 Jan 28 18:38 git-annex-autostart.vbs
+
+-rw-r--r--    1 iainso   Administ   232368 Jan 28 18:38 git-annex-licenses.txt
+
+-rwxr-xr-x    1 iainso   Administ    49799 Jan 29 16:10 git-annex-uninstall.exe
+
+-rw-r--r--    1 iainso   Administ       88 Jan 28 18:38 git-annex-webapp.vbs
+
+drwxr-xr-x    4 iainso   Administ        0 Jan 29 14:44 git-cheetah
+
+drwxr-xr-x   11 iainso   Administ     4096 Jan 29 14:44 lib
+
+drwxr-xr-x    3 iainso   Administ        0 Jan 29 14:43 libexec
+
+drwxr-xr-x    9 iainso   Administ        0 Jan 29 14:44 share
+
+drwxr-xr-x    5 iainso   Administ        0 Jan 29 14:44 ssl
+
+-rw-r--r--    1 iainso   Administ   635621 Jan 29 14:44 unins000.dat
+
+-rwxr-xr-x    1 iainso   Administ  1244929 Jan 29 14:42 unins000.exe

diff --git a/doc/forum/Understanding___34__deletion__34___and___34__dropping__34_____38___cleanup_of_history.mdwn b/doc/forum/Understanding___34__deletion__34___and___34__dropping__34_____38___cleanup_of_history.mdwn
new file mode 100644
index 0000000..9c6c3df
--- /dev/null
+++ b/doc/forum/Understanding___34__deletion__34___and___34__dropping__34_____38___cleanup_of_history.mdwn
@@ -0,0 +1,9 @@
+Hi!
+
+I have a few questions according to deletion and dropping with git-annex:
+
+1. I couldn't figure out what unused files really are. What is *unused* related to? (Head of) branches? How does a file become unused?  
+2. If I'm working in indirect mode, I can safely `git rm` files and restore them later, by checking out the corresponding commit. Consider several git-annex repos being in sync, where the repository contains a nested directory structure. Is there a way to completely remove all deletes files within some directory (which might but not must be the root of the repo), that have been deleted for more than X days? For example I would want to run something like `git annex drop-deleted --from-folder some/subdirectory/ --older-than 5`. Is there a way to achieve this?
+3. Just like 2, is there a way to remove (the content of) all non-current *versions* of all file that are older than Y days?
+
+Thanks in advance!

Added a comment
diff --git a/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server/comment_2_68d675096d9ea32780b8ec8526544b12._comment b/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server/comment_2_68d675096d9ea32780b8ec8526544b12._comment
new file mode 100644
index 0000000..2965054
--- /dev/null
+++ b/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server/comment_2_68d675096d9ea32780b8ec8526544b12._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="janis_e"
+ subject="comment 2"
+ date="2015-01-29T08:39:02Z"
+ content="""
+Thank you for these answers, especially the 4) makes sense to me and prevented me form blowing up my repository!
+"""]]

diff --git a/doc/forum/Is_there_any_delta_handling_for_file_modifications__63__.mdwn b/doc/forum/Is_there_any_delta_handling_for_file_modifications__63__.mdwn
new file mode 100644
index 0000000..30463a4
--- /dev/null
+++ b/doc/forum/Is_there_any_delta_handling_for_file_modifications__63__.mdwn
@@ -0,0 +1,20 @@
+Hi!
+
+I have few large files, which will be slightly modified from time to time. Consider the following example:
+
+    $ git init
+    $ git annex init "somerepo"
+    $ dd if=/dev/urandom of=foo bs=50M count=1
+    $ git annex add foo
+    $ git commit -m "foo added"
+    $ git annex unlock foo
+    $ echo "modification" >> foo
+    $ git annex add foo
+    $ git -m commit "modification 1 of foo"
+    $ echo "another modification" >> foo
+    $ git annex add foo
+    $ git -m commit "modification 2 of foo"
+
+I would have expected ending up with a full copy of foo, and a delta storage for the first version and the first modification. Instead, three full-sized copies are created within the .git/annex/objects directory, even though the modifications only added a few characters.
+
+Is there any way to not always store a full copy of each file for each modification, but only a delta?

diff --git a/doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree.mdwn b/doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree.mdwn
new file mode 100644
index 0000000..faa2d30
--- /dev/null
+++ b/doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree.mdwn
@@ -0,0 +1,27 @@
+### Please describe the problem.
+If using git annex with external .git dir webapp report a tread crashed and ever trying to restart it crash again and webapp is not able to upload/download/sync (also the download of git-annex updates is affected)
+
+### What steps will reproduce the problem?
+
+
+### What version of git-annex are you using? On what operating system?
+
+git-annex version: 5.20150113-gcf247cf
+build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV Inotify DBus DesktopNotify XMPP DNS Feeds Quvi TDFA CryptoHash
+key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL
+remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+
+Precompiled tarball from official git-annex download site
+
+Gentoo linux
+
+### Please provide any additional information below.
+
+[[!format sh """
+
+Launching web browser on file://../.git_annex_repos/pippo.git/annex/webapp.html      <-- note wrong path! should be /home/gioacchino/.git_annex_repos/pippo.git/annex/webapp.html
+
+RemoteControl crashed: user error (nice ["ionice","-c3","/home/gioacchino/opt/git-annex.linux/git-annex","remotedaemon"] exited 1)
+
+WebApp crashed: <file descriptor: 11>: hPutStr: illegal operation (handle is closed
+"""]]

rework Differences data type
Eliminated complexity and future proofed. The most important change is that
all functions over Difference are now total; any Difference that can be
expressed should be handled. Avoids needs for sanity checking of inputs,
and version skew with the future.
Also, the difference.log now serializes a [Difference], not a Differences.
This saves space and keeps it simpler.
Note that [Difference] might contain conflicting differences (eg,
[Version5, Version6]. In this case, one of them needs to consistently win
over the others, probably based on Ord.
diff --git a/Annex/Difference.hs b/Annex/Difference.hs
index cb363e8..07789e7 100644
--- a/Annex/Difference.hs
+++ b/Annex/Difference.hs
@@ -31,9 +31,7 @@ import qualified Data.Map as M
 setDifferences :: Annex ()
 setDifferences = do
 	u <- getUUID
-	otherds <- either error return 
-		=<< sanityCheckDifferences . allDifferences
-			<$> recordedDifferences
+	otherds <- allDifferences <$> recordedDifferences
 	ds <- mappend otherds . annexDifferences <$> Annex.getGitConfig
 	when (ds /= mempty) $ do
 		ds'@(Differences l) <- ifM (isJust <$> getVersion)
diff --git a/Locations.hs b/Locations.hs
index dcbde4b..ed09622 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -135,7 +135,7 @@ gitAnnexLocation' key r config crippled
 	 -}
 	| Git.repoIsLocalBare r 
 		|| crippled 
-		|| hasDifference (== ObjectHashLower True) (annexDifferences config) =
+		|| hasDifference (== ObjectHashLower) (annexDifferences config) =
 			check $ map inrepo $ annexLocations key
 	{- Non-bare repositories only use hashDirMixed, so
 	 - don't need to do any work to check if the file is
diff --git a/Logs/Difference.hs b/Logs/Difference.hs
index 68d624f..fcebffe 100644
--- a/Logs/Difference.hs
+++ b/Logs/Difference.hs
@@ -24,10 +24,11 @@ import Logs.UUIDBased
 import Logs.Difference.Pure
 
 recordDifferences :: Differences -> UUID -> Annex ()
-recordDifferences differences uuid = do
+recordDifferences (Differences differences) uuid = do
 	ts <- liftIO getPOSIXTime
 	Annex.Branch.change differenceLog $
 		showLog id . changeLog ts uuid (show differences) . parseLog Just
+recordDifferences UnknownDifferences _ = return ()
 
 -- Map of UUIDs that have Differences recorded.
 -- If a new version of git-annex has added a Difference this version
diff --git a/Logs/Difference/Pure.hs b/Logs/Difference/Pure.hs
index 76d995a..bbd4d34 100644
--- a/Logs/Difference/Pure.hs
+++ b/Logs/Difference/Pure.hs
@@ -19,7 +19,7 @@ import Logs.UUIDBased
 
 parseDifferencesLog :: String -> (M.Map UUID Differences)
 parseDifferencesLog = simpleMap 
-	. parseLog (Just . fromMaybe UnknownDifferences . readish)
+	. parseLog (Just . maybe UnknownDifferences Differences . readish)
 
 -- The sum of all recorded differences, across all UUIDs.
 allDifferences :: M.Map UUID Differences -> Differences
diff --git a/Types/Difference.hs b/Types/Difference.hs
index 7d0c282..f92a307 100644
--- a/Types/Difference.hs
+++ b/Types/Difference.hs
@@ -9,123 +9,74 @@ module Types.Difference (
 	Difference(..),
 	Differences(..),
 	getDifferences,
-	sanityCheckDifferences,
 	differenceConfigKey,
 	differenceConfigVal,
 	hasDifference,
 ) where
 
-import Utility.PartialPrelude
 import qualified Git
 import qualified Git.Config
 
 import Data.List
 import Data.Maybe
 import Data.Monoid
-import Control.Applicative
 
 -- Describes differences from the v5 repository format.
 --
--- The serilization is stored in difference.log, so avoid changes that
+-- The serialization is stored in difference.log, so avoid changes that
 -- would break compatability.
 --
--- Not breaking comparability is why a list of Differences is used, rather
+-- Not breaking compatability is why a list of Differences is used, rather
 -- than a sum type. With a sum type, adding a new field for some future
 -- difference would serialize to a value that an older version could not
 -- parse, even if that new field was not used. With the Differences list,
 -- old versions can still parse it, unless the new Difference constructor 
 -- is used.
+--
+-- The constructors intentionally do not have parameters; this is to
+-- ensure that any Difference that can be expressed is supported.
+-- So, a new repository version would be Version6, rather than Version Int.
 data Difference
-	= Version Int
-	| ObjectHashLower Bool
-	| ObjectHashDirectories Int
-	| BranchHashDirectories Int
-	deriving (Show, Read, Ord)
-
-instance Eq Difference where
-	Version a == Version b = a == b
-	ObjectHashLower a == ObjectHashLower b = a == b
-	ObjectHashDirectories a == ObjectHashDirectories b = a == b
-	BranchHashDirectories a == BranchHashDirectories b = a == b
-	_ == _ = False
+	= ObjectHashLower
+	| OneLevelObjectHash
+	| OneLevelBranchHash
+	deriving (Show, Read, Ord, Eq, Enum, Bounded)
 
 data Differences
 	= Differences [Difference]
 	| UnknownDifferences
-	deriving (Show, Read, Ord)
 
 instance Eq Differences where
-	Differences a == Differences b = simplify (defver:a) == simplify (defver:b)
-	_ == _ = False
+	Differences a == Differences b = canon a == canon b
+	_ == _ = False -- UnknownDifferences cannot be equal
 
 instance Monoid Differences where
 	mempty = Differences []
-	mappend (Differences l1) (Differences l2) = Differences (simplify (l1 ++ l2))
+	mappend (Differences l1) (Differences l2) = Differences (canon (l1 ++ l2))
 	mappend _ _ = UnknownDifferences
 
--- This is the default repository version that is assumed when no other one
--- is given. Note that [] == [Version 5]
-defver :: Difference
-defver = Version 5
-
--- Given [Version 6, Version 5], returns [Version 6]
-simplify :: [Difference] -> [Difference]
-simplify = go . sort
-  where
-	go [] = []
-	go (d:[]) = [d]
-	go (d1:d2:ds)
-		| like d1 d2 = go (d2:ds)
-		| otherwise = d1 : go (d2:ds)
-
-	like (Version _) (Version _) = True
-	like _ _ = False
+canon :: [Difference] -> [Difference]
+canon = nub . sort
 
 getDifferences :: Git.Repo -> Differences
-getDifferences r = checksane $ Differences $ catMaybes
-	[ ObjectHashLower 
-		<$> getmaybebool (differenceConfigKey (ObjectHashLower undefined))
-	, ObjectHashDirectories 
-		<$> getmayberead (differenceConfigKey (ObjectHashDirectories undefined))
-	, BranchHashDirectories
-		<$> getmayberead (differenceConfigKey (BranchHashDirectories undefined))
-	]
+getDifferences r = Differences $ catMaybes $
+	map getmaybe [minBound .. maxBound]
   where
-	getmaybe k = Git.Config.getMaybe k r
-	getmayberead k = readish =<< getmaybe k
-	getmaybebool k = Git.Config.isTrue =<< getmaybe k
-	checksane = either error id . sanityCheckDifferences
+	getmaybe d = case Git.Config.isTrue =<< Git.Config.getMaybe (differenceConfigKey d) r of
+		Just True -> Just d
+		_ -> Nothing
 
 differenceConfigKey :: Difference -> String
-differenceConfigKey (Version _) = "annex.version"
-differenceConfigKey (ObjectHashLower _) = tunable "objecthashlower"
-differenceConfigKey (ObjectHashDirectories _) = tunable "objecthashdirectories"
-differenceConfigKey (BranchHashDirectories _) = tunable "branchhashdirectories"
+differenceConfigKey ObjectHashLower = tunable "objecthashlower"
+differenceConfigKey OneLevelObjectHash = tunable "objecthash1"
+differenceConfigKey OneLevelBranchHash = tunable "branchhash1"
 
 differenceConfigVal :: Difference -> String
-differenceConfigVal (Version v) = show v
-differenceConfigVal (ObjectHashLower b) = Git.Config.boolConfig b
-differenceConfigVal (ObjectHashDirectories n) = show n
-differenceConfigVal (BranchHashDirectories n) = show n
+differenceConfigVal _ = Git.Config.boolConfig True
 
 tunable :: String -> String
 tunable k = "annex.tune." ++ k
 
-sanityCheckDifferences :: Differences -> Either String Differences
-sanityCheckDifferences d@(Differences l)
-	| null problems = Right d
-	| otherwise = Left (intercalate "; " problems)
-  where
-	problems = catMaybes (map check l)
-	check (ObjectHashDirectories n)
-		| n == 1 || n == 2 = Nothing

(Diff truncated)
Added a comment: Replies to questions
diff --git a/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server/comment_1_871b5a42f1134a059df520993bb55268._comment b/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server/comment_1_871b5a42f1134a059df520993bb55268._comment
new file mode 100644
index 0000000..3534675
--- /dev/null
+++ b/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server/comment_1_871b5a42f1134a059df520993bb55268._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ subject="Replies to questions"
+ date="2015-01-28T05:34:16Z"
+ content="""
+1. Yes, see [[/preferred content]].
+2. Every time you change a file, git-annex stores that version of it indefinitely, until manually dropped or automatically expired by the git annex assistant daemon.  So every time you checked out a branch or made a commit or whatever, you'd be cluttering your annex with many different versions of the same files.  Since git is a pretty good way of keeping track of versions of files, and indeed syncing with other machines using `git push` and `git pull`, why would you want to put your git repos into another synchronisation system?  (You can certainly tar up your git repos and put them in your annex as a backup.)
+3. Git-annex can run on Android phones but there is no iOS app.  You could have some other app uploading to the server, and then the git-annex assistant could watch the directory the files were being uploaded to and automatically add the files to the annex and sync it to your workstation.
+4. If it's just a normal git remote then you can access it in the usual ways.  Special remotes generally either lack knowledge of the names of your files, or this information is stored opaquely in git.  That means that access via e.g. WebDAV would only let you see your files organised by SHA checksum which would be useless.  So you'd want the git-annex remote you were accessing with a non-git interface to be a normal git remote, not a special remote.
+5. I think that Joey Hess wrote that git-annex is not a backup system to mean that what it does is quite different to something like duplicity, and also to mean that if you just install git-annex and create a repository, nothing is actually being backed up at all: you've got to manually add a remote, and instruct git-annex to send stuff there.  You can certainly use git-annex to backup so long as you understand to what extent it is doing so.
+"""]]

diff --git a/doc/forum/User_name_with_whitespace_not_working_with___34____40__+__41___Local_computer__34__.mdwn b/doc/forum/User_name_with_whitespace_not_working_with___34____40__+__41___Local_computer__34__.mdwn
new file mode 100644
index 0000000..45880d2
--- /dev/null
+++ b/doc/forum/User_name_with_whitespace_not_working_with___34____40__+__41___Local_computer__34__.mdwn
@@ -0,0 +1,7 @@
+When using the "(+) Local computer" feature, I get the error message
+
+Internal Server Error: wrong number of words in ssh public key
+
+This is due to the use of pattern matching in this line https://github.com/RichiH/git-annex/blob/master/Assistant/Ssh.hs#L73 and because the key comment contains spaces. And of course it cotains spaces, on windows people often use their full name as user name. I will fill a bug later.
+
+My question is, how can I work around this bug? The client with this public key is running windows. How can I influence or at least see how this public key looks like? I could not find any documentation on this.

diff --git a/doc/design/v6.mdwn b/doc/design/v6.mdwn
index 29ceb98..3faeb20 100644
--- a/doc/design/v6.mdwn
+++ b/doc/design/v6.mdwn
@@ -56,6 +56,8 @@ Possible reasons to make changes:
   Presumably, removing the yY would also speed it up, unless there are too
   many objects and the filesystem gets slow w/o the hash directories.
 
+* Removing a directory level would also reduce disk usage, see [[forum/scalability_with_lots_of_files/]] for more info.
+
 ## git-annex branch changes
 
 This might involve, eg, rethinking the xxx/yyy/ hash directories used

devbog
diff --git a/doc/devblog/day_248__workload_tuning.mdwn b/doc/devblog/day_248__workload_tuning.mdwn
new file mode 100644
index 0000000..4e106ef
--- /dev/null
+++ b/doc/devblog/day_248__workload_tuning.mdwn
@@ -0,0 +1,54 @@
+Today I put together a lot of things I've been thinking about:
+
+* There's some evidence that git-annex needs tuning to handle some unusual
+  repositories. In particular very big repositories might benefit from
+  different object hashing.
+* It's really hard to handle [[upgrades]] that change the fundamentals of
+  how git-annex repositories work. Such an upgrade would need every
+  git-annex user to upgrade their repository, and would be very painful.
+  It's hard to imagine a change that is worth that amount of pain.
+* There are other changes some would like to see (like lower-case object
+  hash directory names) that are certianly not enough to warrant a flag
+  day repo format upgrade.
+* It would be nice to let people who want to have some flexability to play
+  around with changes, in their own repos, as long as they don't a)
+  make git-annex a lot more complicated, or b) negatively impact others.
+  (Without having to fork git-annex.)
+
+This is discussed in more depth in [[design/v6]].
+
+The solution, which I've built today, is support for
+[[tuning]] settings, when a new repository is first created. The resulting
+repository will be different in some significant way from a default
+git-annex repository, but git-annex will support it just fine. 
+
+The main limitations are:
+
+* You can't change the tuning of an existing repository
+  (unless a tool gets written to transition it).
+* You absolutely don't want to merge repo B, which has been tuned in
+  nonstandard ways, into repo A which has not. Or A into B. (Unless you like
+  watching slow motion car crashes.)
+
+I built all the infrastructure for this today. Basically, the git-annex
+branch gets a record of all tunings that have been applied, and they're
+automatically propigated to new clones of a repository.
+
+And I implemented the first tunable setting:
+
+	git -c annex.tune.objecthashlower=true annex init
+
+This is definitely an experimental feature for now.
+`git-annex merge` and similar commands will detect attempts to merge
+between incompatably tuned repositories, and error out. But, there are a
+lot of ways to shoot yourself in the foot if you use this feature:
+
+* Nothing stops `git merge` from merging two incompatable repositories.
+* Nothing stops any version of git-annex older from today from merging
+  either.
+
+Now that the groundwork is laid, I can pretty easily, and inexpensively,
+add more tunable settings. The next two I plan to add are already
+documented, `annex.tune.objecthashdirectories` and 
+`annex.tune.branchhashdirectories`. Most new tunables should take about 4
+lines of code to add to git-annex.

Repository tuning parameters can now be passed when initializing a repository for the first time.
* init: Repository tuning parameters can now be passed when initializing a
repository for the first time. For details, see
http://git-annex.branchable.com/tuning/
* merge: Refuse to merge changes from a git-annex branch of a repo
that has been tuned in incompatable ways.
diff --git a/Annex/AutoMerge.hs b/Annex/AutoMerge.hs
index 92cccc0..f0f183d 100644
--- a/Annex/AutoMerge.hs
+++ b/Annex/AutoMerge.hs
@@ -134,7 +134,7 @@ resolveMerge' (Just us) them u = do
 	
 	makelink key = do
 		let dest = variantFile file key
-		l <- inRepo $ gitAnnexLink dest key
+		l <- calcRepo $ gitAnnexLink dest key
 		replacewithlink dest l
 		stageSymlink dest =<< hashSymlink l
 
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index 2191ec2..c672703 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -49,9 +49,11 @@ import Annex.Perms
 import Logs
 import Logs.Transitions
 import Logs.Trust.Pure
+import Logs.Difference.Pure
 import Annex.ReplaceFile
 import qualified Annex.Queue
 import Annex.Branch.Transitions
+import qualified Annex
 
 {- Name of the branch that is used to store git-annex's information. -}
 name :: Git.Ref
@@ -160,6 +162,7 @@ updateTo pairs = do
 			<$> getLocal transitionsLog
 		unless (null branches) $ do
 			showSideAction merge_desc
+			mapM_ checkBranchDifferences refs
 			mergeIndex jl refs
 		let commitrefs = nub $ fullname:refs
 		unlessM (handleTransitions jl localtransitions commitrefs) $ do
@@ -537,3 +540,11 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
 				apply rest hasher file content' trustmap
 			PreserveFile ->
 				apply rest hasher file content trustmap
+
+checkBranchDifferences :: Git.Ref -> Annex ()
+checkBranchDifferences ref = do
+	theirdiffs <- allDifferences . parseDifferencesLog . decodeBS
+		<$> catFile ref differenceLog
+	mydiffs <- annexDifferences <$> Annex.getGitConfig
+	when (theirdiffs /= mydiffs) $
+		error "Remote repository is tuned in incompatable way; cannot be merged with local repository."
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 73f27fd..a78cf67 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -446,7 +446,7 @@ removeAnnex (ContentLock key) = withObjectLoc key remove removedirect
 		removeInodeCache key
 		mapM_ (resetfile cache) fs
 	resetfile cache f = whenM (sameInodeCache f cache) $ do
-		l <- inRepo $ gitAnnexLink f key
+		l <- calcRepo $ gitAnnexLink f key
 		secureErase f
 		replaceFile f $ makeAnnexLink l
 
diff --git a/Annex/Difference.hs b/Annex/Difference.hs
new file mode 100644
index 0000000..cb363e8
--- /dev/null
+++ b/Annex/Difference.hs
@@ -0,0 +1,60 @@
+{- git-annex repository differences
+ -
+ - Copyright 2015 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Annex.Difference (
+	module Types.Difference,
+	setDifferences,
+) where
+
+import Common.Annex
+import Types.Difference
+import Logs.Difference
+import Config
+import Annex.UUID
+import Logs.UUID
+import Annex.Version
+import qualified Annex
+
+import qualified Data.Map as M
+
+-- Differences are only allowed to be tweaked when initializing a
+-- repository for the first time, and then only if there is not another
+-- known uuid. If the repository was cloned from elsewhere, it inherits
+-- the existing settings.
+--
+-- Must be called before setVersion, so it can check if this is the first
+-- time the repository is being initialized.
+setDifferences :: Annex ()
+setDifferences = do
+	u <- getUUID
+	otherds <- either error return 
+		=<< sanityCheckDifferences . allDifferences
+			<$> recordedDifferences
+	ds <- mappend otherds . annexDifferences <$> Annex.getGitConfig
+	when (ds /= mempty) $ do
+		ds'@(Differences l) <- ifM (isJust <$> getVersion)
+			( do
+				oldds <- recordedDifferencesFor u
+				when (ds /= oldds) $
+					warning $ "Cannot change tunable parameters in already initialized repository."
+				return oldds
+			, if otherds == mempty
+				then ifM (not . null . filter (/= u) . M.keys <$> uuidMap)
+					( do
+						warning "Cannot change tunable parameters in a clone of an existing repository."
+						return mempty
+					, return ds
+					)
+				else if otherds /= ds
+					then do
+						warning "The specified tunable parameters differ from values being used in other clones of this repository."
+						return otherds
+					else return ds
+			)
+		forM_ l $ \d ->
+			setConfig (ConfigKey $ differenceConfigKey d) (differenceConfigVal d)
+		recordDifferences ds' u
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 06d0342..1c733cb 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -86,7 +86,7 @@ stageDirect = do
 		deletegit file
 	
 	stageannexlink file key = do
-		l <- inRepo $ gitAnnexLink file key
+		l <- calcRepo $ gitAnnexLink file key
 		stageSymlink file =<< hashSymlink l
 		void $ addAssociatedFile key file
 
@@ -131,7 +131,7 @@ addDirect file cache = do
 		return False
 	got (Just (key, _)) = ifM (sameInodeCache file [cache])
 		( do
-			l <- inRepo $ gitAnnexLink file key
+			l <- calcRepo $ gitAnnexLink file key
 			stageSymlink file =<< hashSymlink l
 			addInodeCache key cache
 			void $ addAssociatedFile key file
@@ -282,7 +282,7 @@ updateWorkTree d oldref = do
 	 - with the content. -}
 	movein item makeabs k f = unlessM (goodContent k f) $ do
 		preserveUnannexed item makeabs f oldref
-		l <- inRepo $ gitAnnexLink f k
+		l <- calcRepo $ gitAnnexLink f k
 		replaceFile f $ makeAnnexLink l
 		toDirect k f
 	
diff --git a/Annex/Init.hs b/Annex/Init.hs
index 24c5e18..3f27a11 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -27,6 +27,7 @@ import Logs.UUID
 import Logs.Trust.Basic
 import Types.TrustLevel
 import Annex.Version
+import Annex.Difference
 import Annex.UUID
 import Config
 import Annex.Direct
@@ -73,6 +74,7 @@ initialize' = do
 	checkCrippledFileSystem
 	unlessM isBare $
 		hookWrite preCommitHook
+	setDifferences
 	setVersion supportedVersion
 	ifM (crippledFileSystem <&&> not <$> isBare)
 		( do
diff --git a/Annex/View.hs b/Annex/View.hs
index 3a9168f..315cc7d 100644
--- a/Annex/View.hs
+++ b/Annex/View.hs
@@ -354,7 +354,7 @@ applyView' mkviewedfile getfilemetadata view = do
 		let metadata' = getfilemetadata f `unionMetaData` metadata
 		forM_ (genviewedfiles f metadata') $ \fv -> do
 			f' <- fromRepo $ fromTopFilePath $ asTopFilePath fv
-			stagesymlink uh hasher f' =<< inRepo (gitAnnexLink f' k)
+			stagesymlink uh hasher f' =<< calcRepo (gitAnnexLink f' k)
 	go uh hasher f Nothing
 		| "." `isPrefixOf` f = do
 			s <- liftIO $ getSymbolicLinkStatus f
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs
index 2c1addb..3f8debd 100644
--- a/Assistant/Threads/Committer.hs
+++ b/Assistant/Threads/Committer.hs
@@ -352,7 +352,7 @@ handleAdds havelsof delayadd cs = returnWhen (null incomplete) $ do
 	done change mcache file key = liftAnnex $ do
 		logStatus key InfoPresent
 		link <- ifM isDirect

(Diff truncated)
Added a comment: Trusty PPA
diff --git a/doc/install/Ubuntu/comment_14_b511063001af2e2170bef657cf016ff2._comment b/doc/install/Ubuntu/comment_14_b511063001af2e2170bef657cf016ff2._comment
new file mode 100644
index 0000000..472ff67
--- /dev/null
+++ b/doc/install/Ubuntu/comment_14_b511063001af2e2170bef657cf016ff2._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawltxdgYMUK4CMJh3jC8AlegwyoiHA9Ka7o"
+ nickname="Justin"
+ subject="Trusty PPA"
+ date="2015-01-27T18:24:50Z"
+ content="""
+@Dennis, I just got a backport of the latest release (5.20150113) running under trusty.  This was my first attempt at backporting software and it ended up being a fairly big project.  I had to pull in a lot of haskell dependencies from vivid in order to get this to build.
+
+I'll attempt to keep this PPA up-to-date as long as I don't have to do too much more build dep wrangling.
+
+<https://launchpad.net/~jtgeibel/+archive/ubuntu/ppa?field.series_filter=trusty>
+"""]]

better name for difference file
diff --git a/doc/design/v6.mdwn b/doc/design/v6.mdwn
index f7309a6..29ceb98 100644
--- a/doc/design/v6.mdwn
+++ b/doc/design/v6.mdwn
@@ -193,27 +193,27 @@ case hashing.
 
 ## concrete design
 
-Make git-annex:version be used by newer git-annex versions than v5,
+Make git-annex:difference.log be used by newer git-annex versions than v5,
 and by nonstandard configurations.
 
 The file contents will be "timestamp uuid [value, ..]", where value is a
 serialized data type that describes divergence from v5 (since v5 and older
-don't have the git-annex:version file).
+don't have the git-annex:difference.log file).
 
 So, for example, "[Version 6]" could indicate that v6 is being used. Or,
 "[ObjectHashLower True, ObjectHashDirectories 1, BranchHashDirectories 1]"
 indicate a nonstandard configuration on top of v5 (this might turn out to
 be identical to v6; just make the compare equal and no problem).
 
-git-annex merge would check if it's merging in a git-annex:version from
-another repo that doesn't match the git-annex:version of the local repo,
+git-annex merge would check if it's merging in a git-annex:difference.log from
+another repo that doesn't match the git-annex:difference.log of the local repo,
 and abort. git-annex sync (and the assistant) would check the same, but
 before merging master branches either, to avoid a bad merge there.
 
-The git-annex:version of a local repo could be changed by an upgrade
+The git-annex:difference.log of a local repo could be changed by an upgrade
 or some sort of transition. When this happens, the new value is written
 for the uuid of the local repo. git-annex merge would then refuse to merge
-with remote repos until they were also transitioned to the new version.
+with remote repos until they were also transitioned.
 
 (There's perhaps some overlap here with the existing
 git-annex:transitions.log, however the current transitions involve

poll vote (Amazon S3 (done))
diff --git a/doc/design/assistant/polls/prioritizing_special_remotes.mdwn b/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
index 0847d61..3c9de2b 100644
--- a/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
+++ b/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
@@ -6,7 +6,7 @@ locally paired systems, and remote servers with rsync.
 Help me prioritize my work: What special remote would you most like
 to use with the git-annex assistant?
 
-[[!poll open=yes 17 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 10 "Box.com (done)" 74 "My phone (or MP3 player)" 25 "Tahoe-LAFS" 13 "OpenStack SWIFT" 35 "Google Drive"]]
+[[!poll open=yes 18 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 10 "Box.com (done)" 74 "My phone (or MP3 player)" 25 "Tahoe-LAFS" 13 "OpenStack SWIFT" 35 "Google Drive"]]
 
 This poll is ordered with the options I consider easiest to build
 listed first. Mostly because git-annex already supports them and they

poll vote (Amazon S3 (done))
diff --git a/doc/design/assistant/polls/prioritizing_special_remotes.mdwn b/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
index 5dccfca..0847d61 100644
--- a/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
+++ b/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
@@ -6,7 +6,7 @@ locally paired systems, and remote servers with rsync.
 Help me prioritize my work: What special remote would you most like
 to use with the git-annex assistant?
 
-[[!poll open=yes 16 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 10 "Box.com (done)" 74 "My phone (or MP3 player)" 25 "Tahoe-LAFS" 13 "OpenStack SWIFT" 35 "Google Drive"]]
+[[!poll open=yes 17 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 10 "Box.com (done)" 74 "My phone (or MP3 player)" 25 "Tahoe-LAFS" 13 "OpenStack SWIFT" 35 "Google Drive"]]
 
 This poll is ordered with the options I consider easiest to build
 listed first. Mostly because git-annex already supports them and they

concrete design
diff --git a/doc/design/v6.mdwn b/doc/design/v6.mdwn
index aaec302..f7309a6 100644
--- a/doc/design/v6.mdwn
+++ b/doc/design/v6.mdwn
@@ -190,3 +190,42 @@ The former would be more flexible. The latter is simpler.
 The former also lets the user chose *no* hash directories, or 
 choose 2 levels of hash directories while using the (v5 default) mixed
 case hashing.
+
+## concrete design
+
+Make git-annex:version be used by newer git-annex versions than v5,
+and by nonstandard configurations.
+
+The file contents will be "timestamp uuid [value, ..]", where value is a
+serialized data type that describes divergence from v5 (since v5 and older
+don't have the git-annex:version file).
+
+So, for example, "[Version 6]" could indicate that v6 is being used. Or,
+"[ObjectHashLower True, ObjectHashDirectories 1, BranchHashDirectories 1]"
+indicate a nonstandard configuration on top of v5 (this might turn out to
+be identical to v6; just make the compare equal and no problem).
+
+git-annex merge would check if it's merging in a git-annex:version from
+another repo that doesn't match the git-annex:version of the local repo,
+and abort. git-annex sync (and the assistant) would check the same, but
+before merging master branches either, to avoid a bad merge there.
+
+The git-annex:version of a local repo could be changed by an upgrade
+or some sort of transition. When this happens, the new value is written
+for the uuid of the local repo. git-annex merge would then refuse to merge
+with remote repos until they were also transitioned to the new version.
+
+(There's perhaps some overlap here with the existing
+git-annex:transitions.log, however the current transitions involve
+forgetting history/dead remotes and so can be done repeatedly on a
+repository. Also, the current transitions can be performed on remote
+branches before merging them in; that wouldn't work well for version
+changes since those require other changes in the remote repo.)
+
+Not covered:
+
+* git-merge of other branches, such as master (can be fixed by `git annex
+  fix` or `fsck`)
+* Old versions of git-annex will ignore the version file of course,
+  and so merging such repos using them can result in pain.
+

Added a comment
diff --git a/doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment b/doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment
new file mode 100644
index 0000000..ef050ac
--- /dev/null
+++ b/doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment
@@ -0,0 +1,24 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnx8kHW66N3BqmkVpgtXDlYMvr8TJ5VvfY"
+ nickname="Yaroslav"
+ subject="comment 2"
+ date="2015-01-26T19:46:12Z"
+ content="""
+\"... merging repo A(v5) into repo B(v6)? This seems like it would be all to easy for a user to do.\"
+
+it would be easy if two separate repos are inited separately of different versions and then merged.  But how frequent could such situation arise?  I  don't think that it is not that common actually in non git-annex assistant initialized  repositories, especially if \"v6\" (or some other custom) layout would be non-default.
+
+This also somewhat reflects upon \"When it's receiving an object into a mixed v5 and v6 repo, it can't know which location that repo expects the object file to be located in.\" -- how plausible/frequent would be to see a mixed v5/6 repo?
+
+\".annex-version flag file\" -- I think it is a good idea.  (may be even better an .annex/version directory/file to reserve for possibly future other branch-specific, thus not for git-annex branch additions).  Indeed it would take time for repos to acquire it, but imho it is ok, if added automagically by new git-annex versions.  Also it is a tiny price to pay for users who do not really care about \"living on the edge\".    But it also might better be coupled with having git-annex:version (i.e. version file under git-annex branch) describing layout of the git-annex branch since those two are somewhat independent, right?
+
+Also a wild idea to mitigate inconvenience for users happen they migrate repositories from old to new formats: to provide 'git annex compat-layout  [version]' command which, for files with content, would  generate symlinks to files in new format to locations in old, with some command to clean them up  later on (e.g. 'git annex compat-layout --cleanup'). Although inefficient per-se it could be a big convenience since would eliminate need to \"migrate/rewrite\" entire history, while still making it possible to get access to previous versions.  With a handling in hooks could be automated to even hide that from users entirely.  or is there a big culprit I don't see?
+
+
+\"version numbers vs configuration\"
+
+having flexibility of configurations, possibly with versions simply providing enumerations to some of them, might be a great feature to have in the long run.  Not sure though if it would not blow up complexity :-/
+
+Overall -- if complete transition to improved/unified v6 is too big of undertaker, allowing for custom non-default configurations while sticking to v5 as the default one and forbidding merges between different versions, could be sufficient to scale up for atypical large uses.  If everyone to migrate to v6 -- more optimal layout should be well thought through to be worthwhile undertaking.
+
+"""]]

diff --git a/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server.mdwn b/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server.mdwn
new file mode 100644
index 0000000..7291bd4
--- /dev/null
+++ b/doc/forum/Beginners_questions:_limit_content_on_special_remotes___38___use_non-git_clients_for_r__47__w_access_on_shared_git-annex_server.mdwn
@@ -0,0 +1,13 @@
+Hi!
+
+I just discovered *git-annex* as a great way to move away from Dropbox, but there are some open questions I couldn't find answers for and hope someone will be able to answer them here:
+
+I didn't completely understand how remotes are treated. As far as I understand there are two different parts to sync, the metadata (which is stored in a regular git repository) and the regular file data (or only chunks of it?). When syncing, I can choose whether I want to only sync the git (-metadata) part, or if I want to include the file contents, right?
+
+1. Is it possible to sync only a *part* of the file contents to certain remotes? For example I would want all my ebooks and photos to be synced to my remote server, but wouldn't want my private accounting and tax stuff to sync over the internet. 
+2. I have several (regular) git repositories used for e.g. development. Can I store a regular (bare) git repository within a git-annex repository? Does this make sense, or should I (for whatever reason) avoid it?
+3. A great feature of the Dropbox app is the automatic upload of photos taken with my iPhone. I would like to adopt this kind of backup. So considering a remotely accessible server. Is there some way to make use of *special remotes* like WebDAV to allow uploads over a *non-git interface*?
+4. Is there a way to access files (read-only) over a non-git interface from some git-annex remote? So could I access e.g. some pdf document from a git-annex repository, when there is a WebDAV special remote? Or do I just misunderstand the concept of *special remotes*? Is there another (useful) way? Maybe some kind of (remotely accessible) web interface? 
+5. Why is git-annex [not a backup system](http://git-annex.branchable.com/not/)?
+
+Thank you in advance!

diff --git a/doc/forum/.mdwn b/doc/forum/.mdwn
new file mode 100644
index 0000000..7291bd4
--- /dev/null
+++ b/doc/forum/.mdwn
@@ -0,0 +1,13 @@
+Hi!
+
+I just discovered *git-annex* as a great way to move away from Dropbox, but there are some open questions I couldn't find answers for and hope someone will be able to answer them here:
+
+I didn't completely understand how remotes are treated. As far as I understand there are two different parts to sync, the metadata (which is stored in a regular git repository) and the regular file data (or only chunks of it?). When syncing, I can choose whether I want to only sync the git (-metadata) part, or if I want to include the file contents, right?
+
+1. Is it possible to sync only a *part* of the file contents to certain remotes? For example I would want all my ebooks and photos to be synced to my remote server, but wouldn't want my private accounting and tax stuff to sync over the internet. 
+2. I have several (regular) git repositories used for e.g. development. Can I store a regular (bare) git repository within a git-annex repository? Does this make sense, or should I (for whatever reason) avoid it?
+3. A great feature of the Dropbox app is the automatic upload of photos taken with my iPhone. I would like to adopt this kind of backup. So considering a remotely accessible server. Is there some way to make use of *special remotes* like WebDAV to allow uploads over a *non-git interface*?
+4. Is there a way to access files (read-only) over a non-git interface from some git-annex remote? So could I access e.g. some pdf document from a git-annex repository, when there is a WebDAV special remote? Or do I just misunderstand the concept of *special remotes*? Is there another (useful) way? Maybe some kind of (remotely accessible) web interface? 
+5. Why is git-annex [not a backup system](http://git-annex.branchable.com/not/)?
+
+Thank you in advance!

Added a comment: still an issue
diff --git a/doc/bugs/flooding_me_with_ssh_password_prompts/comment_2_4a283ef50351e8c604a1f87aaaee1bb0._comment b/doc/bugs/flooding_me_with_ssh_password_prompts/comment_2_4a283ef50351e8c604a1f87aaaee1bb0._comment
new file mode 100644
index 0000000..2f9fe10
--- /dev/null
+++ b/doc/bugs/flooding_me_with_ssh_password_prompts/comment_2_4a283ef50351e8c604a1f87aaaee1bb0._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="anarcat"
+ subject="still an issue"
+ date="2015-01-26T17:27:25Z"
+ content="""
+this is still a major annoyance here. so much so that i disabled the assistant completely here. i ended up blacklisting myself from my own server... repeatedly.
+"""]]

diff --git a/doc/bugs/git-annex_died_of_signal_11_when_syncing_content.mdwn b/doc/bugs/git-annex_died_of_signal_11_when_syncing_content.mdwn
new file mode 100644
index 0000000..d0781d2
--- /dev/null
+++ b/doc/bugs/git-annex_died_of_signal_11_when_syncing_content.mdwn
@@ -0,0 +1,30 @@
+### Please describe the problem.
+
+git-annex dies of signal 11 when syncing content with Box.
+
+I noticed that the assistant stopped syncing after a few files, so I tried to sync manually through the terminal and saw the error.
+
+### What steps will reproduce the problem?
+
+    $ git annex sync box.com --content
+    commit  ok
+    copy myfile1 (checking box.com...) (to box.com...) 
+    ok                      
+    copy myfile2 (checking box.com...) (to box.com...) 
+    ok                      
+    copy myfile3 (checking box.com...) (to box.com...) 
+    ok                      
+    copy myfile4 (checking box.com...) (to box.com...) 
+    ok                      
+    copy myfile5 (checking box.com...) error: git-annex died of signal 11
+
+The number of files that are copied correctly is quite random, some times it syncs 200 files and other times only 2 or 3.
+
+
+### What version of git-annex are you using? On what operating system?
+
+5.20141125 on Debian Sid (everything install from official packages)
+
+### Please provide any additional information below.
+
+I don't know how to get more details of the problem, I haven't manage to get a more precise error activating logs or verbose mode, if there's anything I can do to debug the problem I'll be more than willing.

clarify question
diff --git a/doc/forum/Error_from_git-annex-shell_on_creation_of_gcrypt_special_remote.mdwn b/doc/forum/Error_from_git-annex-shell_on_creation_of_gcrypt_special_remote.mdwn
index a425360..e38e57c 100644
--- a/doc/forum/Error_from_git-annex-shell_on_creation_of_gcrypt_special_remote.mdwn
+++ b/doc/forum/Error_from_git-annex-shell_on_creation_of_gcrypt_special_remote.mdwn
@@ -1,4 +1,4 @@
-I just created a gcrypt special remote and got an error from `git-annex-shell`, though my local git-annex didn't complain and seemed to think the creation went okay.
+I just created a gcrypt special remote and got an error from (I think) `git-annex-shell`, though my local git-annex didn't complain and seemed to think the creation went okay.
 
     annex $ ga initremote ma type=gcrypt encryption=hybrid gitrepo=ssh://ma/meta/s/spw/local/annex keyid=3B6D411B                                                  
     (merging synced/git-annex into git-annex...)
@@ -23,6 +23,6 @@ I just created a gcrypt special remote and got an error from `git-annex-shell`,
 
 Further `git annex sync ma` runs go off without a hitch and the master branch gets pushed a synced/master, though it didn't get pushed on this initial creation as can be seen from the above output.
 
-Is this a bug?  Do I have anything to worry about?  Thanks.
+Is it a bug that my local git-annex said "ok" when there was an error, or is this just a case of my local git-annex falling back to rsync instead of git-annex-shell because I didn't set up my $PATH properly on the remote?  Should I be worried that my gcrypt repo wasn't set up correctly and thus can't be trusted to hold my annexed data and metadata?  Thanks.
 
-Local git-annex: 5.20141125.  Remote git annex (standalone build): 5.20150113-gcf247cf.
+Local git-annex: 5.20141125.  Remote git-annex (standalone build): 5.20150113-gcf247cf.

created help request
diff --git a/doc/forum/Error_from_git-annex-shell_on_creation_of_gcrypt_special_remote.mdwn b/doc/forum/Error_from_git-annex-shell_on_creation_of_gcrypt_special_remote.mdwn
new file mode 100644
index 0000000..a425360
--- /dev/null
+++ b/doc/forum/Error_from_git-annex-shell_on_creation_of_gcrypt_special_remote.mdwn
@@ -0,0 +1,28 @@
+I just created a gcrypt special remote and got an error from `git-annex-shell`, though my local git-annex didn't complain and seemed to think the creation went okay.
+
+    annex $ ga initremote ma type=gcrypt encryption=hybrid gitrepo=ssh://ma/meta/s/spw/local/annex keyid=3B6D411B                                                  
+    (merging synced/git-annex into git-annex...)
+    (Recording state in git...)
+    initremote ma (encryption setup) (hybrid cipher with gpg key 0F56D0553B6D411B) gcrypt: Development version -- Repository format MAY CHANGE
+    gcrypt: Repository not found: ssh://ma/meta/s/spw/local/annex
+    gcrypt: Development version -- Repository format MAY CHANGE
+    gcrypt: Repository not found: ssh://ma/meta/s/spw/local/annex
+    gcrypt: Setting up new repository
+    gcrypt: Remote ID is :id:icUy+qU392R5L5H7g8Yk
+    Counting objects: 111456, done.
+    Compressing objects: 100% (74045/74045), done.
+    Total 111456 (delta 59312), reused 85857 (delta 33717)
+    gcrypt: Encrypting to:  -r 0F56D0553B6D411B
+    gcrypt: Requesting manifest signature
+    To gcrypt::ssh://ma/meta/s/spw/local/annex
+     * [new branch]      git-annex -> git-annex
+    fatal: What do you think I am? A shell?
+    git-annex-shell: git-shell failed
+    ok
+    (Recording state in git...)
+
+Further `git annex sync ma` runs go off without a hitch and the master branch gets pushed a synced/master, though it didn't get pushed on this initial creation as can be seen from the above output.
+
+Is this a bug?  Do I have anything to worry about?  Thanks.
+
+Local git-annex: 5.20141125.  Remote git annex (standalone build): 5.20150113-gcf247cf.

Added a comment: Proposed resolution
diff --git a/doc/bugs/Forcing_https_for_Google_cloud_storage_remote__63__/comment_1_93183de95cc5c99a15eacbade19873ef._comment b/doc/bugs/Forcing_https_for_Google_cloud_storage_remote__63__/comment_1_93183de95cc5c99a15eacbade19873ef._comment
new file mode 100644
index 0000000..66856a3
--- /dev/null
+++ b/doc/bugs/Forcing_https_for_Google_cloud_storage_remote__63__/comment_1_93183de95cc5c99a15eacbade19873ef._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkXzY87FdO942LR-qNyJFeCth0LjWORNuw"
+ nickname="Rob"
+ subject="Proposed resolution"
+ date="2015-01-24T17:18:14Z"
+ content="""
+see [my other bug](https://git-annex.branchable.com/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/) for a proposed resolution: a GCS-optimized external special remote
+"""]]

Added a comment: proposed resolution
diff --git a/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_2_71e3fb544914c1924f8517173371c205._comment b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_2_71e3fb544914c1924f8517173371c205._comment
new file mode 100644
index 0000000..2d91612
--- /dev/null
+++ b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_2_71e3fb544914c1924f8517173371c205._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkXzY87FdO942LR-qNyJFeCth0LjWORNuw"
+ nickname="Rob"
+ subject="proposed resolution"
+ date="2015-01-24T17:10:20Z"
+ content="""
+I believe that I could write an external special remote to enable a full GCS feature set to resolve this. I'll do this. If someone has already done so, please add to the comments.
+"""]]

Added a comment: Ubuntu Trusty 14.04
diff --git a/doc/install/Ubuntu/comment_13_7964374bb2332940677eea570bdb0b69._comment b/doc/install/Ubuntu/comment_13_7964374bb2332940677eea570bdb0b69._comment
new file mode 100644
index 0000000..25ac3e3
--- /dev/null
+++ b/doc/install/Ubuntu/comment_13_7964374bb2332940677eea570bdb0b69._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawntodrSgODU27WUCyN2PV7TC14YMkyaoxQ"
+ nickname="Dennis"
+ subject="Ubuntu Trusty 14.04"
+ date="2015-01-24T03:20:48Z"
+ content="""
+I am searching for current packages for Ubuntu Trusty 14.04. The version shipped is 5.20140412ubuntu1, but I would like to try a more recent version to see if an issue I experience still persists. Is there any up-to-date PPA available for Trusty?
+"""]]

Added a comment: Ubuntu Trusty 14.04
diff --git a/doc/forum/Ubuntu_PPA/comment_8_feecd478a4d44cb5ffc7020c646174ba._comment b/doc/forum/Ubuntu_PPA/comment_8_feecd478a4d44cb5ffc7020c646174ba._comment
new file mode 100644
index 0000000..51fde1f
--- /dev/null
+++ b/doc/forum/Ubuntu_PPA/comment_8_feecd478a4d44cb5ffc7020c646174ba._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawntodrSgODU27WUCyN2PV7TC14YMkyaoxQ"
+ nickname="Dennis"
+ subject="Ubuntu Trusty 14.04"
+ date="2015-01-24T03:19:41Z"
+ content="""
+I am running into the same issue with Ubuntu Trusty 14.04. The version shipped is 5.20140412ubuntu1, but I would like to try a more recent version to see if an issue I experience still persists. Is there any up-to-date PPA available for Trusty?
+"""]]

diff --git a/doc/bugs/Configuring_metadata_view_filenames.mdwn b/doc/bugs/Configuring_metadata_view_filenames.mdwn
new file mode 100644
index 0000000..220c470
--- /dev/null
+++ b/doc/bugs/Configuring_metadata_view_filenames.mdwn
@@ -0,0 +1 @@
+Currently, in a git annex view, filenames take the form basename%path%.ext. I understand that this is a carefully drafted mapping to allow changes to be merged back into metadata. However, maybe it would be possible to make the separator ('%') and the order (e.g. path%basename.ext instead) configurable?

Added a comment: RE: last comment
diff --git a/doc/tips/using_Amazon_S3/comment_12_d00472bf4ac5f7b2212073c081ba04c2._comment b/doc/tips/using_Amazon_S3/comment_12_d00472bf4ac5f7b2212073c081ba04c2._comment
new file mode 100644
index 0000000..9494e11
--- /dev/null
+++ b/doc/tips/using_Amazon_S3/comment_12_d00472bf4ac5f7b2212073c081ba04c2._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawn8d6WBPNtmyeANT-gjlN19QnCTQ0psRPs"
+ nickname="James"
+ subject="RE: last comment"
+ date="2015-01-23T01:02:18Z"
+ content="""
+RE: my last comment
+
+The reason I couldn't get it to work is because I didn't have proper read access to the bucket. My bad for not checking first but it would be great it there was a clearer error message from git-annex and/or a way to get more detailed information on the s3 extension (-d doesn't do much).
+
+Regardless git-annex is pretty cool, thanks to all the maintainers for their hard work.
+"""]]

Added a comment
diff --git a/doc/tips/using_Amazon_S3/comment_11_70b4e62aabb93d078811cbdcd3cced20._comment b/doc/tips/using_Amazon_S3/comment_11_70b4e62aabb93d078811cbdcd3cced20._comment
new file mode 100644
index 0000000..6789086
--- /dev/null
+++ b/doc/tips/using_Amazon_S3/comment_11_70b4e62aabb93d078811cbdcd3cced20._comment
@@ -0,0 +1,24 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawn8d6WBPNtmyeANT-gjlN19QnCTQ0psRPs"
+ nickname="James"
+ subject="comment 11"
+ date="2015-01-22T22:16:46Z"
+ content="""
+Even after enableremote I can't get from s3.
+
+
+	get Docs.zip (from s3...)
+
+	  Unable to access these remotes: s3
+
+	  Try making some of these repositories available:
+	  	02b4e373-02b1-42b9-8285-c353c047895c -- my laptop
+	   	f287b4f7-4e5a-4734-bd6b-62b1f4498838 -- [s3]
+
+	  (Note that these git remotes have annex-ignore set: origin)
+	failed
+	git-annex: get: 1 failed
+
+
+This is after all branches are pushed from my original repo. Any suggestions?
+"""]]

Added a comment
diff --git a/doc/sync/comment_17_44a4ae4685c4bf2b4e7c61897eb3ff80._comment b/doc/sync/comment_17_44a4ae4685c4bf2b4e7c61897eb3ff80._comment
new file mode 100644
index 0000000..ac808ef
--- /dev/null
+++ b/doc/sync/comment_17_44a4ae4685c4bf2b4e7c61897eb3ff80._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawm_YXzEdPHzbSGVwtmTR7g1BqDtTnIBB5s"
+ nickname="Matthias"
+ subject="comment 17"
+ date="2015-01-22T22:04:09Z"
+ content="""
+git sync … >> fetches from each remote
+
+Well, I have two git annex-ed repositories where \"git remote -v\" properly lists the other repo, and \"git annex sync foo\" manages to pull from foo, but \"git annex sync\" without a remote name simply does a local sync. Also, neither command pushes anything anywhere.
+
+So, where does \"git annex\" get its list of remotes from? What could prevent it from accessing them?
+
+
+"""]]

Added a comment: S3 special remote?
diff --git a/doc/tips/centralized_git_repository_tutorial/comment_3_8894229043935e70089caf67f0cc4ddb._comment b/doc/tips/centralized_git_repository_tutorial/comment_3_8894229043935e70089caf67f0cc4ddb._comment
new file mode 100644
index 0000000..b0324d4
--- /dev/null
+++ b/doc/tips/centralized_git_repository_tutorial/comment_3_8894229043935e70089caf67f0cc4ddb._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawn8d6WBPNtmyeANT-gjlN19QnCTQ0psRPs"
+ nickname="James"
+ subject="S3 special remote?"
+ date="2015-01-22T21:52:13Z"
+ content="""
+Is it possible to use special remotes (like S3) with this centralized method?
+
+Public web content works fine, but I've had no luck with S3.
+"""]]

Added a comment: Process seems to hang on Synology
diff --git a/doc/tips/Synology_NAS_and_git_annex/comment_4_b04a1245378d3580432e85dff8eefdec._comment b/doc/tips/Synology_NAS_and_git_annex/comment_4_b04a1245378d3580432e85dff8eefdec._comment
new file mode 100644
index 0000000..b0eb9bd
--- /dev/null
+++ b/doc/tips/Synology_NAS_and_git_annex/comment_4_b04a1245378d3580432e85dff8eefdec._comment
@@ -0,0 +1,26 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnjDzZkA6SzZHgT5_Jy3Rw3s7m_W3-oNLY"
+ nickname="Antoni"
+ subject="Process seems to hang on Synology"
+ date="2015-01-22T20:18:12Z"
+ content="""
+I think I've completed the setup correctly, as I
+
+* am able to execute git-annex-shell on the server
+* locally running ``git-annex sync`` triggers the git-annex process on the server
+
+However, once I provide the password to the key on my local machine, nothing seemingly happens - there is no output after the password prompt.
+
+The repository I'm trying to sync with the remote on the server is ~200 mb and is in my lan.
+
+When monitoring the remote server, I see the following in process being triggered:
+
+````
+31433 31431 amk      D     656m270.7  7.1 /volume1/homes/amk/bin/git-annex.linux//lib/ld-linux.so.3 --library-path /volume1/homes/amk/bin/git-annex.linux//etc/ld.so.conf.d:/volume1/homes/amk/bin/git-annex.linux//usr/lib/arm-linux-gnueabi/audit:/volume1/homes/amk/bin/git-annex.linux//usr/lib/arm-linux-gnueabi/gconv:/volume1/homes/amk/bin/git-annex.linux//usr/lib:/volume1/homes/amk/bin/git-annex.linux//usr/lib/arm-linux-gnueabi:/volume1/homes/amk/bin/git-annex.linux//lib:/volume1/homes/amk/bin/git-annex.linux//lib/arm-linux-gnueabi: /volume1/homes/amk/bin/git-annex.linux/shimmed/git-annex-shell/git-annex-shell -c git-annex-shell 'configlist' '/volume1/homes/amk/archive/annex'
+````
+
+The memory usage goes up graudally, reaching well over 200mb, hogging the cpu significantly. I have never used git-annex before, so I'm not sure what else I should be looking for. This is what the server runs on:
+``armv7l GNU/Linux synology_armada370_214se``
+
+Is this an issue caused by the host architecture mismatch? 
+"""]]

Remove commas
diff --git a/doc/use_case/Bob.mdwn b/doc/use_case/Bob.mdwn
index 7a90cdd..b6e9cae 100644
--- a/doc/use_case/Bob.mdwn
+++ b/doc/use_case/Bob.mdwn
@@ -19,7 +19,7 @@ even if the world has forgotten about git-annex and git.
 <small>[[more about future-proofing|future_proofing]]</small>
 
 Run in a cron job, git-annex adds new files to archival drives at night. It
-also helps Bob keep track of intentional, and unintentional copies of
-files, and logs information he can use to decide when it's time to duplicate
+also helps Bob keep track of intentional and unintentional copies of
+files and logs information he can use to decide when it's time to duplicate
 the content of old drives.  
 <small>[[more about backup copies|copies]]</small>

correction
diff --git a/doc/design/v6.mdwn b/doc/design/v6.mdwn
index 3a3bce7..aaec302 100644
--- a/doc/design/v6.mdwn
+++ b/doc/design/v6.mdwn
@@ -46,7 +46,7 @@ Possible reasons to make changes:
   problems.
 
 * The hash directories, and also the per-key directories
-  can slow down using a repository on a non-SSD disk.
+  can slow down using a repository on a disk (both SSD and spinning).
   
   <https://github.com/datalad/datalad/issues/32>
 

addurl: When a Content-Disposition header suggests a filename to use, addurl will consider using it, if it's reasonable and doesn't conflict with an existing file. (--file overrides this)
diff --git a/Assistant/Restart.hs b/Assistant/Restart.hs
index 97281f8..282e77f 100644
--- a/Assistant/Restart.hs
+++ b/Assistant/Restart.hs
@@ -96,7 +96,7 @@ newAssistantUrl repo = do
  - warp-tls listens to http, in order to show an error page, so this works.
  -}
 assistantListening :: URLString -> IO Bool
-assistantListening url = catchBoolIO $ fst <$> exists url' def
+assistantListening url = catchBoolIO $ exists url' def
   where
 	url' = case parseURI url of
 		Nothing -> url
diff --git a/Assistant/WebApp/Configurators/IA.hs b/Assistant/WebApp/Configurators/IA.hs
index b118767..38bbc2a 100644
--- a/Assistant/WebApp/Configurators/IA.hs
+++ b/Assistant/WebApp/Configurators/IA.hs
@@ -191,7 +191,7 @@ escapeHeader = escapeURIString (\c -> isUnescapedInURI c && c /= ' ')
 getRepoInfo :: RemoteConfig -> Widget
 getRepoInfo c = do
 	uo <- liftAnnex Url.getUrlOptions
-	exists <- liftIO $ catchDefaultIO False $ fst <$> Url.exists url uo
+	exists <- liftIO $ catchDefaultIO False $ Url.exists url uo
 	[whamlet|
 <a href="#{url}">
   Internet Archive item
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index 9e3aa31..67f883d 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -120,17 +120,16 @@ downloadRemoteFile r relaxed uri file sz = do
 	loguri = setDownloader uri OtherDownloader
 
 startWeb :: Bool -> Maybe FilePath -> Maybe Int -> String -> CommandStart
-startWeb relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI s
+startWeb relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI urlstring
   where
-	(s', downloader) = getDownloader s
-	bad = fromMaybe (error $ "bad url " ++ s') $
-		parseURI $ escapeURIString isUnescapedInURI s'
-	choosefile = flip fromMaybe optfile
+	(urlstring, downloader) = getDownloader s
+	bad = fromMaybe (error $ "bad url " ++ urlstring) $
+		parseURI $ escapeURIString isUnescapedInURI urlstring
 	go url = case downloader of
 		QuviDownloader -> usequvi
 		_ -> 
 #ifdef WITH_QUVI
-			ifM (quviSupported s')
+			ifM (quviSupported urlstring)
 				( usequvi
 				, regulardownload url
 				)
@@ -139,30 +138,44 @@ startWeb relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI s
 #endif
 	regulardownload url = do
 		pathmax <- liftIO $ fileNameLengthLimit "."
-		let file = choosefile $ url2file url pathdepth pathmax
+		urlinfo <- if relaxed
+			then pure $ Url.UrlInfo True Nothing Nothing
+			else Url.withUrlOptions (Url.getUrlInfo urlstring)
+		file <- case optfile of
+			Just f -> pure f
+			Nothing -> case Url.urlSuggestedFile urlinfo of
+				Nothing -> pure $ url2file url pathdepth pathmax
+				Just sf -> do
+					let f = truncateFilePath pathmax $
+						sanitizeFilePath sf
+					ifM (liftIO $ doesFileExist f <||> doesDirectoryExist f)
+						( pure $ url2file url pathdepth pathmax
+						, pure f
+						)
 		showStart "addurl" file
-		next $ performWeb relaxed s' file
+		next $ performWeb relaxed urlstring file urlinfo
 #ifdef WITH_QUVI
-	badquvi = error $ "quvi does not know how to download url " ++ s'
+	badquvi = error $ "quvi does not know how to download url " ++ urlstring
 	usequvi = do
 		page <- fromMaybe badquvi
-			<$> withQuviOptions Quvi.forceQuery [Quvi.quiet, Quvi.httponly] s'
+			<$> withQuviOptions Quvi.forceQuery [Quvi.quiet, Quvi.httponly] urlstring
 		let link = fromMaybe badquvi $ headMaybe $ Quvi.pageLinks page
 		pathmax <- liftIO $ fileNameLengthLimit "."
-		let file = choosefile $ truncateFilePath pathmax $ sanitizeFilePath $
-			Quvi.pageTitle page ++ "." ++ Quvi.linkSuffix link
+		let file = flip fromMaybe optfile $
+			truncateFilePath pathmax $ sanitizeFilePath $
+				Quvi.pageTitle page ++ "." ++ Quvi.linkSuffix link
 		showStart "addurl" file
-		next $ performQuvi relaxed s' (Quvi.linkUrl link) file
+		next $ performQuvi relaxed urlstring (Quvi.linkUrl link) file
 #else
 	usequvi = error "not built with quvi support"
 #endif
 
-performWeb :: Bool -> URLString -> FilePath -> CommandPerform
-performWeb relaxed url file = ifAnnexed file addurl geturl
+performWeb :: Bool -> URLString -> FilePath -> Url.UrlInfo -> CommandPerform
+performWeb relaxed url file urlinfo = ifAnnexed file addurl geturl
   where
-	geturl = next $ isJust <$> addUrlFile relaxed url file
-	addurl = addUrlChecked relaxed url webUUID checkexistssize
-	checkexistssize = Url.withUrlOptions . Url.check url . keySize
+	geturl = next $ isJust <$> addUrlFile relaxed url urlinfo file
+	addurl = addUrlChecked relaxed url webUUID $ \k -> return $
+		(Url.urlExists urlinfo, Url.urlSize urlinfo == keySize k)
 
 #ifdef WITH_QUVI
 performQuvi :: Bool -> URLString -> URLString -> FilePath -> CommandPerform
@@ -189,7 +202,8 @@ addUrlFileQuvi relaxed quviurl videourl file = do
 			 - retained, because the size of a video stream
 			 - might change and we want to be able to download
 			 - it later. -}
-			sizedkey <- addSizeUrlKey videourl key
+			urlinfo <- Url.withUrlOptions (Url.getUrlInfo videourl)
+			let sizedkey = addSizeUrlKey urlinfo key
 			prepGetViaTmpChecked sizedkey Nothing $ do
 				tmp <- fromRepo $ gitAnnexTmpObjectLocation key
 				showOutput
@@ -225,17 +239,17 @@ addUrlChecked relaxed url u checkexistssize key
 					stop
 		)
 
-addUrlFile :: Bool -> URLString -> FilePath -> Annex (Maybe Key)
-addUrlFile relaxed url file = do
+addUrlFile :: Bool -> URLString -> Url.UrlInfo -> FilePath -> Annex (Maybe Key)
+addUrlFile relaxed url urlinfo file = do
 	liftIO $ createDirectoryIfMissing True (parentDir file)
 	ifM (Annex.getState Annex.fast <||> pure relaxed)
-		( nodownload relaxed url file
-		, downloadWeb url file
+		( nodownload relaxed url urlinfo file
+		, downloadWeb url urlinfo file
 		)
 
-downloadWeb :: URLString -> FilePath -> Annex (Maybe Key)
-downloadWeb url file = do
-	dummykey <- addSizeUrlKey url =<< Backend.URL.fromUrl url Nothing
+downloadWeb :: URLString -> Url.UrlInfo -> FilePath -> Annex (Maybe Key)
+downloadWeb url urlinfo file = do
+	dummykey <- addSizeUrlKey urlinfo <$> Backend.URL.fromUrl url Nothing
 	let downloader f _ = do
 		showOutput
 		downloadUrl [url] f
@@ -272,15 +286,9 @@ downloadWith downloader dummykey u url file =
 			liftIO $ createDirectoryIfMissing True (parentDir tmp)
 			downloader tmp p
 
-{- Hits the url to get the size, if available.
- -
- - This is needed to avoid exceeding the diskreserve when downloading,
- - and so the assistant can display a pretty progress bar.
- -}
-addSizeUrlKey :: URLString -> Key -> Annex Key
-addSizeUrlKey url key = do
-	size <- snd <$> Url.withUrlOptions (Url.exists url)
-	return $ key { keySize = size }
+{- Adds the url size to the Key. -}
+addSizeUrlKey :: Url.UrlInfo -> Key -> Key
+addSizeUrlKey urlinfo key = key { keySize = Url.urlSize urlinfo }
 
 cleanup :: UUID -> URLString -> FilePath -> Key -> Maybe FilePath -> Annex ()
 cleanup u url file key mtmp = do
@@ -295,19 +303,15 @@ cleanup u url file key mtmp = do
 		Annex.Queue.flush
 	maybe noop (moveAnnex key) mtmp
 
-nodownload :: Bool -> URLString -> FilePath -> Annex (Maybe Key)
-nodownload relaxed url file = do
-	(exists, size) <- if relaxed
-		then pure (True, Nothing)
-		else Url.withUrlOptions (Url.exists url)
-	if exists
-		then do
-			key <- Backend.URL.fromUrl url size
-			cleanup webUUID url file key Nothing
-			return (Just key)
-		else do
-			warning $ "unable to access url: " ++ url
-			return Nothing
+nodownload :: Bool -> URLString -> Url.UrlInfo -> FilePath -> Annex (Maybe Key)
+nodownload relaxed url urlinfo file
+	| Url.urlExists urlinfo = do
+		key <- Backend.URL.fromUrl url (Url.urlSize urlinfo)
+		cleanup webUUID url file key Nothing
+		return (Just key)
+	| otherwise = do
+		warning $ "unable to access url: " ++ url
+		return Nothing
 
 url2file :: URI -> Maybe Int -> Int -> FilePath
 url2file url pathdepth pathmax = case pathdepth of
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index b9d78d7..ed035fa 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -144,7 +144,9 @@ performDownload relaxed cache todownload = case location todownload of
 		rundownload url (takeExtension url) $ \f -> do
 			r <- Remote.claimingUrl url

(Diff truncated)
removed
diff --git a/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_1_b8ad7252ff3bc8c678b6b41fbfe03434._comment b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_1_b8ad7252ff3bc8c678b6b41fbfe03434._comment
deleted file mode 100644
index c16de56..0000000
--- a/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_1_b8ad7252ff3bc8c678b6b41fbfe03434._comment
+++ /dev/null
@@ -1,13 +0,0 @@
-[[!comment format=mdwn
- username="https://www.google.com/accounts/o8/id?id=AItOawkXzY87FdO942LR-qNyJFeCth0LjWORNuw"
- nickname="Rob"
- subject="Additional experiment"
- date="2015-01-22T18:24:34Z"
- content="""
-I tried unuccessfully on GCS DRA bucket gitannex-dra:
-
-    git annex initremote gcs type=S3 chunk=2MiB encryption=none host=storage.googleapis.com bucket=gitannex-dra storageclass=DURABLE_REDUCED_AVAILABILITY
-    initremote gcs (checking bucket...) git-annex: Invalid argument.
-
-
-"""]]

Added a comment: Additional experiment
diff --git a/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_2_94654cd68a183a1d6210aa4ca13aca70._comment b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_2_94654cd68a183a1d6210aa4ca13aca70._comment
new file mode 100644
index 0000000..2420e3d
--- /dev/null
+++ b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_2_94654cd68a183a1d6210aa4ca13aca70._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkXzY87FdO942LR-qNyJFeCth0LjWORNuw"
+ nickname="Rob"
+ subject="Additional experiment"
+ date="2015-01-22T18:26:17Z"
+ content="""
+I tried unuccessfully on GCS DRA bucket gitannex-dra:
+
+    git annex initremote gcs type=S3 chunk=2MiB encryption=none host=storage.googleapis.com bucket=gitannex-dra storageclass=DURABLE_REDUCED_AVAILABILITY
+    initremote gcs (checking bucket...) git-annex: Invalid argument.
+
+
+"""]]

Added a comment: Additional experiment
diff --git a/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_1_b8ad7252ff3bc8c678b6b41fbfe03434._comment b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_1_b8ad7252ff3bc8c678b6b41fbfe03434._comment
new file mode 100644
index 0000000..c16de56
--- /dev/null
+++ b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__/comment_1_b8ad7252ff3bc8c678b6b41fbfe03434._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkXzY87FdO942LR-qNyJFeCth0LjWORNuw"
+ nickname="Rob"
+ subject="Additional experiment"
+ date="2015-01-22T18:24:34Z"
+ content="""
+I tried unuccessfully on GCS DRA bucket gitannex-dra:
+
+    git annex initremote gcs type=S3 chunk=2MiB encryption=none host=storage.googleapis.com bucket=gitannex-dra storageclass=DURABLE_REDUCED_AVAILABILITY
+    initremote gcs (checking bucket...) git-annex: Invalid argument.
+
+
+"""]]

diff --git a/doc/bugs/Forcing_https_for_Google_cloud_storage_remote__63__.mdwn b/doc/bugs/Forcing_https_for_Google_cloud_storage_remote__63__.mdwn
new file mode 100644
index 0000000..5b0eff5
--- /dev/null
+++ b/doc/bugs/Forcing_https_for_Google_cloud_storage_remote__63__.mdwn
@@ -0,0 +1,29 @@
+### Please describe the problem.
+
+A special remote for Google cloud storage would appear to send the developer keys in the clear. 
+Obviously the content itself can be secured with the encryption but sending the auth keys in
+the clear permits anybody listening (i.e. at a public WiFi access point) to gain r/w access to
+the user's GCS store.
+
+### What steps will reproduce the problem?
+
+Setup a new special remote:
+
+    git annex initremote gcs type=S3 chunk=2MiB encryption=none host=storage.googleapis.com bucket=gitannex
+    ...
+    git move --to=gcs blah
+
+Capture packets. Watch the developer keys go by in the headers. And in this case, see the content too because there's no
+encryption turned on. But I believe that I know how to fix this. 
+
+I tried to persuade `git annex` to use a SSL connection but without encouraging results:
+
+    git annex initremote gcs type=S3 chunk=2MiB port=443 host=storage.googleapis.com bucket=gitannex
+    initremote gcs (checking bucket...) git-annex: ErrorClosed
+
+
+### What version of git-annex are you using? On what operating system?
+
+Debian wheezy, git-annex version: 5.20141024~bpo70+1
+
+### Please provide any additional information below.

removed
diff --git a/doc/forum/gadu_-_git-annex_disk_usage/comment_14_6279f238df5be485f1ac99f75242a325._comment b/doc/forum/gadu_-_git-annex_disk_usage/comment_14_6279f238df5be485f1ac99f75242a325._comment
deleted file mode 100644
index 7746b25..0000000
--- a/doc/forum/gadu_-_git-annex_disk_usage/comment_14_6279f238df5be485f1ac99f75242a325._comment
+++ /dev/null
@@ -1,14 +0,0 @@
-[[!comment format=mdwn
- username="https://www.google.com/accounts/o8/id?id=AItOawkWHj0RxNMfuwvFzo2d-V6vBKOYwW_Fnfk"
- nickname="Andrew"
- subject="Update on determining disk usage"
- date="2015-01-22T06:29:51Z"
- content="""
-I just had a look at this question today as I learn git-annex.  I think the commands have changed since the last comment.  However, there remain several ways to determine disk usage, for example in the folder `Music`
-
-    git annex info Music
-
-but you could also use `du` with
-
-    du --human-readable --dereference Music
-"""]]

Added a comment: Update on determining disk usage
diff --git a/doc/forum/gadu_-_git-annex_disk_usage/comment_14_6279f238df5be485f1ac99f75242a325._comment b/doc/forum/gadu_-_git-annex_disk_usage/comment_14_6279f238df5be485f1ac99f75242a325._comment
new file mode 100644
index 0000000..7746b25
--- /dev/null
+++ b/doc/forum/gadu_-_git-annex_disk_usage/comment_14_6279f238df5be485f1ac99f75242a325._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkWHj0RxNMfuwvFzo2d-V6vBKOYwW_Fnfk"
+ nickname="Andrew"
+ subject="Update on determining disk usage"
+ date="2015-01-22T06:29:51Z"
+ content="""
+I just had a look at this question today as I learn git-annex.  I think the commands have changed since the last comment.  However, there remain several ways to determine disk usage, for example in the folder `Music`
+
+    git annex info Music
+
+but you could also use `du` with
+
+    du --human-readable --dereference Music
+"""]]

Added a comment: Update on determining disk usage
diff --git a/doc/forum/gadu_-_git-annex_disk_usage/comment_13_8e0e86ae716ff018025808f417e1f7f6._comment b/doc/forum/gadu_-_git-annex_disk_usage/comment_13_8e0e86ae716ff018025808f417e1f7f6._comment
new file mode 100644
index 0000000..b62b05a
--- /dev/null
+++ b/doc/forum/gadu_-_git-annex_disk_usage/comment_13_8e0e86ae716ff018025808f417e1f7f6._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkWHj0RxNMfuwvFzo2d-V6vBKOYwW_Fnfk"
+ nickname="Andrew"
+ subject="Update on determining disk usage"
+ date="2015-01-22T06:29:36Z"
+ content="""
+I just had a look at this question today as I learn git-annex.  I think the commands have changed since the last comment.  However, there remain several ways to determine disk usage, for example in the folder `Music`
+
+    git annex info Music
+
+but you could also use `du` with
+
+    du --human-readable --dereference Music
+"""]]

Added a comment
diff --git a/doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment b/doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment
new file mode 100644
index 0000000..9077ead
--- /dev/null
+++ b/doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U"
+ nickname="Richard"
+ subject="comment 1"
+ date="2015-01-22T01:05:56Z"
+ content="""
+My gut feeling for incompatible changes in v6 is to somehow make v5 and below error out on all merges with a v6 repo.
+
+Conversely, v6 git-annex running in v6 repos would transition all data while merging in v5 repos.
+
+As a migration path for existing repos, you could move `git-annex` and `master` to `git-annex_v5` and `master_v5`. Once you are certain all known repos within that repo group are transitioned, either kill the v5 branches automagically or print info on cli/web UI on what needs to be run to get rid of them.
+
+Having several plain git 1+ GiB repos (i.e. without any annex objects), I would love to transition after v6 and the migration paths have been hung a month or three to dry.
+"""]]

thought
diff --git a/doc/design/v6.mdwn b/doc/design/v6.mdwn
index 49a6aca..3a3bce7 100644
--- a/doc/design/v6.mdwn
+++ b/doc/design/v6.mdwn
@@ -163,3 +163,30 @@ by merging with a repo from an old version.
 
 git-annex fsck could also fix up any broken links that do result from the
 inevitable cases where users ignore the docs.
+
+## version numbers vs configuration
+
+A particular annex.version like 5 encompasses a number of somewhat distinct
+things
+
+* git-annex branch layout
+* .git/annex/objects/ layout
+* other git stuff (like eg, the name of the HEAD branch in direct mode)
+
+If the user is specifying at `git annex init` time some nonstandard things
+they want to make the default meet their use case better, that is more
+a matter of configuration than of picking a version. 
+
+For example, we could say that the user is opting out of the second-level
+object hash directories. Or we could say the user is choosing to use v6,
+which is like  v5 except with different object hash directory structure.
+
+	git annex init --config annex.objects.hashdirectories 1 
+		--config annex.objects.hashlower true
+	git annex init --version 6
+
+The former would be more flexible. The latter is simpler. 
+
+The former also lets the user chose *no* hash directories, or 
+choose 2 levels of hash directories while using the (v5 default) mixed
+case hashing.

new page
diff --git a/doc/design/v6.mdwn b/doc/design/v6.mdwn
new file mode 100644
index 0000000..49a6aca
--- /dev/null
+++ b/doc/design/v6.mdwn
@@ -0,0 +1,165 @@
+This page's purpose is to collect and explore plans for a future
+annex.version 6.
+
+There are two major possible changes that could go in v6 or a later
+version that would require a hard migration of git-annex repositories:
+
+1. Changing .git/annex/objects/ paths, as appear in the git-annex symlinks.
+
+2. Changing the layout of the git-annex branch in a substantial way.
+
+## object path changes
+
+Any change in this area requires the user make changes to their master
+branch, any other active branches. Old un-converted tags and other
+historical trees in git would also be broken. This is a pretty bad user
+experience. (And it bloats history with a commit that rewrites everything
+too.
+
+For this reason, any changes in this area have been avoided, going all the
+way back to v2 (2011). 
+
+> git-annex had approximately 3 users at the
+> time of that migration, and as one of them, I can say it was a total PITA.
+--[[Joey]] 
+
+So, there would need to be significant payoffs to justify this change.
+
+Note that changing the hash directories might also change where objects are
+stored in special remotes. Because repos can be offline or expensive to
+migrate (or both -- Glacier!) any such changes need to keep looking in the
+old locations for backwards compatability.
+
+Possible reasons to make changes:
+
+* It's annoyingly inconsistent that git-annex uses a different hash
+  directory layout for non-bare repository (on a non-crippled filesystem)
+  than is used for bare repositories and some special remotes.
+
+  Users occasionally stumble over this difference when messing with
+  internals. The code is somewhat complicated by it. In some cases,
+  git-annex checks both locations (eg, a bare repo defaults to xxx/yyy
+  but really old ones might use xX/yY for some keys).
+
+  The mixed case hash directories have caused trouble on case-insensative
+  filesystems, although that has mostly been papered over to avoid
+  problems.
+
+* The hash directories, and also the per-key directories
+  can slow down using a repository on a non-SSD disk.
+  
+  <https://github.com/datalad/datalad/issues/32>
+
+  Initial benchmarks suggest that going from xX/yY/KEY/OBJ to xX/yY/OBJ
+  directories would improve speed 3x.
+
+  Presumably, removing the yY would also speed it up, unless there are too
+  many objects and the filesystem gets slow w/o the hash directories.
+
+## git-annex branch changes
+
+This might involve, eg, rethinking the xxx/yyy/ hash directories used
+in the git-annex branch.
+
+Would this require a hard version transition? It might be possible to avoid
+one, but then git-annex would have to look in both the old and the new
+place. And if a un-transitioned repo was merged into a transitioned one,
+git-annex would have to look in *both* places, and union merge the two sets
+of data on the fly. This doubles the git-cat-file overhead of every
+operation involving the git-annex branch. So a hard transition would
+probably be best.
+
+Also, note that w/o a hard transition, there's the risk that a old
+git-annex version gets ahold of a git-annex branch created by a new
+git-annex version, and sees only half of the story (the un-transitioned
+files). This could be a very confusing failure mode. It doesn't help that
+the git-annex branch does not currently have any kind of
+version number embedded in it, so the old version of git-annex doesn't even
+have a way to check if it can handle the branch.
+
+Possible reasons to make changes:
+
+* There is a discussion of some possible changes to the hash directories here
+  <https://github.com/datalad/datalad/issues/17#issuecomment-68558319> with a
+  goal of reducing the overhead of the git-annex branch in the overall size
+  of the git-annex repository. 
+  
+  Removing the second-level hash directories might improve performance.
+  It doesn't save much space when a repository is having incremental changes
+  made to it. However, if millions of annexed objects are being added
+  in a single commit, removing the second-level hash directories does save
+  space; it halves the number of tree
+  objects[1](https://github.com/datalad/datalad/issues/17#issuecomment-68759754).
+
+  Also,
+  <https://github.com/datalad/datalad/issues/17#issuecomment-68569727>
+  suggests using xxx/yyy.log, where one log contains information for
+  multiple keys. This would probably improve performance too due to
+  caching, although in some cases git-annex would have to process extra
+  information to get to the info about the key it wants, which hurts
+  performance. The disk usage change of this method has not yet been
+  quantified.
+
+* Another reason to do it would be improving git-annex to use vector clocks,
+  instead of its current assumption that client's clocks are close enough to
+  accurate. This would presumably change the contents of the files.
+
+* While not a sufficient reason on its own, the best practices for file
+  formats in the git-annex branch has evolved over time, and there are some
+  files that have unusual formats for historical reasons. Other files have
+  modern formats, but their parsers have to cope with old versions that
+  have other formats. A hard transition would provide an opportunity to
+  clean up a lot of that.
+
+## living on the edge
+
+Rather than a hard transition, git-annex could add a v6 mode
+that could be optionally enabled when initing a repo for the first time.
+
+Users who know they need that mode could then turn it one, and get the
+benefits, while everyone else avoids a transition that doesn't benefit them
+much.
+
+There could even be multiple modes, with different tradeoffs depending on
+how the repo will be used, its size, etc. Of course that adds complexity.
+
+But the main problem with this idea is, how to avoid the foot shooting
+result of merging repo A(v5) into repo B(v6)? This seems like it would be
+all to easy for a user to do. 
+
+As far as git-annex branch changes go, it might be possible for git-annex
+to paper over the problem by handling both versions in the merged git-annex
+branch, as discussed earlier. But for .git/annex/objects/ changes, there
+does not seem to be a reasonable thing for git-annex to do. When it's
+receiving an object into a mixed v5 and v6 repo, it can't know which
+location that repo expects the object file to be located in. Different
+files in the repo might point to the same object in different locations!
+Total mess. Must avoid this.
+
+Currently, annex.version is a per-local-repo setting. git-annex can't tell 
+if two repos that it's merging have different annex.version's. 
+
+It would be possible to add a git-annex:version file, which would work for
+git-annex branch merging. Ie, `git-annex merge` could detect if different
+git-annex branches have different versions, and refuse to merge them (or
+upgrade the old one before merging it).
+
+Also, that file could be used by git-annex, to automatically set
+annex.version when auto-initing a clone of a repo that was initted with
+a newer than default version.
+
+But git-anex:version won't prevent merging B/master into A's master.
+That merge can be done by git; nothing in git-annex can prevent it.
+
+What we could do is have a .annex-version flag file in the root of the
+repo. Then git merge would at least have a merge conflict. Note that this
+means inflicting the file on all git-annex repos, even ones used by people
+with no intention of living on the edge. And, it would take quite a while
+until all such repos get updated to contain such a file.
+
+Or, we could just document that if you initialize a repo with experimental
+annex.version, you're living on the edge and you can screw up your repo
+by merging with a repo from an old version.
+
+git-annex fsck could also fix up any broken links that do result from the
+inevitable cases where users ignore the docs.

update my email address and homepage url
diff --git a/.mailmap b/.mailmap
index 46423bd..032707e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,6 +1,6 @@
-Joey Hess <joey@kitenet.net> http://joey.kitenet.net/ <joey@web>
-Joey Hess <joey@kitenet.net> http://joeyh.name/ <joey@web>
-Joey Hess <joey@kitenet.net> http://joeyh.name/ <http://joeyh.name/@web>
+Joey Hess <id@joeyh.name> http://joey.kitenet.net/ <joey@web>
+Joey Hess <id@joeyh.name> http://joeyh.name/ <joey@web>
+Joey Hess <id@joeyh.name> http://joeyh.name/ <http://joeyh.name/@web>
 Yaroslav Halchenko <debian@onerussian.com>
 Yaroslav Halchenko <debian@onerussian.com> http://yarikoptic.myopenid.com/ <site-myopenid@web>
 Yaroslav Halchenko <debian@onerussian.com> https://www.google.com/accounts/o8/id?id=AItOawnx8kHW66N3BqmkVpgtXDlYMvr8TJ5VvfY <Yaroslav@web>
diff --git a/Annex.hs b/Annex.hs
index 50c8525..f85c7e0 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -1,6 +1,6 @@
 {- git-annex monad
  -
- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/AutoMerge.hs b/Annex/AutoMerge.hs
index c19011e..92cccc0 100644
--- a/Annex/AutoMerge.hs
+++ b/Annex/AutoMerge.hs
@@ -1,6 +1,6 @@
 {- git-annex automatic merge conflict resolution
  -
- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>
+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index f5c4902..2191ec2 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -1,6 +1,6 @@
 {- management of the git-annex branch
  -
- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Branch/Transitions.hs b/Annex/Branch/Transitions.hs
index 9d306fe..a9c7daa 100644
--- a/Annex/Branch/Transitions.hs
+++ b/Annex/Branch/Transitions.hs
@@ -1,6 +1,6 @@
 {- git-annex branch transitions
  -
- - Copyright 2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/BranchState.hs b/Annex/BranchState.hs
index 9b2f9a0..889a936 100644
--- a/Annex/BranchState.hs
+++ b/Annex/BranchState.hs
@@ -2,7 +2,7 @@
  -
  - Runtime state about the git-annex branch.
  -
- - Copyright 2011-2012 Joey Hess <joey@kitenet.net>
+ - Copyright 2011-2012 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs
index 8a6f10d..1791498 100644
--- a/Annex/CatFile.hs
+++ b/Annex/CatFile.hs
@@ -1,6 +1,6 @@
 {- git cat-file interface, with handle automatically stored in the Annex monad
  -
- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/CheckAttr.hs b/Annex/CheckAttr.hs
index 8eed9e8..46c71fe 100644
--- a/Annex/CheckAttr.hs
+++ b/Annex/CheckAttr.hs
@@ -1,6 +1,6 @@
 {- git check-attr interface, with handle automatically stored in the Annex monad
  -
- - Copyright 2012 Joey Hess <joey@kitenet.net>
+ - Copyright 2012 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/CheckIgnore.hs b/Annex/CheckIgnore.hs
index f2ed935..8d7df1e 100644
--- a/Annex/CheckIgnore.hs
+++ b/Annex/CheckIgnore.hs
@@ -1,7 +1,7 @@
 {- git check-ignore interface, with handle automatically stored in
  - the Annex monad
  -
- - Copyright 2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 60daaab..73f27fd 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -1,6 +1,6 @@
 {- git-annex file content managing
  -
- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>
+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs
index 4392b51..e6a9b5e 100644
--- a/Annex/Content/Direct.hs
+++ b/Annex/Content/Direct.hs
@@ -1,6 +1,6 @@
 {- git-annex file content managing for direct mode
  -
- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>
+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 998849a..06d0342 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -1,6 +1,6 @@
 {- git-annex direct mode
  -
- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>
+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Direct/Fixup.hs b/Annex/Direct/Fixup.hs
index 1348524..793f92e 100644
--- a/Annex/Direct/Fixup.hs
+++ b/Annex/Direct/Fixup.hs
@@ -1,6 +1,6 @@
 {- git-annex direct mode guard fixup
  -
- - Copyright 2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Drop.hs b/Annex/Drop.hs
index c5a3fbe..6f3b956 100644
--- a/Annex/Drop.hs
+++ b/Annex/Drop.hs
@@ -1,6 +1,6 @@
 {- dropping of unwanted content
  -
- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>
+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Environment.hs b/Annex/Environment.hs
index ffdd071..13b52aa 100644
--- a/Annex/Environment.hs
+++ b/Annex/Environment.hs
@@ -1,6 +1,6 @@
 {- git-annex environment
  -
- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs
index 856c681..c6a729a 100644
--- a/Annex/FileMatcher.hs
+++ b/Annex/FileMatcher.hs
@@ -1,6 +1,6 @@
 {- git-annex file matching
  -
- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>
+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
diff --git a/Annex/Hook.hs b/Annex/Hook.hs
index 44542c1..253c77a 100644
--- a/Annex/Hook.hs
+++ b/Annex/Hook.hs

(Diff truncated)
diff --git a/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__.mdwn b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__.mdwn
new file mode 100644
index 0000000..03c80b0
--- /dev/null
+++ b/doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__.mdwn
@@ -0,0 +1,23 @@
+### Please describe the problem.
+
+Git annex's special S3 remote doesn't seem to work with DRA buckets in Google cloud storage.
+
+### What steps will reproduce the problem?
+
+I created a DRA-style bucket in Google cloud storage:
+        
+    gsutil mb gs://gitannex-dra
+
+Then followed [this hint](https://gist.github.com/jterrace/4576324) to
+set up use of GCS. Except that it didn't work:
+
+    git annex initremote gcs type=S3 encryption=none host=storage.googleapis.com port=80 bucket=gitannex-dra
+    initremote gcs (checking bucket...) git-annex: Invalid argument.
+
+### What version of git-annex are you using? On what operating system?
+
+Wheezy, git-annex version: 5.20141024~bpo70+1
+
+### Please provide any additional information below.
+
+There didn't seem to be any extra logs and `--debug` didn't seem to add anything useful.

Added a comment
diff --git a/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_4_3c7a7a0983d3a75a04395141aaf16dbb._comment b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_4_3c7a7a0983d3a75a04395141aaf16dbb._comment
new file mode 100644
index 0000000..fb1c564
--- /dev/null
+++ b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_4_3c7a7a0983d3a75a04395141aaf16dbb._comment
@@ -0,0 +1,33 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnwNDA50ZupMvOgpgDqzDRyu5B-mYlVwa4"
+ nickname="Andreas"
+ subject="comment 4"
+ date="2015-01-21T07:30:51Z"
+ content="""
+This is what I see:
+    
+    ➜  ~  mkdir test
+    ➜  ~  cd test 
+    ➜  test  git init
+    Initialized empty Git repository in /home/deas/test/.git/
+    ➜  test git:(master) 
+    ➜  test git:(master) git annex init
+    init  ok
+    (Recording state in git...)
+    ➜  test git:(master) touch foobar.txt
+    ➜  test git:(master) ✗ git annex  add
+    add foobar.txt ok
+    (Recording state in git...)
+    ➜  test git:(master) ✗ git annex  direct
+    commit  
+    [master (root-commit) a6e3d83] commit before switching to direct mode
+    1 file changed, 1 insertion(+)
+    create mode 120000 foobar.txt
+    ok
+    direct foobar.txt 
+    /home/deas/test/.git/annex/misctmp/tmp6895: rename: does not exist (No such file or directory)
+    
+    leaving this file as-is; correct this problem and run git annex fsck on it
+    direct  ok
+    ➜  test git:(annex/direct/master)
+"""]]

diff --git a/doc/bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created.mdwn b/doc/bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created.mdwn
index 64507a7..76ae364 100644
--- a/doc/bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created.mdwn
+++ b/doc/bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created.mdwn
@@ -4,7 +4,7 @@ I have 2 indirect mode repos, both on network filesystems, that I have only used
 data on one end, then syncing via `git annex sync` and `git annex get`.  The problem
 is that`.nfs` copies are being made for each git annex object data file, e.g:
 
-./.git/annex/objects/34/2x/SHA256E-s4112535690--c5f0e5a8af7bf17dd4a8ca192c8ddfb01fe6ec10908c80cffa5ac64c00e28443.vtk.gz/.nfs0000000006d0018600002147
+`./.git/annex/objects/34/2x/SHA256E-s4112535690--c5f0e5a8af7bf17dd4a8ca192c8ddfb01fe6ec10908c80cffa5ac64c00e28443.vtk.gz/.nfs0000000006d0018600002147`
 
 Reading up on .nfs files, they are generated when "an open file is removed but is still being accessed".
 

diff --git a/doc/bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created.mdwn b/doc/bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created.mdwn
new file mode 100644
index 0000000..64507a7
--- /dev/null
+++ b/doc/bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created.mdwn
@@ -0,0 +1,30 @@
+### Please describe the problem.
+
+I have 2 indirect mode repos, both on network filesystems, that I have only used for adding
+data on one end, then syncing via `git annex sync` and `git annex get`.  The problem
+is that`.nfs` copies are being made for each git annex object data file, e.g:
+
+./.git/annex/objects/34/2x/SHA256E-s4112535690--c5f0e5a8af7bf17dd4a8ca192c8ddfb01fe6ec10908c80cffa5ac64c00e28443.vtk.gz/.nfs0000000006d0018600002147
+
+Reading up on .nfs files, they are generated when "an open file is removed but is still being accessed".
+
+### What steps will reproduce the problem?
+Clone a git annex repo on a network file system,  run 
+`git annex sync` ,
+`git annex drop` ,
+`git annex get` 
+
+### What version of git-annex are you using? On what operating system?
+* git-annex version: 5.20140818-g10bf03a
+* 2.6.34.9-69.fc13.x86_64 fedora 13
+* 2.6.32-279.22.1.el6.x86_64 centOS
+
+### 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.
+"""]]

diff --git a/doc/forum/scalability_with_lots_of_files.mdwn b/doc/forum/scalability_with_lots_of_files.mdwn
new file mode 100644
index 0000000..3bbd877
--- /dev/null
+++ b/doc/forum/scalability_with_lots_of_files.mdwn
@@ -0,0 +1,43 @@
+What is git-annex's [[scalability]] with large (10k+) number of files and a few (~10) repositories?
+
+I have had difficult times maintaining a music archive of around 20k files, spread around 17 repositories.
+
+`ncdu` tells me, of the actual files in the direct repository:
+
+<pre>
+$ ncdu --exclude .git
+ Total disk usage: 109,3GiB  Apparent size: 109,3GiB  Items: 23771
+</pre>
+
+Now looking at the git-annex metadata:
+
+<pre>
+$ time git clone -b git-annex /srv/mp3
+Cloning into 'mp3'...
+done.
+Checking out files: 100% (31207/31207), done.
+0.69user 1.72system 0:04.65elapsed 51%CPU (0avgtext+0avgdata 47732maxresident)k
+40inputs+489552outputs (1major+2906minor)pagefaults 0swaps
+$ git branch
+  annex/direct/master
+* git-annex
+  master
+$ wc -l uuid.log
+7 uuid.log
+$ find -type f | wc
+  31429   62214 3013920
+$ du -sh .
+361M    .
+$ du -sch *  | tail -1
+243M    total
+</pre>
+
+So basically, it looks like the git-annex location tracking takes up around 243M, 361M if we include git's history of it (I assume). This means around 8KiB of storage per file, and 4KiB/file for history (git is doing a pretty good job here). (8KiB kind of makes sense here: one file for the tracking log (4KiB) and another directory to hold it (another 4KiB)...)
+
+Is that about right? Are there ways to compress that somehow? Could I at least drop the *history* of that from git without too much harm - that would already save 120MiB...
+
+That repository is around 18 months old.
+
+(It's interesting to notice the limitation of the "one file per record" storage format here: since git-annex has so many little files, and all of those take at least $blocksize (it seems like it's 4KB here), it takes up space pretty quickly. Another good point for git here: packing files together saves a *lot* of space! Could files be packed *before* being stored in the git-annex branch? or is that totally stupid. :)
+
+Thanks! --[[anarcat]]

devblog
diff --git a/doc/devblog/day_247__hooks_and_large_files_on_windows.mdwn b/doc/devblog/day_247__hooks_and_large_files_on_windows.mdwn
new file mode 100644
index 0000000..59865b3
--- /dev/null
+++ b/doc/devblog/day_247__hooks_and_large_files_on_windows.mdwn
@@ -0,0 +1,30 @@
+Today I got The pre-commit-annex hook working on Windows. It turns out that
+msysgit runs hook scripts even when they're not executable, and it parses
+the #! line itself. Now git-annex does too, on Windows.
+
+Also, added a new chapter to the walkthrough,
+[[walkthrough/using_special_remotes]]. They clearly needed to be mentioned,
+especially to show the workflow of running initremote in one repository,
+then syncing another repository and running enableremote to enable the same
+special remote there.
+
+Then more fun Windows porting! Turns out git-annex on Windows didn't handle
+files > 2 gb correctly; the way it was getting file size 
+[uses a too small data type on Windows](https://github.com/jystic/unix-compat/issues/16).
+Luckily git-annex itself treats all file sizes as unbounded Integers,
+so I was easily able to swap in a `getFileSize` that returns correct
+values for large files.
+
+While I haven't blogged since the 13th and have not been too active until
+today, there are still a number of little improvements that have been done
+here and there.
+
+Including a fix for an interesting bug where the assistant would tell
+the remotedaemon that the network connection has been lost, twice in a row,
+and this would make the remotedeamon fail to reconnect to the remote when
+the network came up. I'm not sure what situation triggers this bug (Maybe
+machines with 2 interfaces? Or maybe a double disconnection event for 1
+interface?), but I was able to reproduce it by sending messages to the
+remotedaemon, and so fixed it.
+
+Backlog is down to 118 messages.

add getFileSize, which can get the real size of a large file on Windows
Avoid using fileSize which maxes out at just 2 gb on Windows.
Instead, use hFileSize, which doesn't have a bounded size.
Fixes support for files > 2 gb on Windows.
Note that the InodeCache code only needs to compare a file size,
so it doesn't matter it the file size wraps. So it has been
left as-is. This was necessary both to avoid invalidating existing inode
caches, and because the code passed FileStatus around and would have become
more expensive if it called getFileSize.
This commit was sponsored by Christian Dietrich.
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 37090d3..60daaab 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -234,8 +234,8 @@ prepGetViaTmpChecked key unabletoget getkey = do
 	tmp <- fromRepo $ gitAnnexTmpObjectLocation key
 
 	e <- liftIO $ doesFileExist tmp
-	alreadythere <- if e
-		then fromIntegral . fileSize <$> liftIO (getFileStatus tmp)
+	alreadythere <- liftIO $ if e
+		then getFileSize tmp
 		else return 0
 	ifM (checkDiskSpace Nothing key alreadythere)
 		( do
diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs
index fb89869..1603974 100644
--- a/Annex/Transfer.hs
+++ b/Annex/Transfer.hs
@@ -132,8 +132,7 @@ runTransfer' ignorelock t file shouldretry a = do
 			liftIO $ readMVar metervar
 		| otherwise = do
 			f <- fromRepo $ gitAnnexTmpObjectLocation (transferKey t)
-			liftIO $ catchDefaultIO 0 $
-				fromIntegral . fileSize <$> getFileStatus f
+			liftIO $ catchDefaultIO 0 $ getFileSize f
 
 type RetryDecider = TransferInfo -> TransferInfo -> Bool
 
diff --git a/Assistant/Repair.hs b/Assistant/Repair.hs
index 50442fe..a978304 100644
--- a/Assistant/Repair.hs
+++ b/Assistant/Repair.hs
@@ -140,8 +140,7 @@ repairStaleGitLocks r = do
 repairStaleLocks :: [FilePath] -> Assistant ()
 repairStaleLocks lockfiles = go =<< getsizes
   where
-	getsize lf = catchMaybeIO $ 
-		(\s -> (lf, fileSize s)) <$> getFileStatus lf
+	getsize lf = catchMaybeIO $ (\s -> (lf, s)) <$> getFileSize lf
 	getsizes = liftIO $ catMaybes <$> mapM getsize lockfiles
 	go [] = return ()
 	go l = ifM (liftIO $ null <$> Lsof.query ("--" : map fst l))
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs
index 26c6ebb..df29df0 100644
--- a/Assistant/Threads/SanityChecker.hs
+++ b/Assistant/Threads/SanityChecker.hs
@@ -225,7 +225,7 @@ checkLogSize :: Int -> Assistant ()
 checkLogSize n = do
 	f <- liftAnnex $ fromRepo gitAnnexLogFile
 	logs <- liftIO $ listLogs f
-	totalsize <- liftIO $ sum <$> mapM filesize logs
+	totalsize <- liftIO $ sum <$> mapM getFileSize logs
 	when (totalsize > 2 * oneMegabyte) $ do
 		notice ["Rotated logs due to size:", show totalsize]
 		liftIO $ openLog f >>= handleToFd >>= redirLog
@@ -237,9 +237,7 @@ checkLogSize n = do
 						checkLogSize (n + 1)
 				_ -> noop
   where
-	filesize f = fromIntegral . fileSize <$> liftIO (getFileStatus f)
-
-	oneMegabyte :: Int
+	oneMegabyte :: Integer
 	oneMegabyte = 1000000
 #endif
 
diff --git a/Assistant/Threads/TransferPoller.hs b/Assistant/Threads/TransferPoller.hs
index 71bfe36..a5b30b4 100644
--- a/Assistant/Threads/TransferPoller.hs
+++ b/Assistant/Threads/TransferPoller.hs
@@ -36,8 +36,7 @@ transferPollerThread = namedThread "TransferPoller" $ do
 		 - temp file being used for the transfer. -}
 		| transferDirection t == Download = do
 			let f = gitAnnexTmpObjectLocation (transferKey t) g
-			sz <- liftIO $ catchMaybeIO $
-				fromIntegral . fileSize <$> getFileStatus f
+			sz <- liftIO $ catchMaybeIO $ getFileSize f
 			newsize t info sz
 		{- Uploads don't need to be polled for when the TransferWatcher
 		 - thread can track file modifications. -}
diff --git a/Backend/Hash.hs b/Backend/Hash.hs
index e50eca5..8ddccd2 100644
--- a/Backend/Hash.hs
+++ b/Backend/Hash.hs
@@ -68,8 +68,7 @@ hashNameE hash = hashName hash ++ "E"
 keyValue :: Hash -> KeySource -> Annex (Maybe Key)
 keyValue hash source = do
 	let file = contentLocation source
-	stat <- liftIO $ getFileStatus file
-	let filesize = fromIntegral $ fileSize stat
+	filesize <- liftIO $ getFileSize file
 	s <- hashFile hash file filesize
 	return $ Just $ stubKey
 		{ keyName = s
@@ -103,7 +102,7 @@ checkKeyChecksum hash key file = do
 	mstat <- liftIO $ catchMaybeIO $ getFileStatus file
 	case (mstat, fast) of
 		(Just stat, False) -> do
-			let filesize = fromIntegral $ fileSize stat
+			filesize <- liftIO $ getFileSize' file stat
 			showSideAction "checksum"
 			check <$> hashFile hash file filesize
 		_ -> return True
diff --git a/Backend/WORM.hs b/Backend/WORM.hs
index bd5e374..24dba57 100644
--- a/Backend/WORM.hs
+++ b/Backend/WORM.hs
@@ -32,11 +32,13 @@ backend = Backend
  -}
 keyValue :: KeySource -> Annex (Maybe Key)
 keyValue source = do
-	stat <- liftIO $ getFileStatus $ contentLocation source
+	let f = contentLocation source
+	stat <- liftIO $ getFileStatus f
+	sz <- liftIO $ getFileSize' f stat
 	relf <- getTopFilePath <$> inRepo (toTopFilePath $ keyFilename source)
 	return $ Just $ stubKey
 		{ keyName = genKeyName relf
 		, keyBackendName = name backend
-		, keySize = Just $ fromIntegral $ fileSize stat
+		, keySize = Just sz
 		, keyMtime = Just $ modificationTime stat
 		}
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 46c1620..5dad101 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -303,8 +303,7 @@ checkKeySizeOr :: (Key -> Annex String) -> Key -> FilePath -> Annex Bool
 checkKeySizeOr bad key file = case Types.Key.keySize key of
 	Nothing -> return True
 	Just size -> do
-		size' <- fromIntegral . fileSize
-			<$> liftIO (getFileStatus file)
+		size' <- liftIO $ getFileSize file
 		comparesizes size size'
   where
 	comparesizes a b = do
diff --git a/Command/Info.hs b/Command/Info.hs
index 36d93a2..86b6089 100644
--- a/Command/Info.hs
+++ b/Command/Info.hs
@@ -490,8 +490,7 @@ staleSize label dirspec = go =<< lift (dirKeys dirspec)
 	keysizes keys = do
 		dir <- lift $ fromRepo dirspec
 		liftIO $ forM keys $ \k -> catchDefaultIO 0 $
-			fromIntegral . fileSize 
-				<$> getFileStatus (dir </> keyFile k)
+			getFileSize (dir </> keyFile k)
 
 aside :: String -> String
 aside s = " (" ++ s ++ ")"
diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs
index 8a80687..424ca92 100644
--- a/Command/RecvKey.hs
+++ b/Command/RecvKey.hs
@@ -62,8 +62,7 @@ start key = fieldTransfer Download key $ \_p ->
 		oksize <- case Types.Key.keySize key of
 		        Nothing -> return True
 		        Just size -> do
-				size' <- fromIntegral . fileSize
-					<$> liftIO (getFileStatus tmp)
+				size' <- liftIO $ getFileSize tmp
 				return $ size == size'
 		if oksize
 			then case Backend.maybeLookupBackendName (Types.Key.keyBackendName key) of
diff --git a/Common.hs b/Common.hs
index 670fc44..9333a19 100644
--- a/Common.hs
+++ b/Common.hs
@@ -30,7 +30,8 @@ import Utility.Monad as X
 import Utility.Data as X
 import Utility.Applicative as X
 import Utility.FileSystemEncoding as X
-import Utility.PosixFiles as X
+import Utility.PosixFiles as X hiding (fileSize)
+import Utility.FileSize as X
 import Utility.Network as X
 
 import Utility.PartialPrelude as X
diff --git a/Limit.hs b/Limit.hs
index 5d58e77..1053547 100644
--- a/Limit.hs
+++ b/Limit.hs
@@ -239,9 +239,7 @@ limitSize vs s = case readSize dataUnits s of
 	checkkey sz key = return $ keySize key `vs` Just sz
 	check _ sz (Just key) = checkkey sz key
 	check fi sz Nothing = do
-		filesize <- liftIO $ catchMaybeIO $
-			fromIntegral . fileSize
-				<$> getFileStatus (relFile fi)
+		filesize <- liftIO $ catchMaybeIO $ getFileSize (relFile fi)
 		return $ filesize `vs` Just sz
 
 addMetaData :: String -> Annex ()
diff --git a/Remote/Git.hs b/Remote/Git.hs
index f015e29..583e9c7 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -563,9 +563,7 @@ rsyncOrCopyFile rsyncparams src dest p =

(Diff truncated)
answer
diff --git a/doc/forum/Two_computers__44___one_networked_repository__44___no_Jabber_-_how_to_setup_sync__63___/comment_1_b90aef011d853ad9feb6f8edc08bf7d9._comment b/doc/forum/Two_computers__44___one_networked_repository__44___no_Jabber_-_how_to_setup_sync__63___/comment_1_b90aef011d853ad9feb6f8edc08bf7d9._comment
new file mode 100644
index 0000000..11e06cd
--- /dev/null
+++ b/doc/forum/Two_computers__44___one_networked_repository__44___no_Jabber_-_how_to_setup_sync__63___/comment_1_b90aef011d853ad9feb6f8edc08bf7d9._comment
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-01-20T19:15:50Z"
+ content="""
+Since Alice and Bob are never online at the same time, you need
+a central git repository somewhere. 
+
+This could be on a linux server, perhaps even with git-annex installed.
+Or, you could just make a repository on github or gitorious. No need
+for git-annex.
+
+Wherever it is, add the central repository as a git remote on Alice and
+Bob, and they'll each use it to drop off the current state of their
+git repo, and sync up with the changes from each other.
+"""]]

comment; this is a dup of the windows long filename bug
diff --git a/doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend.mdwn b/doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend.mdwn
index e68f661..8cf6e4f 100644
--- a/doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend.mdwn
+++ b/doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend.mdwn
@@ -59,3 +59,6 @@ add extras/Extra Content - Reason Drum Takes/Kit Samples/1. Bass Drum mic (BD)/D
 
 # End of transcript or log.
 """]]
+
+> [[done]]; this is a duplicate of the bug referred to in my comment below.
+> --[[Joey]]
diff --git a/doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend/comment_2_c5645988eaf4f7493d70b6a63f21cdaf._comment b/doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend/comment_2_c5645988eaf4f7493d70b6a63f21cdaf._comment
new file mode 100644
index 0000000..6305a4e
--- /dev/null
+++ b/doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend/comment_2_c5645988eaf4f7493d70b6a63f21cdaf._comment
@@ -0,0 +1,18 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2015-01-20T19:09:39Z"
+ content="""
+Seems this does not have to do with special characters at all.
+
+Instead, it's a problem with too-long filenames; windows has a crazy short
+limit. All explained here:
+(http://git-annex.branchable.com/bugs/__34__git-annex:_direct:_1_failed__34___on_Windows)
+
+You could just switch from the WORM backend to one with shorter filenames.
+SHA1 might be a god choice.
+
+Or, install git-annex 5.20150113, which includes some changes to use shorter
+relative paths to files, and may avoid the problem at least some of the
+time. That version also avoids making such long WORM keys.
+"""]]

response
diff --git a/doc/forum/Sync_files_from_remote_to_remote/comment_6_fda62d735035213f2a0b5b2fc95991ab._comment b/doc/forum/Sync_files_from_remote_to_remote/comment_6_fda62d735035213f2a0b5b2fc95991ab._comment
new file mode 100644
index 0000000..9ab809a
--- /dev/null
+++ b/doc/forum/Sync_files_from_remote_to_remote/comment_6_fda62d735035213f2a0b5b2fc95991ab._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 6"""
+ date="2015-01-20T18:51:06Z"
+ content="""
+Remi's idea of using [[preferred_content]] can be made to work.
+
+There's no `git annex copy --from A --to B`. It would need to locally spool
+each file into the current repo, and being an unusual corner case has not
+seemed worth doing so far.
+"""]]

Windows: Fix running of the pre-commit-annex hook.
diff --git a/Annex/Hook.hs b/Annex/Hook.hs
index 4848e2d..44542c1 100644
--- a/Annex/Hook.hs
+++ b/Annex/Hook.hs
@@ -16,7 +16,6 @@ import qualified Git.Hook as Git
 import Config
 import qualified Annex
 import Utility.Shell
-import Utility.FileMode
 
 import qualified Data.Map as M
 
@@ -53,19 +52,16 @@ hookWarning h msg = do
  - the existing hooks are cached. -}
 runAnnexHook :: Git.Hook -> Annex ()
 runAnnexHook hook = do
-	cmd <- fromRepo $ Git.hookFile hook
 	m <- Annex.getState Annex.existinghooks
 	case M.lookup hook m of
-		Just True -> run cmd
+		Just True -> run
 		Just False -> noop
 		Nothing -> do
-			exists <- hookexists cmd
+			exists <- inRepo $ Git.hookExists hook
 			Annex.changeState $ \s -> s
 				{ Annex.existinghooks = M.insert hook exists m }
-			when exists $
-				run cmd
+			when exists run
   where
-	hookexists f = liftIO $ catchBoolIO $
-		isExecutable . fileMode <$> getFileStatus f
-	run cmd = unlessM (liftIO $ boolSystem cmd []) $
-		warning $ cmd ++ " failed"
+	run = unlessM (inRepo $ Git.runHook hook) $ do
+		h <- fromRepo $ Git.hookFile hook
+		warning $ h ++ " failed"
diff --git a/Git/Hook.hs b/Git/Hook.hs
index 6245a29..0ea9fd1 100644
--- a/Git/Hook.hs
+++ b/Git/Hook.hs
@@ -1,15 +1,20 @@
 {- git hooks
  -
- - Copyright 2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2013-2015 Joey Hess <joey@kitenet.net>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
 
+{-# LANGUAGE CPP #-}
+
 module Git.Hook where
 
 import Common
 import Git
 import Utility.Tmp
+#ifndef mingw32_HOST_OS
+import Utility.FileMode
+#endif
 
 data Hook = Hook
 	{ hookName :: FilePath
@@ -56,3 +61,37 @@ expectedContent :: Hook -> Repo -> IO Bool
 expectedContent h r = do
 	content <- readFile $ hookFile h r
 	return $ content == hookScript h
+
+hookExists :: Hook -> Repo -> IO Bool
+hookExists h r = do
+	let f = hookFile h r
+	catchBoolIO $
+#ifndef mingw32_HOST_OS
+		isExecutable . fileMode <$> getFileStatus f
+#else
+		doesFileExist f
+#endif
+
+runHook :: Hook -> Repo -> IO Bool
+runHook h r = do
+	let f = hookFile h r
+	(c, ps) <- findcmd f
+	boolSystem c ps
+  where
+#ifndef mingw32_HOST_OS
+	findcmd = defcmd
+#else
+	{- Like msysgit, parse the first line of the hook file,
+	 - look for "#!", and dispatch the interpreter on the file. -}
+	findcmd f = do
+		l <- headMaybe . lines <$> catchDefaultIO "" (readFile f)
+		case l of
+			Just ('#':'!':rest) -> case words rest of
+				[] -> defcmd f
+				(c:ps) -> do
+					let ps' = map Param (ps ++ [f])
+					ok <- inPath c
+					return (if ok then c else takeFileName c, ps')
+			_ -> defcmd f
+#endif
+	defcmd f = return (f, [])
diff --git a/debian/changelog b/debian/changelog
index 9216968..bdbe266 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ git-annex (5.20150114) UNRELEASED; urgency=medium
   * Fix build failure when wget is not installed.
   * Fix wording of message displayed when unable to get a file that
     is available in untrusted repositories.
+  * Windows: Fix running of the pre-commit-annex hook.
 
  -- Joey Hess <id@joeyh.name>  Tue, 13 Jan 2015 17:03:39 -0400
 
diff --git a/doc/bugs/windows_isExecutable_fail.mdwn b/doc/bugs/windows_isExecutable_fail.mdwn
new file mode 100644
index 0000000..41e5b29
--- /dev/null
+++ b/doc/bugs/windows_isExecutable_fail.mdwn
@@ -0,0 +1,27 @@
+On Windows, isExecutable fails to detect a file that is indeed executable
+as such. This prevents git-annex from running the pre-commit-hook
+on Windows.
+
+getFileStatus yields a fileMode of 100666, which is 
+clearly a dummy mode. Not surprising, since unix-compat is partial stubs
+on windows.
+
+Actually, isExecutable is ok (it needs to check unix modes because it is
+used on file modes coming out of git). But, getFileStatus is the wrong
+thing to be using on Windows to check if a hook exists and is executable.
+
+I don't see anything in Win32 or Win32-extras on hackage that can check 
+executablility. Looking at git's source, it uses `access(path, X_OK) < 0`;
+haskell equivilant is System.Posix.Files.fileAccess, but the version
+in unix-compat has the same problem as checking getFileStatus's fileMode.
+
+I think it's reasonable to assume that if a hook exists on windows, it's
+intended to be executable, and try to run it. Actually, testing with
+msysgit, it runs hooks whether or not they have the execute bit set!
+So, done that now.
+
+However, now git-annex tries to run the hook but fails when it's a shell 
+script because #!/bin/sh is useless on windows. It looks to me like msysgit
+runs "sh hook" to work around that, and it is in fact parsing the shebang
+line and dispatching the interpreter. Ugh. (Also, pre-commit.bat doesn't
+get run.) Ok, added this same hack to git-annex. [[done]] --[[Joey]]
diff --git a/doc/tips/automatically_adding_metadata/comment_6_34f0c55d09ddee3de642f6b25a9f6269._comment b/doc/tips/automatically_adding_metadata/comment_6_34f0c55d09ddee3de642f6b25a9f6269._comment
new file mode 100644
index 0000000..ab5bc7b
--- /dev/null
+++ b/doc/tips/automatically_adding_metadata/comment_6_34f0c55d09ddee3de642f6b25a9f6269._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 6"""
+ date="2015-01-20T17:19:34Z"
+ content="""
+@Michele after testing, git-annex on Windows seems to not see a file that
+does have the executable bit set as executable. I have opened a bug report
+[[bugs/windows_isExecutable_fail]], and worked around the problem now.
+"""]]

close; dup
diff --git a/doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn b/doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn
index f28b351..af9a4a1 100644
--- a/doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn
+++ b/doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn
@@ -13,3 +13,10 @@ Thanks!
 ### What version of git-annex are you using? On what operating system?
 
 git-annex-bin on AUR.
+
+> Many people have reported this as a bug, see
+> <http://git-annex.branchable.com/bugs/Can__39__t_add_a_git_repo_to_git_annex:___34__Invalid_path_repo__47__.git__47__X__34___for_many_X/>
+> 
+> But git simply does not allow
+> storing .git in .git. With good reason IMHO. So this is a duplicate
+> bug report, and I can't fix it. [[done]]. --[[Joey]]

try to coax any useful info out
diff --git a/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_3_4c914d08f473490f2077d76664a7d6dd._comment b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_3_4c914d08f473490f2077d76664a7d6dd._comment
new file mode 100644
index 0000000..600115b
--- /dev/null
+++ b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_3_4c914d08f473490f2077d76664a7d6dd._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2015-01-20T17:05:12Z"
+ content="""
+If you can reproduce the error message, perhaps you can paste it into this
+bug report. At the moment, I have absolutely nothing to go on.
+
+You can download a build of a current version of git-annex from
+[[install/Linux_standalone]] for testing.
+"""]]

retitle original newline bug report to more generic title and close dup
diff --git a/doc/bugs/git_annex_import_fails_on_filenames_with_newlines_in_them.mdwn b/doc/bugs/git_annex_import_fails_on_filenames_with_newlines_in_them.mdwn
index d435f8c..f7b3bf6 100644
--- a/doc/bugs/git_annex_import_fails_on_filenames_with_newlines_in_them.mdwn
+++ b/doc/bugs/git_annex_import_fails_on_filenames_with_newlines_in_them.mdwn
@@ -44,3 +44,4 @@ foo
     Linux durian 3.14-1-amd64 #1 SMP Debian 3.14.9-1 (2014-06-30) x86_64 GNU/Linux
 
 [[!tag confirmed git-bug]]
+[[!title git limitations prevent using git-annex on filenames containing newlines]]
diff --git a/doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn b/doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn
index c1ca60f..5aeff37 100644
--- a/doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn
+++ b/doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn
@@ -63,3 +63,7 @@ zolee@zolee-Latitude-E6440:/media/zolee/Stuff/dell-zoli-git-annex/egyetem/2009-2
 
 # End of transcript or log.
 """]]
+
+> dup of
+> [[git_annex_import_fails_on_filenames_with_newlines_in_them]]; closing as
+> such. [[done]] --[[Joey]] 

followup
diff --git a/doc/tips/automatically_adding_metadata/comment_5_888f0a77405d616a0d51a6176b44f605._comment b/doc/tips/automatically_adding_metadata/comment_5_888f0a77405d616a0d51a6176b44f605._comment
new file mode 100644
index 0000000..29f5cec
--- /dev/null
+++ b/doc/tips/automatically_adding_metadata/comment_5_888f0a77405d616a0d51a6176b44f605._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 5"""
+ date="2015-01-20T16:52:28Z"
+ content="""
+@Michele git annex sync in a direct mode repository does bypass the
+pre-commit hook. However, it will try to run the pre-commit-annex hook.
+
+Most likely, the hook script does not appear executable on Windows, so 
+git-annex cannot run it.
+"""]]

followup
diff --git a/doc/forum/adding_remote_bup_repo_using_ssh/comment_2_6698ecb746e6edb25130c8dbceb36fc0._comment b/doc/forum/adding_remote_bup_repo_using_ssh/comment_2_6698ecb746e6edb25130c8dbceb36fc0._comment
new file mode 100644
index 0000000..233ee88
--- /dev/null
+++ b/doc/forum/adding_remote_bup_repo_using_ssh/comment_2_6698ecb746e6edb25130c8dbceb36fc0._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2015-01-20T16:44:21Z"
+ content="""
+I've added a new section to the walkthrough about this:
+<http://git-annex.branchable.com/walkthrough/using_special_remotes/>
+"""]]

remove possibly incorrect statement about walkthrough not making a direct mode repo -- depends on OS and filesystem
diff --git a/doc/walkthrough/renaming_files.mdwn b/doc/walkthrough/renaming_files.mdwn
index d18b7da..8dec44d 100644
--- a/doc/walkthrough/renaming_files.mdwn
+++ b/doc/walkthrough/renaming_files.mdwn
@@ -14,5 +14,4 @@ it has a pre-commit hook that watches for and corrects broken symlinks.
 
 (Note that if a repository is in direct mode, you can't run normal git
 commands in it. Instead, just move the files using non-git commands, and
-`git annex add` and `git annex sync`. This walkthrough does not make a
-direct mode repository.)
+`git annex add` and `git annex sync`.)

fix ld documentation which used initremote instead of enableremote
diff --git a/doc/tips/using_Amazon_S3.mdwn b/doc/tips/using_Amazon_S3.mdwn
index ede3f95..d6f6217 100644
--- a/doc/tips/using_Amazon_S3.mdwn
+++ b/doc/tips/using_Amazon_S3.mdwn
@@ -24,8 +24,8 @@ repository use the same S3 remote is easy:
 
 	# cd /media/usb/annex
 	# git pull laptop
-	# git annex initremote cloud
-	initremote cloud (gpg) (checking bucket) ok
+	# git annex enableremote cloud
+	enableremote cloud (gpg) (checking bucket) ok
 
 Now the remote can be used like any other remote.
 

add new walkthrough chapter on using special remotes
diff --git a/doc/walkthrough.mdwn b/doc/walkthrough.mdwn
index 94c31e4..9488986 100644
--- a/doc/walkthrough.mdwn
+++ b/doc/walkthrough.mdwn
@@ -14,6 +14,7 @@ A walkthrough of the basic features of git-annex.
 	walkthrough/removing_files:_When_things_go_wrong
 	walkthrough/modifying_annexed_files
 	walkthrough/using_ssh_remotes
+	walkthrough/using_special_remotes
 	walkthrough/moving_file_content_between_repositories
 	walkthrough/quiet_please:_When_git-annex_seems_to_skip_files
 	walkthrough/using_tags_and_branches
diff --git a/doc/walkthrough/using_special_remotes.mdwn b/doc/walkthrough/using_special_remotes.mdwn
new file mode 100644
index 0000000..427baad
--- /dev/null
+++ b/doc/walkthrough/using_special_remotes.mdwn
@@ -0,0 +1,53 @@
+We've seen above that git-annex can be used to store files in
+regular git remotes, accessed either via ssh, or on a removable drive. But
+git-annex can also store files in Amazon S3, Glacier, on a rsync server, in
+WebDAV, or even pull files down from the web and bittorrent.
+This and much more is made possible by [[special_remotes]].
+
+These are not normal git repositories; indeed the git repository is not
+stored on a special remote. But git-annex can store the contents of files
+in special remotes, and operate on them much as it would on any other
+remote. Bonus: Files stored on special remotes can easily be
+[[encrypted|encryption]]!
+
+All you need to get started using a special remote is to initialize it.
+This is done using the `git annex initremote` command, which needs to be
+passed different parameters depending on the type of special remote.
+
+Some special remotes also need things like passwords to be set in
+environment variables. Don't worry -- it will prompt if you leave anything off.
+So feel free to make any kind of special remote instead of the S3 remote
+used in this example.
+
+	# export AWS_ACCESS_KEY_ID="somethingotherthanthis"
+	# export AWS_SECRET_ACCESS_KEY="s3kr1t"
+	# git annex initremote mys3 type=S3 chunk=1MiB encryption=shared
+	initremote mys3 (shared encryption) (checking bucket) (creating bucket in US) ok
+
+Now you can store files on the newly initialized special remote.
+
+	# git annex copy my_cool_big_file --to mys3
+	copy my_cool_big_file (to mys3...) ok
+
+Once you've initialized a special remote in one repository, you can enable
+use of the same special remote in other clones of the repository.
+If the mys3 remote above was initialized on your laptop, you'll also want
+to enable it on your desktop.
+
+To do so, first get git-annex in sync (so it knows about
+the special remote that was added in the other repository), and then
+use `git annex enableremote`.
+
+	desktop# git annex sync
+	desktop# export AWS_ACCESS_KEY_ID="somethingotherthanthis"
+	desktop# export AWS_SECRET_ACCESS_KEY="s3kr1t"
+	desktop# git annex enableremote mys3
+	enableremote mys3 (checking bucket) ok
+
+And now you can download files from the special remote:
+
+	desktop# git annex get my_cool_big_file --from mys3
+	get my_cool_big_file (from mys3...) ok
+
+This has only scratched the surface of what can be done with
+[[special_remotes]].
diff --git a/doc/walkthrough/using_ssh_remotes.mdwn b/doc/walkthrough/using_ssh_remotes.mdwn
index 1dc8fa5..ee8b629 100644
--- a/doc/walkthrough/using_ssh_remotes.mdwn
+++ b/doc/walkthrough/using_ssh_remotes.mdwn
@@ -5,13 +5,13 @@ that is truly remote, a host accessed by ssh.
 Say you have a desktop on the same network as your laptop and want
 to clone the laptop's annex to it:
 
-	# git clone ssh://mylaptop/home/me/annex ~/annex
-	# cd ~/annex
-	# git annex init "my desktop"
+	desktop# git clone ssh://mylaptop/home/me/annex ~/annex
+	desktop# cd ~/annex
+	desktop# git annex init "my desktop"
 
 Now you can get files and they will be transferred (using `rsync` via `ssh`):
 
-	# git annex get my_cool_big_file
+	desktop# git annex get my_cool_big_file
 	get my_cool_big_file (getting UUID for origin...) (from origin...)
 	SHA256-s86050597--6ae2688bc533437766a48aa19f2c06be14d1bab9c70b468af445d4f07b65f41e  100% 2159     2.1KB/s   00:00
 	ok
@@ -19,7 +19,7 @@ Now you can get files and they will be transferred (using `rsync` via `ssh`):
 When you drop files, git-annex will ssh over to the remote and make
 sure the file's content is still there before removing it locally:
 
-	# git annex drop my_cool_big_file
+	desktop# git annex drop my_cool_big_file
 	drop my_cool_big_file (checking origin..) ok
 
 Note that normally git-annex prefers to use non-ssh remotes, like

comment
diff --git a/doc/forum/adding_remote_bup_repo_using_ssh/comment_1_d1ab38bccc415a94fa3906f7f5e823f3._comment b/doc/forum/adding_remote_bup_repo_using_ssh/comment_1_d1ab38bccc415a94fa3906f7f5e823f3._comment
new file mode 100644
index 0000000..bd9d014
--- /dev/null
+++ b/doc/forum/adding_remote_bup_repo_using_ssh/comment_1_d1ab38bccc415a94fa3906f7f5e823f3._comment
@@ -0,0 +1,18 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-01-20T16:05:31Z"
+ content="""
+IIRC bup always initializes ~/.bup, even when using a remote repository.
+
+Your mistake is that you have run `git annex initremote` twice -- so now
+git-annex knows about two different remotes, which both happen to be backed
+by the same bup repository -- but git-annex doesn't know that.
+
+Instead, you should run `git annex initremote` in one repository, and then
+use `git annex enableremote` in clones of that repository to enable your
+bup remote.
+
+You will probably want to kill off the redundant bup remote with `git annex
+dead mybup` and then using `git annex enableremote` to enable the other one.
+"""]]

diff --git a/doc/bugs/__91__FR__93___No_consistency_check_while_on_battery-only.mdwn b/doc/bugs/__91__FR__93___No_consistency_check_while_on_battery-only.mdwn
new file mode 100644
index 0000000..815ce6a
--- /dev/null
+++ b/doc/bugs/__91__FR__93___No_consistency_check_while_on_battery-only.mdwn
@@ -0,0 +1,14 @@
+I hope this has not been mentioned before.  I only found in mentioned in a comment of a devblog post.
+
+### Please describe the problem.
+With `git annex assistant` running, consistency checks is sometimes triggered while the computer is battery-powered (as opposed to plugged into AC).
+
+### What steps will reproduce the problem?
+Configure `git annex assistant` to make consistency check daily (or whatever the default is), unplug from power and wait.
+
+### What version of git-annex are you using? On what operating system?
+`5.20141231` on Archlinux 64 bit.  (From the changelog I guess it's also present in the newest version).
+
+### Please provide any additional information below.
+
+It would be nice if one could toggle whether consistency check may run while not plugged into AC.

Added a comment: direct mode pre-commit hooks [on windows]
diff --git a/doc/tips/automatically_adding_metadata/comment_4_cd3c8e2f45db93576d1b82cfbfbe601b._comment b/doc/tips/automatically_adding_metadata/comment_4_cd3c8e2f45db93576d1b82cfbfbe601b._comment
new file mode 100644
index 0000000..f6b2773
--- /dev/null
+++ b/doc/tips/automatically_adding_metadata/comment_4_cd3c8e2f45db93576d1b82cfbfbe601b._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnW_CrhP9p50n9UUhTg_a9glyKWSvnrjRQ"
+ nickname="Michele"
+ subject="direct mode pre-commit hooks [on windows]"
+ date="2015-01-20T12:43:24Z"
+ content="""
+seemingly pre-commit hooks are not being called on windows, it could have to do with git annex sync bypassing them when doing commits ?
+
+on the other side genmetadata works. although that is not enough for me since I'd want to preserve complete last modification date/time and I was in the process of modifying the supplied pre-commit script to call for \"stat %Y\" (which btw is working fine on windows, while the last binaries for extract are failing there).
+
+am I correct in assuming that direct mode [on windows at least] bypasses hooks [namely pre-commit as well as pre-commit-annex] ?
+"""]]

diff --git a/doc/forum/Two_computers__44___one_networked_repository__44___no_Jabber_-_how_to_setup_sync__63___.mdwn b/doc/forum/Two_computers__44___one_networked_repository__44___no_Jabber_-_how_to_setup_sync__63___.mdwn
new file mode 100644
index 0000000..64426eb
--- /dev/null
+++ b/doc/forum/Two_computers__44___one_networked_repository__44___no_Jabber_-_how_to_setup_sync__63___.mdwn
@@ -0,0 +1,7 @@
+Hello there,
+
+I've got two computers, let's call them Alice and Bob, which should share the same repository. Alice and Bob are never online at the same time, and the remote repository setup as "transfer file repository" is an account on Box.com. So Jabber is obviously no option.
+
+I've tried setting up this with the webapp, but it's not working as intended: Bob never pulls the content from Alice from the remote repository. 
+
+How can I setup this to make it work with the remote repository in the web app? I am kinda at a loss right now. 

Added a comment
diff --git a/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_2_f995b3212c8140b386e4d1785994d29a._comment b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_2_f995b3212c8140b386e4d1785994d29a._comment
new file mode 100644
index 0000000..1e971dd
--- /dev/null
+++ b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_2_f995b3212c8140b386e4d1785994d29a._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnwNDA50ZupMvOgpgDqzDRyu5B-mYlVwa4"
+ nickname="Andreas"
+ subject="comment 2"
+ date="2015-01-19T11:49:32Z"
+ content="""
+Just double checked and the steps shown expose the error/warning for me.
+
+Unfortunately, I cannot seem to find a more recent package to check whether the bug has really been fixed meanwhile.
+"""]]

add bug: creating git annex unused fails when a filename contains newline
diff --git a/doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn b/doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn
new file mode 100644
index 0000000..c1ca60f
--- /dev/null
+++ b/doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn
@@ -0,0 +1,65 @@
+### Please describe the problem.
+
+After annexing files with newline (`\n`) characters in their name, then running `git annex unused` on the same git annex repository fails, instead of working correctly. The error is "git-annex: unknown response from git cat-file ".
+This issue might happen with filenames with other special characters in the filename, too.
+
+### What steps will reproduce the problem?
+
+1. create git annex repository
+2. create a file with a newline in its name
+3. annex the file
+4. run `git annex unused`
+
+Expected result: success
+
+Actual results: error: "git-annex: unknown response from git cat-file ".
+
+
+### What version of git-annex are you using? On what operating system?
+
+git-annex package version 5.20140412ubuntu1, architecture i386. System is xubuntu 14.04.
+
+[[!format sh """
+zolee@zolee-Latitude-E6440:/media/zolee/Stuff/dell-zoli-git-annex$ git annex version
+git-annex version: 5.20140412ubuntu1
+build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV Inotify DBus DesktopNotify XMPP DNS Feeds Quvi TDFA CryptoHash
+key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL
+remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier hook external
+local repository version: 5
+supported repository version: 5
+upgrade supported from repository versions: 0 1 2 4
+"""]]
+
+
+### 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
+
+zolee@zolee-Latitude-E6440:/media/zolee/Stuff/dell-zoli-git-annex$ git annex unused
+unused . (checking for unused data...) [2014-07-13 16:42:04 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","ls-files","--cached","--others","-z","--","/media/zolee/Stuff/dell-zoli-git-annex"]
+[2014-07-13 16:42:31 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","symbolic-ref","HEAD"]
+[2014-07-13 16:42:31 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","show-ref","--hash","refs/heads/dell-zoli-master"]
+[2014-07-13 16:42:31 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","show-ref"]
+(checking dell-zoli-master...) [2014-07-13 16:42:31 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","show-ref","--head"]
+[2014-07-13 16:42:31 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","show-ref","--head"]
+[2014-07-13 16:42:31 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","diff-index","-z","--raw","--no-renames","-l0","refs/heads/dell-zoli-master"]
+(checking store-zoli/laptop-zoli-master...) [2014-07-13 16:42:32 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","show-ref","--head"]
+[2014-07-13 16:42:32 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","show-ref","--head"]
+[2014-07-13 16:42:32 EEST] read: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","diff-index","-z","--raw","--no-renames","-l0","refs/remotes/store-zoli/laptop-zoli-master"]
+[2014-07-13 16:42:33 EEST] chat: git ["--git-dir=/media/zolee/Stuff/dell-zoli-git-annex/.git","--work-tree=/media/zolee/Stuff/dell-zoli-git-annex","cat-file","--batch"]
+git-annex: unknown response from git cat-file ("Code Composer Studio missing","refs/remotes/store-zoli/laptop-zoli-master:egyetem/2009-2010-sem2/diploma/tex/titlu-lucrare.tex~")
+zolee@zolee-Latitude-E6440:/media/zolee/Stuff/dell-zoli-git-annex$ 
+
+
+zolee@zolee-Latitude-E6440:/media/zolee/Stuff/dell-zoli-git-annex/egyetem/2009-2010-sem2/media-processors$ ls
+51325409-1.pdf course2010 Noterestanta.pdf Proiecte_6xxx.pdf rg_rand.c TMS320C6000?Code Composer Studio? Tutorial?- spru301c.pdf
+ccs_workspace.tar.gz netrol Proc_Media project site
+zolee@zolee-Latitude-E6440:/media/zolee/Stuff/dell-zoli-git-annex/egyetem/2009-2010-sem2/media-processors$ ls -b
+51325409-1.pdf course2010 Noterestanta.pdf Proiecte_6xxx.pdf rg_rand.c \ \ \ TMS320C6000\nCode\ Composer\ Studio\n\ \ \ \ \ \ Tutorial\n-\ spru301c.pdf
+ccs_workspace.tar.gz netrol Proc_Media project site
+zolee@zolee-Latitude-E6440:/media/zolee/Stuff/dell-zoli-git-annex/egyetem/2009-2010-sem2/media-processors$ 
+
+# End of transcript or log.
+"""]]

diff --git a/doc/forum/adding_remote_bup_repo_using_ssh.mdwn b/doc/forum/adding_remote_bup_repo_using_ssh.mdwn
new file mode 100644
index 0000000..1c13d7f
--- /dev/null
+++ b/doc/forum/adding_remote_bup_repo_using_ssh.mdwn
@@ -0,0 +1,42 @@
+I have two machines connected to my home network. machine A. Machine A has a git-annex repo which stores the data using a remote bup repo. The bup repo resides on Machine A itself. Now, I want to set up the same kind of environment in Machine B ( git annex repo backed down by bup remote). The only condition is that I need to re-use the bup repo in the machine A. So I went up like this:
+    
+    git clone ssh://192.168.1.33/path/to/git-annex-repo-on-machine-a
+
+This succeeded. The next step was to add a reference to the bup repo on machine A to this new git-annex repo in machine B. I went about like this:
+
+    git annex initremote mybup type=bup encryption=none buprepo=192.168.1.33:/path/to/bup-repo-on-machine-a
+
+This seems to work OK, except the fact that the following shows up:
+
+    Reinitialized existing Git repository in /Users/XXX/.bup/ 
+    Reinitialized existing Git repository in /Users/path/to/bup-repo-on-machine-a
+
+*Q1*: Why does git-annex create bup repos on the local folder while initializaing a remote bup repo?
+
+After that, I tried to get the file from the git repo using 
+
+    git annex get <file>  --from mybup
+
+..And nothing happened. This is the debug output from the last command :
+
+    read: git ["--git-dir=/private/tmp/annexed-setups/.git","--work-tree=/private/tmp/annexed-setups","show-ref","git-annex"]
+    read: git ["--git-dir=/private/tmp/annexed-setups/.git","--work-tree=/private/tmp/annexed-setups","show-ref","--hash","refs/heads/git-annex"]
+    read: git ["--git-dir=/private/tmp/annexed-setups/.git","--work-tree=/private/tmp/annexed-setups","log","refs/heads/git-   annex..c9af31cb3e563657e83b8b8e1f9a8de1ff690e4f","-n1","--pretty=%H"]
+    read: git ["--git-dir=/private/tmp/annexed-setups/.git","--work-tree=/private/tmp/annexed-setups","log","refs/heads/git-annex..b7b2af7f94af4770d5b4da7231bc3e41c0a6129d","-n1","--pretty=%H"]
+    read: git ["--git-dir=/private/tmp/annexed-setups/.git","--work-tree=/private/tmp/annexed-setups","log","refs/heads/git-annex..7b1017c5e68ec5a2b298b899bf723d0093fa0c7c","-n1","--pretty=%H"]
+    chat: git ["--git-dir=/private/tmp/annexed-setups/.git","--work-tree=/private/tmp/annexed-setups","cat-file","--batch"]
+    read: git ["--git-dir=/private/tmp/annexed-setups/.git","--work-tree=/private/tmp/annexed-setups","ls-files","--cached","-z","--","file.iso"]
+
+The file was not obtained from the remote. However, when I did 
+
+    git annex fsck --from mybup
+
+This resolved all the files properly and then when I did a 
+
+    git annex list. 
+
+it showed all files to be reachable from the mybup repo. 
+
+*Q2* Is this the correct workflow? 
+*Q3* Do I need to do a [costly] fsck for bup remote to properly work over ssh?
+

diff --git a/doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn b/doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn
new file mode 100644
index 0000000..f28b351
--- /dev/null
+++ b/doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn
@@ -0,0 +1,15 @@
+### Please describe the problem.
+When using git-annex in indirect mode (or even in direct mode I think, although this is not to be very reliable in this context), git repos inside a git-annex are ignored. This is due to the fact that git is ignoring nested .git folders, and then, we can safely work with git-annex and nested git repos without conflicts.
+
+Using a tool such as my-repos, one can then sync its entire home directory, containing folders and git repos, syncing the normal folders thanks to git-annex, and storing the git repos metadata for easy cloning using my-repos.
+
+However, when using the git-annex assistant (or the daemon to have automatic background sync), this is no longer the case.
+
+After discussion on IRC, we thought this could be due to the fact that files are copied sequentially and that the .git folder is not yet present when it starts copying. However, disabling the daemon, copying the files and reenabling it then leads to the same behaviour.
+
+Thanks!
+
+
+### What version of git-annex are you using? On what operating system?
+
+git-annex-bin on AUR.

Added a comment
diff --git a/doc/bugs/Build_fails_when_no_wget_avalible/comment_2_f98ce0d40c60ea37f6174117bb7cef9f._comment b/doc/bugs/Build_fails_when_no_wget_avalible/comment_2_f98ce0d40c60ea37f6174117bb7cef9f._comment
new file mode 100644
index 0000000..a7eafe1
--- /dev/null
+++ b/doc/bugs/Build_fails_when_no_wget_avalible/comment_2_f98ce0d40c60ea37f6174117bb7cef9f._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ subject="comment 2"
+ date="2015-01-16T20:38:57Z"
+ content="""
+git-annex defaults to wget when both are available, but curl works equally well.
+"""]]

Added a comment: Thanks and question
diff --git a/doc/bugs/Build_fails_when_no_wget_avalible/comment_1_c40db66d48d69d03847d73154faf3f59._comment b/doc/bugs/Build_fails_when_no_wget_avalible/comment_1_c40db66d48d69d03847d73154faf3f59._comment
new file mode 100644
index 0000000..0288872
--- /dev/null
+++ b/doc/bugs/Build_fails_when_no_wget_avalible/comment_1_c40db66d48d69d03847d73154faf3f59._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnmF_9CAtfqdZkC4e-_dCX-rK5bqh4RWkw"
+ nickname="Carl"
+ subject="Thanks and question"
+ date="2015-01-16T20:14:32Z"
+ content="""
+Thanks for the quick fix.
+
+Is there any advantage in using wget over curl, for git-annex (when it comes to progress bars etc or are they just as good?
+"""]]

tweak
diff --git a/doc/preferred_content.mdwn b/doc/preferred_content.mdwn
index b81c45f..f6071ea 100644
--- a/doc/preferred_content.mdwn
+++ b/doc/preferred_content.mdwn
@@ -169,6 +169,8 @@ So when is `unused` useful in a preferred content expression?
 
 Using `git annex sync --content --all` will ensure that all keys, including
 unused ones, are examined and the preferred content expressions followed.
+Similarly, `git annex sync --content --unused` will only look at the unused
+keys.
 
 The git-annex assistant periodically scans for unused files, and
 moves them to some repository whose preferred content expression

document "unused" in preferred content expressions
diff --git a/doc/preferred_content.mdwn b/doc/preferred_content.mdwn
index ec499de..b81c45f 100644
--- a/doc/preferred_content.mdwn
+++ b/doc/preferred_content.mdwn
@@ -154,6 +154,27 @@ becomes
 
 	metadata=tag=done
 
+### difference: unused
+
+The --unused option makes git-annex operate on every key that `git annex
+unused` has determined to be unused. The corresponding `unused` keyword
+in a preferred content expression also matches those keys. 
+
+However, the latter doesn't make git-annex consider those keys. So
+when git-annex is only checking preferred content expressions against files
+in the repository (which are obviously used), `unused` in a preferred
+content expression won't match anything.
+
+So when is `unused` useful in a preferred content expression?
+
+Using `git annex sync --content --all` will ensure that all keys, including
+unused ones, are examined and the preferred content expressions followed.
+
+The git-annex assistant periodically scans for unused files, and
+moves them to some repository whose preferred content expression
+matches "unused". (Or, if annex.expireunused is set, it may just delete
+them.)
+
 ## upgrades
 
 It's important that all clones of a repository can understand one-another's

Added a comment
diff --git a/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_3_cafaa7f474fbd995d1c10ecd35d2efe5._comment b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_3_cafaa7f474fbd995d1c10ecd35d2efe5._comment
new file mode 100644
index 0000000..89fc145
--- /dev/null
+++ b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_3_cafaa7f474fbd995d1c10ecd35d2efe5._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="mkdf"
+ subject="comment 3"
+ date="2015-01-16T06:10:43Z"
+ content="""
+Thanks a lot Joey! git-annex works like a charm for me and this was the only issue I've encountered so far. I'm happy my guess was correct and it helped to improve git-annex a bit. Thanks for such great tool!
+"""]]

update
diff --git a/doc/design/git-remote-daemon.mdwn b/doc/design/git-remote-daemon.mdwn
index 270ceaa..41e0c93 100644
--- a/doc/design/git-remote-daemon.mdwn
+++ b/doc/design/git-remote-daemon.mdwn
@@ -162,7 +162,7 @@ over stdio to inform when refs on the remote have changed.
 
 No pushing is done for CHANGED, since git handles ssh natively.
 
-TODO: test!
+This is implemented and seems to work well.
 
 ## telehash 
 

Fix build failure when wget is not installed.
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 0a0e87c..4498838 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -15,6 +15,7 @@ import Utility.Process
 import Utility.SafeCommand
 import Utility.ExternalSHA
 import Utility.Env
+import Utility.Exception
 import qualified Git.Version
 import Utility.DottedVersion
 
@@ -106,7 +107,8 @@ checkWgetQuietProgress = Config "wgetquietprogress" . BoolConfig
 	<$> getWgetVersion 
 
 getWgetVersion :: IO (Maybe DottedVersion)
-getWgetVersion = extract <$> readProcess "wget" ["--version"]
+getWgetVersion = catchDefaultIO Nothing $
+	extract <$> readProcess "wget" ["--version"]
   where
 	extract s = case lines s of
 		[] -> Nothing
diff --git a/debian/changelog b/debian/changelog
index eb95c90..4d27f6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ git-annex (5.20150114) UNRELEASED; urgency=medium
   * remotedaemon: Fix problem that could prevent ssh connections being
     made after two LOSTNET messages were received in a row (perhaps due to
     two different network interfaces being brought down).
+  * Fix build failure when wget is not installed.
 
  -- Joey Hess <id@joeyh.name>  Tue, 13 Jan 2015 17:03:39 -0400
 
diff --git a/doc/bugs/Build_fails_when_no_wget_avalible.mdwn b/doc/bugs/Build_fails_when_no_wget_avalible.mdwn
index 2bfec7a..5650605 100644
--- a/doc/bugs/Build_fails_when_no_wget_avalible.mdwn
+++ b/doc/bugs/Build_fails_when_no_wget_avalible.mdwn
@@ -38,3 +38,9 @@ ExitFailure 1
 """]]
 
 -- Carl
+
+> wget is not intended to be a hard build dependency. The Debian package
+> should always be built with wget, so it's a build-dependency there.
+>
+> I've fixed the configure script to not crash in this situation.
+> [[done]]. --[[Joey]]

remotedaemon: Fix problem that could prevent ssh connections being made after two LOSTNET messages were received in a row
Perhaps due to two different network interfaces being brought down.
Since there is no reliable way to drain a Chan, I switched to STM TChan.
diff --git a/RemoteDaemon/Core.hs b/RemoteDaemon/Core.hs
index 60a4d5c..ed79c01 100644
--- a/RemoteDaemon/Core.hs
+++ b/RemoteDaemon/Core.hs
@@ -20,24 +20,25 @@ import Utility.SimpleProtocol
 import Config
 import Annex.Ssh
 
-import Control.Concurrent.Async
 import Control.Concurrent
+import Control.Concurrent.Async
+import Control.Concurrent.STM
 import Network.URI
 import qualified Data.Map as M
 
 runForeground :: IO ()
 runForeground = do
 	(readh, writeh) <- ioHandles
-	ichan <- newChan :: IO (Chan Consumed)
-	ochan <- newChan :: IO (Chan Emitted)
+	ichan <- newTChanIO :: IO (TChan Consumed)
+	ochan <- newTChanIO :: IO (TChan Emitted)
 
 	let reader = forever $ do
 		l <- hGetLine readh
 		case parseMessage l of
 			Nothing -> error $ "protocol error: " ++ l
-			Just cmd -> writeChan ichan cmd
+			Just cmd -> atomically $ writeTChan ichan cmd
 	let writer = forever $ do
-		msg <- readChan ochan
+		msg <- atomically $ readTChan ochan
 		hPutStrLn writeh $ unwords $ formatMessage msg
 		hFlush writeh
 	let controller = runController ichan ochan
@@ -46,11 +47,11 @@ runForeground = do
 	void $ tryIO $
 		reader `concurrently` writer `concurrently` controller
 
-type RemoteMap = M.Map Git.Repo (IO (), Chan Consumed)
+type RemoteMap = M.Map Git.Repo (IO (), TChan Consumed)
 
 -- Runs the transports, dispatching messages to them, and handling
 -- the main control messages.
-runController :: Chan Consumed -> Chan Emitted -> IO ()
+runController :: TChan Consumed -> TChan Emitted -> IO ()
 runController ichan ochan = do
 	h <- genTransportHandle
 	m <- genRemoteMap h ochan
@@ -58,7 +59,7 @@ runController ichan ochan = do
 	go h False m
   where
 	go h paused m = do
-		cmd <- readChan ichan
+		cmd <- atomically $ readTChan ichan
 		case cmd of
 			RELOAD -> do
 				h' <- updateTransportHandle h
@@ -88,22 +89,28 @@ runController ichan ochan = do
 			-- All remaining messages are sent to
 			-- all Transports.
 			msg -> do
-				unless paused $
-					forM_ chans (`writeChan` msg)
+				unless paused $ atomically $
+					forM_ chans (`writeTChan` msg)
 				go h paused m
 	  where
 		chans = map snd (M.elems m)
 
 	startrunning m = forM_ (M.elems m) startrunning'
-	startrunning' (transport, _) = void $ async transport
+	startrunning' (transport, c) = do
+		-- drain any old control messages from the channel
+		-- to avoid confusing the transport with them
+		atomically $ drain c
+		void $ async transport
+	
+	drain c = maybe noop (const $ drain c) =<< tryReadTChan c
 	
-	broadcast msg m = forM_ (M.elems m) send
+	broadcast msg m = atomically $ forM_ (M.elems m) send
 	  where
-		send (_, c) = writeChan c msg
+		send (_, c) = writeTChan c msg
 
 -- Generates a map with a transport for each supported remote in the git repo,
 -- except those that have annex.sync = false
-genRemoteMap :: TransportHandle -> Chan Emitted -> IO RemoteMap
+genRemoteMap :: TransportHandle -> TChan Emitted -> IO RemoteMap
 genRemoteMap h@(TransportHandle g _) ochan = 
 	M.fromList . catMaybes <$> mapM gen (Git.remotes g)
   where
@@ -111,7 +118,7 @@ genRemoteMap h@(TransportHandle g _) ochan =
 		Git.Url u -> case M.lookup (uriScheme u) remoteTransports of
 			Just transport
 				| remoteAnnexSync (extractRemoteGitConfig r (Git.repoDescribe r)) -> do
-					ichan <- newChan :: IO (Chan Consumed)
+					ichan <- newTChanIO :: IO (TChan Consumed)
 					return $ Just
 						( r
 						, (transport r (RemoteURI u) h ichan ochan, ichan)
diff --git a/RemoteDaemon/Transport/Ssh.hs b/RemoteDaemon/Transport/Ssh.hs
index afedf55..6315ede 100644
--- a/RemoteDaemon/Transport/Ssh.hs
+++ b/RemoteDaemon/Transport/Ssh.hs
@@ -18,7 +18,7 @@ import qualified Git
 import Git.Command
 import Utility.ThreadScheduler
 
-import Control.Concurrent.Chan
+import Control.Concurrent.STM
 import Control.Concurrent.Async
 
 transport :: Transport
@@ -58,7 +58,7 @@ transport' r url transporthandle ichan ochan = do
 
 		return $ either (either id id) id status
 
-	send msg = writeChan ochan msg
+	send msg = atomically $ writeTChan ochan msg
 
 	fetch = do
 		send (SYNCING url)
@@ -80,7 +80,7 @@ transport' r url transporthandle ichan ochan = do
 			Nothing -> return Stopping
 	
 	handlecontrol = do
-		msg <- readChan ichan
+		msg <- atomically $ readTChan ichan
 		case msg of
 			STOP -> return Stopping
 			LOSTNET -> return Stopping
diff --git a/RemoteDaemon/Types.hs b/RemoteDaemon/Types.hs
index 7413f58..bdc94d9 100644
--- a/RemoteDaemon/Types.hs
+++ b/RemoteDaemon/Types.hs
@@ -17,6 +17,7 @@ import qualified Utility.SimpleProtocol as Proto
 
 import Network.URI
 import Control.Concurrent
+import Control.Concurrent.STM
 
 -- The URI of a remote is used to uniquely identify it (names change..)
 newtype RemoteURI = RemoteURI URI
@@ -24,7 +25,7 @@ newtype RemoteURI = RemoteURI URI
 
 -- A Transport for a particular git remote consumes some messages
 -- from a Chan, and emits others to another Chan.
-type Transport = RemoteRepo -> RemoteURI -> TransportHandle -> Chan Consumed -> Chan Emitted -> IO ()
+type Transport = RemoteRepo -> RemoteURI -> TransportHandle -> TChan Consumed -> TChan Emitted -> IO ()
 
 type RemoteRepo = Git.Repo
 type LocalRepo = Git.Repo
diff --git a/debian/changelog b/debian/changelog
index a9b3ffb..eb95c90 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ git-annex (5.20150114) UNRELEASED; urgency=medium
     so comes last and --fast will disable it.
   * Git remote info now includes the date of the last sync with the remote.
   * sync: Added --message/-m option like git commit.
+  * remotedaemon: Fix problem that could prevent ssh connections being
+    made after two LOSTNET messages were received in a row (perhaps due to
+    two different network interfaces being brought down).
 
  -- Joey Hess <id@joeyh.name>  Tue, 13 Jan 2015 17:03:39 -0400
 
diff --git a/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn
index eaaf5a4..a3e4c3f 100644
--- a/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn
+++ b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn
@@ -73,3 +73,5 @@ Everything up-to-date
 """]]
 
 [[!tag confirmed]]
+
+> [[fixed|done]] --[[Joey]]
diff --git a/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_2_aa6f0371291eb27a55850d905cea381a._comment b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_2_aa6f0371291eb27a55850d905cea381a._comment
new file mode 100644
index 0000000..e371a05
--- /dev/null
+++ b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_2_aa6f0371291eb27a55850d905cea381a._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2015-01-15T19:17:20Z"
+ content="""
+Also, you were spot on about the cause being LOSTNET messages getting
+queued up. Clearing that queue when restarting the transport
+will fix this problem.
+
+Please bring your non-haskell code analysis skills to bear on git-annex
+anytim! :)
+"""]]

diff --git a/doc/bugs/Build_fails_when_no_wget_avalible.mdwn b/doc/bugs/Build_fails_when_no_wget_avalible.mdwn
new file mode 100644
index 0000000..2bfec7a
--- /dev/null
+++ b/doc/bugs/Build_fails_when_no_wget_avalible.mdwn
@@ -0,0 +1,40 @@
+### Please describe the problem.
+
+When trying to build git-annex 5.21050113 in a clean cabal sandbox on OSX and not having wget avalible, breaks the configure step of the build. See excerpt of build log below.
+
+I am not sure if it is a bug or not, from the debian dependencies it seems that wget is required, but from reading various pieces of the documentation it seems to only be recommended. Installing wget makes it build. 
+
+### What steps will reproduce the problem?
+
+
+
+### What version of git-annex are you using? On what operating system?
+
+5.20150113 on OSX Yosemite.
+
+### Please provide any additional information below.
+
+[[!format sh """
+  checking version...fatal: Not a git repository (or any of the parent directories): .git
+ 5.20150113
+  checking UPGRADE_LOCATION... not available
+  checking git... yes
+  checking git version... 2.2.1
+  checking cp -a... yes
+  checking cp -p... yes
+  checking cp --preserve=timestamps... no
+  checking cp --reflink=auto... no
+  checking xargs -0... yes
+  checking rsync... yes
+  checking curl... yes
+  checking wget... no
+  checking wget supports -q --show-progress...setup: wget: does not exist
+cabal: Error: some packages failed to install:
+git-annex-5.20150113 failed during the configure step. The exception was:
+ExitFailure 1
+
+
+# End of transcript or log.
+"""]]
+
+-- Carl

confirmed
diff --git a/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn
index e584064..eaaf5a4 100644
--- a/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn
+++ b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row.mdwn
@@ -71,3 +71,5 @@ Everything up-to-date
 
 
 """]]
+
+[[!tag confirmed]]
diff --git a/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_1_7340e9cf5493e94cc6cb53adb6965f2c._comment b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_1_7340e9cf5493e94cc6cb53adb6965f2c._comment
new file mode 100644
index 0000000..a1547f3
--- /dev/null
+++ b/doc/bugs/git_annex_remotedaemon_fails_to_connect_after_several_LOSTNET_messages_in_a_row/comment_1_7340e9cf5493e94cc6cb53adb6965f2c._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-01-15T19:09:08Z"
+ content="""
+Thanks for a great bug report. It took me a little while to remember how
+this works; the LOSTNET and RESUME messages shown are ones you typed
+in to communicate with remotedaemon.
+
+Looks like a probably straightforward bug in its state machine triggered by
+the repeated LOSTNET messages.
+"""]]

cannot reproduce problem; more info needed
diff --git a/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_1_b4ad8561eab9b5c3a6eaa2f275aececc._comment b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_1_b4ad8561eab9b5c3a6eaa2f275aececc._comment
new file mode 100644
index 0000000..8e08077
--- /dev/null
+++ b/doc/bugs/git_annex_direct_-__62___rename:_does_not_exist/comment_1_b4ad8561eab9b5c3a6eaa2f275aececc._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-01-15T19:00:35Z"
+ content="""
+That works fine with version 5.20150113.
+
+Either you need to upgrade to a newer version, or perhaps you left 
+out some step or configuration needed to reproduce your problem.
+"""]]

response
diff --git a/doc/forum/git_annex_assistant_repository_history__63__/comment_1_6f87f31e18cefedcc6bce95dbeb85a0b._comment b/doc/forum/git_annex_assistant_repository_history__63__/comment_1_6f87f31e18cefedcc6bce95dbeb85a0b._comment
new file mode 100644
index 0000000..7425ef1
--- /dev/null
+++ b/doc/forum/git_annex_assistant_repository_history__63__/comment_1_6f87f31e18cefedcc6bce95dbeb85a0b._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-01-15T18:59:01Z"
+ content="""
+The repository is just a git repository, so you can use whatever git tools
+you like to examine its history. For example, gitk.
+"""]]

reply
diff --git a/doc/scalability/comment_2_71c7c3aa97284602d0f64c11a98d1782._comment b/doc/scalability/comment_2_71c7c3aa97284602d0f64c11a98d1782._comment
new file mode 100644
index 0000000..a6ca05c
--- /dev/null
+++ b/doc/scalability/comment_2_71c7c3aa97284602d0f64c11a98d1782._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2015-01-15T18:56:42Z"
+ content="""
+annex.queuesize default is documented on the man page. Currently 10240
+commands.
+"""]]