summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/AdjustedBranch.hs5
-rw-r--r--Annex/Fixup.hs1
-rw-r--r--Annex/Init.hs10
-rw-r--r--Annex/Locations.hs35
-rw-r--r--Annex/ReplaceFile.hs11
-rw-r--r--Assistant/Install/AutoStart.hs2
-rw-r--r--Assistant/WebApp/Configurators/Edit.hs5
-rw-r--r--Assistant/WebApp/Configurators/Local.hs2
-rw-r--r--Build/Configure.hs2
-rw-r--r--Build/DesktopFile.hs2
-rw-r--r--Build/EvilLinker.hs2
-rw-r--r--Build/EvilSplicer.hs2
-rw-r--r--Build/LinuxMkLibs.hs1
-rw-r--r--Build/NullSoftInstaller.hs2
-rw-r--r--Build/OSXMkLibs.hs1
-rw-r--r--Build/Standalone.hs2
-rw-r--r--Build/TestConfig.hs2
-rw-r--r--Build/Version.hs2
-rw-r--r--CHANGELOG41
-rw-r--r--Command/Fix.hs2
-rw-r--r--Command/Fsck.hs27
-rw-r--r--Command/Map.hs50
-rw-r--r--Command/Smudge.hs9
-rw-r--r--Command/Version.hs4
-rw-r--r--Common.hs1
-rw-r--r--Creds.hs2
-rw-r--r--Crypto.hs88
-rw-r--r--Git.hs5
-rw-r--r--Git/Env.hs14
-rw-r--r--Git/Tree.hs14
-rw-r--r--Remote/External.hs10
-rw-r--r--Remote/External/Types.hs2
-rw-r--r--Remote/GCrypt.hs6
-rw-r--r--Remote/Git.hs11
-rw-r--r--Remote/Helper/Encryptable.hs65
-rw-r--r--Remote/Helper/Special.hs14
-rw-r--r--Remote/S3.hs6
-rw-r--r--Setup.hs3
-rw-r--r--Types/Crypto.hs12
-rw-r--r--Types/GitConfig.hs2
-rw-r--r--Utility/Directory.hs9
-rw-r--r--Utility/FreeDesktop.hs2
-rw-r--r--Utility/LinuxMkLibs.hs1
-rw-r--r--Utility/LockFile/PidLock.hs1
-rw-r--r--Utility/Path.hs2
-rw-r--r--Utility/Tmp.hs2
-rw-r--r--debian/changelog41
-rw-r--r--doc/bugs/Android_chroot_stuck_in_Cabal_hell.mdwn2
-rw-r--r--doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn104
-rw-r--r--doc/bugs/annex.gnupg-options_not_used_by_assistant.mdwn81
-rw-r--r--doc/bugs/dropkey_--batch_--json_--force_is_always_succesfull.mdwn35
-rw-r--r--doc/bugs/git-annex_smudge_fails_on_git_add.mdwn2
-rw-r--r--doc/bugs/stack_build_Setup.hs_dependencies.mdwn7
-rw-r--r--doc/design/external_special_remote_protocol.mdwn10
-rw-r--r--doc/design/roadmap.mdwn3
-rw-r--r--doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment14
-rw-r--r--doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment24
-rw-r--r--doc/devblog/day_387__release_day.mdwn10
-rw-r--r--doc/devblog/day_388-389__various_and_windows.mdwn13
-rw-r--r--doc/devblog/day_390__sharedpubkey.mdwn5
-rw-r--r--doc/encryption.mdwn29
-rw-r--r--doc/forum/Deleting_remotes_doesn__39__t_work__8230__.mdwn1
-rw-r--r--doc/forum/Fails_to_get_file_from_s3._How_to_recover__63__.mdwn16
-rw-r--r--doc/forum/How_to_find_out_if_assistant_is_still_repairing__63__.mdwn1
-rw-r--r--doc/forum/Ignoring_folders__63__.mdwn1
-rw-r--r--doc/forum/Integrating_git-annex_with_Windows_Git_Extensions__63__.mdwn10
-rw-r--r--doc/forum/Making_a_git-annexy_symlink___34__known__34____63__.mdwn7
-rw-r--r--doc/forum/S3_remote_not_available.mdwn31
-rw-r--r--doc/forum/Wrong_symlink_target_on_usb_drive.mdwn55
-rw-r--r--doc/forum/race_condition_with_drop_-J__63__.mdwn7
-rw-r--r--doc/forum/time_profiling_the_assistant.mdwn19
-rw-r--r--doc/forum/unable_to_clone_annex_repo_in_windows.mdwn29
-rw-r--r--doc/git-annex-drop/comment_1_ecb863aea64eadbaeb7759c5cb0bf5a5._comment12
-rw-r--r--doc/git-annex-drop/comment_2_c9017041b01d803b346b1b14b8d1e066._comment14
-rw-r--r--doc/git-annex-map.mdwn10
-rw-r--r--doc/git-annex-view.mdwn5
-rw-r--r--doc/git-annex.mdwn11
-rw-r--r--doc/install/OSX/comment_13_f4b39e2009274539d60b29711a4a2c8d._comment22
-rw-r--r--doc/install/OSX/comment_14_5581b7d1c09e6a78419d626bb25261b6._comment10
-rw-r--r--doc/install/Windows.mdwn22
-rw-r--r--doc/install/fromsource.mdwn2
-rw-r--r--doc/news/version_6.20160229.mdwn24
-rw-r--r--doc/news/version_6.20160318.mdwn18
-rw-r--r--doc/news/version_6.20160511.mdwn34
-rw-r--r--doc/special_remotes/comment_33_317c4d5edc9de8159c3b03a3e161e257._comment12
-rw-r--r--doc/special_remotes/comment_34_31256dd4b74d344aa49902adec4bcf02._comment10
-rw-r--r--doc/special_remotes/comment_35_5801755d10149f0d3971fef0b6e1b62f._comment19
-rw-r--r--doc/todo/drop_--batch/comment_1_eff1bec0af5e7a7364d2fdaea6a8826f._comment18
-rw-r--r--doc/todo/feature_request__58___pubkey-only_encryption_mode.mdwn2
-rw-r--r--doc/todo/use_inode_cache_in_unlocked_files.mdwn10
-rw-r--r--doc/todo/wishlist__58___add_repository_name_to_commit_messages.mdwn3
-rw-r--r--doc/todo/wishlist__58__alias_system.mdwn2
-rw-r--r--git-annex.cabal2
-rw-r--r--man/git-annex-map.19
-rw-r--r--man/git-annex-view.15
-rw-r--r--man/git-annex.110
-rw-r--r--stack.yaml2
-rw-r--r--standalone/android/cabal.config7
-rw-r--r--standalone/android/icons/drawable-hdpi/ic_launcher.pngbin2612 -> 3054 bytes
-rw-r--r--standalone/android/icons/drawable-ldpi/ic_launcher.pngbin1279 -> 1487 bytes
-rw-r--r--standalone/android/icons/drawable-mdpi/ic_launcher.pngbin1768 -> 1979 bytes
-rw-r--r--standalone/android/icons/drawable-xhdpi/ic_launcher.pngbin3396 -> 4127 bytes
-rw-r--r--standalone/android/icons/drawable/ic_launcher.pngbin1768 -> 1979 bytes
-rw-r--r--standalone/android/tmp/network-2.4.1.2/cabal.config7
104 files changed, 1069 insertions, 284 deletions
diff --git a/Annex/AdjustedBranch.hs b/Annex/AdjustedBranch.hs
index 2b014a1..2baed04 100644
--- a/Annex/AdjustedBranch.hs
+++ b/Annex/AdjustedBranch.hs
@@ -481,12 +481,13 @@ reverseAdjustedTree basis adj csha = do
where
reverseadj = reverseAdjustment adj
propchanges changes ti@(TreeItem f _ _) =
- case M.lookup f m of
+ case M.lookup (norm f) m of
Nothing -> return (Just ti) -- not changed
Just change -> adjustTreeItem reverseadj change
where
- m = M.fromList $ map (\i@(TreeItem f' _ _) -> (f', i)) $
+ m = M.fromList $ map (\i@(TreeItem f' _ _) -> (norm f', i)) $
map diffTreeToTreeItem changes
+ norm = normalise . getTopFilePath
diffTreeToTreeItem :: Git.DiffTree.DiffTreeItem -> TreeItem
diffTreeToTreeItem dti = TreeItem
diff --git a/Annex/Fixup.hs b/Annex/Fixup.hs
index 1cde863..6a14f22 100644
--- a/Annex/Fixup.hs
+++ b/Annex/Fixup.hs
@@ -20,7 +20,6 @@ import Utility.Exception
import System.IO
import System.FilePath
-import System.Directory
import Data.List
import Control.Monad
import Control.Monad.IfElse
diff --git a/Annex/Init.hs b/Annex/Init.hs
index 4edc9c9..2b0d0f8 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -145,10 +145,10 @@ probeCrippledFileSystem = do
liftIO $ probeCrippledFileSystem' tmp
probeCrippledFileSystem' :: FilePath -> IO Bool
-probeCrippledFileSystem' tmp = do
#ifdef mingw32_HOST_OS
- return True
+probeCrippledFileSystem' _ = return True
#else
+probeCrippledFileSystem' tmp = do
let f = tmp </> "gaprobe"
writeFile f ""
uncrippled <- probe f
@@ -177,9 +177,9 @@ checkCrippledFileSystem = whenM probeCrippledFileSystem $ do
setCrippledFileSystem True
{- Normally git disables core.symlinks itself when the
- - filesystem does not support them, but in Cygwin, git
- - does support symlinks, while git-annex, not linking
- - with Cygwin, does not. -}
+ - filesystem does not support them. But, even if symlinks are
+ - supported, we don't use them by default in a crippled
+ - filesystem. -}
whenM (coreSymlinks <$> Annex.getGitConfig) $ do
warning "Disabling core.symlinks."
setConfig (ConfigKey "core.symlinks")
diff --git a/Annex/Locations.hs b/Annex/Locations.hs
index 52753fc..bdd603d 100644
--- a/Annex/Locations.hs
+++ b/Annex/Locations.hs
@@ -137,25 +137,28 @@ gitAnnexLocationDepth config = hashlevels + 1
- the actual location of the file's content.
-}
gitAnnexLocation :: Key -> Git.Repo -> GitConfig -> IO FilePath
-gitAnnexLocation key r config = gitAnnexLocation' key r config (annexCrippledFileSystem config) doesFileExist (Git.localGitDir r)
-gitAnnexLocation' :: Key -> Git.Repo -> GitConfig -> Bool -> (FilePath -> IO Bool) -> FilePath -> IO FilePath
-gitAnnexLocation' key r config crippled checker gitdir
+gitAnnexLocation key r config = gitAnnexLocation' key r config (annexCrippledFileSystem config) (coreSymlinks config) doesFileExist (Git.localGitDir r)
+gitAnnexLocation' :: Key -> Git.Repo -> GitConfig -> Bool -> Bool -> (FilePath -> IO Bool) -> FilePath -> IO FilePath
+gitAnnexLocation' key r config crippled symlinkssupported checker gitdir
{- Bare repositories default to hashDirLower for new
- - content, as it's more portable.
- -
- - Repositories on filesystems that are crippled also use
- - hashDirLower, since they do not use symlinks and it's
- - more portable.
- -}
- | Git.repoIsLocalBare r || crippled =
- check $ map inrepo $ annexLocations config key
- | hasDifference ObjectHashLower (annexDifferences config) =
- return $ inrepo $ annexLocation config key hashDirLower
- {- Non-bare repositories only use hashDirMixed, so
+ - content, as it's more portable. But check all locations. -}
+ | Git.repoIsLocalBare r = checkall
+ | hasDifference ObjectHashLower (annexDifferences config) =
+ only hashDirLower
+ {- Repositories on crippled filesystems use hashDirLower
+ - for new content, unless symlinks are supported too.
+ - Then hashDirMixed is used. But, the content could be
+ - in either location so check both. -}
+ | symlinkssupported = check $ map inrepo $ reverse $ annexLocations config key
+ | crippled = checkall
+ {- Regular repositories only use hashDirMixed, so
- don't need to do any work to check if the file is
- present. -}
- | otherwise = return $ inrepo $ annexLocation config key hashDirMixed
+ | otherwise = only hashDirMixed
where
+ only = return . inrepo . annexLocation config key
+ checkall = check $ map inrepo $ annexLocations config key
+
inrepo d = gitdir </> d
check locs@(l:_) = fromMaybe l <$> firstM checker locs
check [] = error "internal"
@@ -166,7 +169,7 @@ gitAnnexLink file key r config = do
currdir <- getCurrentDirectory
let absfile = fromMaybe whoops $ absNormPathUnix currdir file
let gitdir = getgitdir currdir
- loc <- gitAnnexLocation' key r config False (\_ -> return True) gitdir
+ loc <- gitAnnexLocation' key r config False False (\_ -> return True) gitdir
toInternalGitPath <$> relPathDirToFile (parentDir absfile) loc
where
getgitdir currdir
diff --git a/Annex/ReplaceFile.hs b/Annex/ReplaceFile.hs
index 4b1b2b5..7cb4fbd 100644
--- a/Annex/ReplaceFile.hs
+++ b/Annex/ReplaceFile.hs
@@ -5,6 +5,8 @@
- Licensed under the GNU GPL version 3 or higher.
-}
+{-# LANGUAGE CPP #-}
+
module Annex.ReplaceFile where
import Annex.Common
@@ -27,8 +29,17 @@ replaceFile :: FilePath -> (FilePath -> Annex ()) -> Annex ()
replaceFile file action = do
misctmpdir <- fromRepo gitAnnexTmpMiscDir
void $ createAnnexDirectory misctmpdir
+#ifndef mingw32_HOST_OS
+ -- Use part of the filename as the template for the temp
+ -- directory. This does not need to be unique, but it
+ -- makes it more clear what this temp directory is for.
filemax <- liftIO $ fileNameLengthLimit misctmpdir
let basetmp = take (filemax `div` 2) (takeFileName file)
+#else
+ -- Windows has limits on the whole path length, so keep
+ -- it short.
+ let basetmp = "t"
+#endif
withTmpDirIn misctmpdir basetmp $ \tmpdir -> do
let tmpfile = tmpdir </> basetmp
action tmpfile
diff --git a/Assistant/Install/AutoStart.hs b/Assistant/Install/AutoStart.hs
index 5745030..99c2c0e 100644
--- a/Assistant/Install/AutoStart.hs
+++ b/Assistant/Install/AutoStart.hs
@@ -14,7 +14,7 @@ import Utility.FreeDesktop
#ifdef darwin_HOST_OS
import Utility.OSX
import Utility.Path
-import System.Directory
+import Utility.Directory
#endif
installAutoStart :: FilePath -> FilePath -> IO ()
diff --git a/Assistant/WebApp/Configurators/Edit.hs b/Assistant/WebApp/Configurators/Edit.hs
index 3a9dc78..6a218de 100644
--- a/Assistant/WebApp/Configurators/Edit.hs
+++ b/Assistant/WebApp/Configurators/Edit.hs
@@ -259,7 +259,10 @@ getRepoEncryption (Just _) (Just c) = case extractCipher c of
[whamlet|not encrypted|]
(Just (SharedCipher _)) ->
[whamlet|encrypted: encryption key stored in git repository|]
- (Just (EncryptedCipher _ _ (KeyIds { keyIds = ks }))) -> do
+ (Just (EncryptedCipher _ _ ks)) -> desckeys ks
+ (Just (SharedPubKeyCipher _ ks)) -> desckeys ks
+ where
+ desckeys (KeyIds { keyIds = ks }) = do
cmd <- liftAnnex $ gpgCmd <$> Annex.getGitConfig
knownkeys <- liftIO (secretKeys cmd)
[whamlet|
diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs
index e2f257a..76f21e9 100644
--- a/Assistant/WebApp/Configurators/Local.hs
+++ b/Assistant/WebApp/Configurators/Local.hs
@@ -24,7 +24,9 @@ import qualified Command.Sync
import Config.Files
import Utility.FreeDesktop
import Utility.DiskFree
+#ifndef mingw32_HOST_OS
import Utility.Mounts
+#endif
import Utility.DataUnits
import Remote (prettyUUID)
import Annex.UUID
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 55f2493..ec3f4cc 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -4,7 +4,6 @@
module Build.Configure where
-import System.Directory
import Control.Applicative
import System.Environment (getArgs)
import Control.Monad.IfElse
@@ -20,6 +19,7 @@ import Utility.Env
import Utility.Exception
import qualified Git.Version
import Utility.DottedVersion
+import Utility.Directory
tests :: [TestCase]
tests =
diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs
index cac520d..0203c02 100644
--- a/Build/DesktopFile.hs
+++ b/Build/DesktopFile.hs
@@ -15,12 +15,12 @@ import Utility.Exception
import Utility.FreeDesktop
import Utility.Path
import Utility.Monad
+import Utility.Directory
import Config.Files
import Utility.OSX
import Assistant.Install.AutoStart
import Assistant.Install.Menu
-import System.Directory
import System.Environment
#ifndef mingw32_HOST_OS
import System.Posix.User
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs
index 97f218f..94e399d 100644
--- a/Build/EvilLinker.hs
+++ b/Build/EvilLinker.hs
@@ -15,7 +15,6 @@ import Text.Parsec
import Text.Parsec.String
import Control.Applicative ((<$>))
import Control.Monad
-import System.Directory
import Data.Maybe
import Data.List
@@ -23,6 +22,7 @@ import Utility.Monad
import Utility.Process hiding (env)
import qualified Utility.Process
import Utility.Env
+import Utility.Directory
data CmdParams = CmdParams
{ cmd :: String
diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs
index 9734b74..cfdcc3a 100644
--- a/Build/EvilSplicer.hs
+++ b/Build/EvilSplicer.hs
@@ -39,7 +39,6 @@ import Data.String.Utils
import Data.Char
import System.Environment
import System.FilePath
-import System.Directory
import System.IO
import Control.Monad
import Prelude hiding (log)
@@ -49,6 +48,7 @@ import Utility.Misc
import Utility.Exception hiding (try)
import Utility.Path
import Utility.FileSystemEncoding
+import Utility.Directory
data Coord = Coord
{ coordLine :: Int
diff --git a/Build/LinuxMkLibs.hs b/Build/LinuxMkLibs.hs
index 5c33d49..3bc79fe 100644
--- a/Build/LinuxMkLibs.hs
+++ b/Build/LinuxMkLibs.hs
@@ -12,7 +12,6 @@ module Main where
import System.Environment
import Data.Maybe
import System.FilePath
-import System.Directory
import Control.Monad
import Data.List
import System.Posix.Files
diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs
index 7af6bab..7ce470b 100644
--- a/Build/NullSoftInstaller.hs
+++ b/Build/NullSoftInstaller.hs
@@ -21,7 +21,6 @@
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-}
import Development.NSIS
-import System.Directory
import System.FilePath
import Control.Monad
import Control.Applicative
@@ -36,6 +35,7 @@ import Utility.CopyFile
import Utility.SafeCommand
import Utility.Process
import Utility.Exception
+import Utility.Directory
import Build.BundledPrograms
main = do
diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs
index c23f4a3..948b0d5 100644
--- a/Build/OSXMkLibs.hs
+++ b/Build/OSXMkLibs.hs
@@ -10,7 +10,6 @@ module Main where
import System.Environment (getArgs)
import Data.Maybe
import System.FilePath
-import System.Directory
import Control.Monad
import Control.Monad.IfElse
import Data.List
diff --git a/Build/Standalone.hs b/Build/Standalone.hs
index a3a4bac..5cb09cd 100644
--- a/Build/Standalone.hs
+++ b/Build/Standalone.hs
@@ -12,12 +12,12 @@ module Main where
import Control.Monad.IfElse
import System.Environment
import System.FilePath
-import System.Directory
import Control.Monad
import Build.BundledPrograms
import Utility.SafeCommand
import Utility.Path
+import Utility.Directory
progDir :: FilePath -> FilePath
#ifdef darwin_HOST_OS
diff --git a/Build/TestConfig.hs b/Build/TestConfig.hs
index 35daf19..79979c5 100644
--- a/Build/TestConfig.hs
+++ b/Build/TestConfig.hs
@@ -7,10 +7,10 @@ module Build.TestConfig where
import Utility.Path
import Utility.Monad
import Utility.SafeCommand
+import Utility.Directory
import System.IO
import System.FilePath
-import System.Directory
type ConfigKey = String
data ConfigValue =
diff --git a/Build/Version.hs b/Build/Version.hs
index 5954de1..87315b0 100644
--- a/Build/Version.hs
+++ b/Build/Version.hs
@@ -6,7 +6,6 @@ module Build.Version where
import Data.List
import System.Environment
-import System.Directory
import Data.Char
import System.Process
import Control.Applicative
@@ -14,6 +13,7 @@ import Prelude
import Utility.Monad
import Utility.Exception
+import Utility.Directory
type Version = String
diff --git a/CHANGELOG b/CHANGELOG
index 86986ab..ab23627 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,9 +1,46 @@
+git-annex (6.20160511) unstable; urgency=medium
+
+ * Fix bug that sometimes prevented git-annex smudge --clean from consuming
+ all its input, which resulted in git add bypassing git-annex.
+ * Fix build with directory-1.2.6.2.
+ * Improve behavior when a just added http remote is not available
+ during uuid probe. Do not mark it as annex-ignore, so it will be tried
+ again later.
+ * Android: Icon refresh.
+ Thanks, freewheelinfranks.
+ * Added DIRHASH-LOWER to external special remote protocol.
+ * git-annex.cabal: Add Setup-Depends.
+ * stack.yaml: Enable explicit-setup-deps.
+ * Windows: Fix several bugs in propigation of changes from the adjusted
+ branch back to the master branch.
+ * Windows: Fix an over-long temp directory name.
+ * map: Hide dead repositories that are not connected to the graph.
+ * map: Changed colors; red is used for untrusted repositories and grey
+ for dead.
+ * version: Display OS version and architecture too.
+ * Propigate GIT_DIR and GIT_WORK_TREE environment to external special
+ remotes.
+ * Added annex.gnupg-decrypt-options and
+ remote.<name>.annex-gnupg-decrypt-options, which are passed to gpg
+ when it's decrypting data.
+ * fsck: When a key is not previously known in the location log,
+ record something so that reinject --known will work.
+ * In the unusual configuration where annex.crippledfilesystem=true but
+ core.symlinks=true, store object contents in mixed case hash
+ directories so that symlinks will point to them.
+ * Added new encryption=sharedpubkey mode for special remotes.
+ This is useful for makking a special remote that anyone with a clone
+ of the repo and your public keys can upload files to, but only you can
+ decrypt the files stored in it.
+
+ -- Joey Hess <id@joeyh.name> Wed, 11 May 2016 12:41:42 -0400
+
git-annex (6.20160419) unstable; urgency=medium
* Fix bug that prevented resuming of uploads to encrypted special remotes
that used chunking.
- * That bug could also expose the names of keys to such remotes when
- attempting to resume an upload, so it is a minor security issue.
+ * That bug could also expose the names of keys to such remotes, so it is a
+ minor security issue.
* Fix duplicate progress meter display when downloading from a git remote
over http with -J.
* reinject: When src file's content cannot be verified, leave it alone,
diff --git a/Command/Fix.hs b/Command/Fix.hs
index 3a153c7..6ef942b 100644
--- a/Command/Fix.hs
+++ b/Command/Fix.hs
@@ -18,7 +18,9 @@ import Annex.Content
import Annex.Perms
import qualified Annex.Queue
import qualified Database.Keys
+#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__)
import Utility.Touch
+#endif
cmd :: Command
cmd = notDirect $ noCommit $ withGlobalOptions annexedMatchingOptions $
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 0136175..28ce775 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -248,17 +248,24 @@ verifyLocationLog' key desc present u updatestatus = do
uuids <- loggedLocations key
case (present, u `elem` uuids) of
(True, False) -> do
- fix InfoPresent
- -- There is no data loss, so do not fail.
- return True
+ fix InfoPresent
+ -- There is no data loss, so do not fail.
+ return True
(False, True) -> do
- fix InfoMissing
- warning $
- "** Based on the location log, " ++ desc
- ++ "\n** was expected to be present, " ++
- "but its content is missing."
- return False
- _ -> return True
+ fix InfoMissing
+ warning $
+ "** Based on the location log, " ++ desc
+ ++ "\n** was expected to be present, " ++
+ "but its content is missing."
+ return False
+ (False, False) -> do
+ -- When the location log for the key is not present,
+ -- create it, so that the key will be known.
+ when (null uuids) $
+ whenM (not <$> isKnownKey key) $
+ updatestatus InfoMissing
+ return True
+ (True, True) -> return True
where
fix s = do
showNote "fixing location log"
diff --git a/Command/Map.hs b/Command/Map.hs
index 8aa59e3..d4a656b 100644
--- a/Command/Map.hs
+++ b/Command/Map.hs
@@ -19,6 +19,7 @@ import qualified Annex
import Annex.UUID
import Logs.UUID
import Logs.Trust
+import Types.TrustLevel
import qualified Remote.Helper.Ssh as Ssh
import qualified Utility.Dot as Dot
@@ -39,11 +40,11 @@ start = do
rs <- combineSame <$> (spider =<< gitRepo)
umap <- uuidMap
- trusted <- trustGet Trusted
+ trustmap <- trustMapLoad
file <- (</>) <$> fromRepo gitAnnexDir <*> pure "map.dot"
- liftIO $ writeFile file (drawMap rs umap trusted)
+ liftIO $ writeFile file (drawMap rs trustmap umap)
next $ next $
ifM (Annex.getState Annex.fast)
( do
@@ -55,24 +56,26 @@ start = do
liftIO $ boolSystem "dot" [Param "-Tx11", File file]
)
-{- Generates a graph for dot(1). Each repository, and any other uuids, are
- - displayed as a node, and each of its remotes is represented as an edge
- - pointing at the node for the remote.
+{- Generates a graph for dot(1). Each repository, and any other uuids
+ - (except for dead ones), are displayed as a node, and each of its
+ - remotes is represented as an edge pointing at the node for the remote.
-
- The order nodes are added to the graph matters, since dot will draw
- the first ones near to the top and left. So it looks better to put
- the repositories first, followed by uuids that were not matched
- to a repository.
-}
-drawMap :: [Git.Repo] -> M.Map UUID String -> [UUID] -> String
-drawMap rs umap ts = Dot.graph $ repos ++ trusted ++ others
+drawMap :: [Git.Repo] -> TrustMap -> M.Map UUID String -> String
+drawMap rs trustmap umap = Dot.graph $ repos ++ others
where
- repos = map (node umap rs) rs
- ruuids = ts ++ map getUncachedUUID rs
- others = map (unreachable . uuidnode) $
+ repos = map (node umap rs trustmap) rs
+ ruuids = map getUncachedUUID rs
+ others = map uuidnode $
+ filter (\u -> M.lookup u trustmap /= Just DeadTrusted) $
filter (`notElem` ruuids) (M.keys umap)
- trusted = map (trustworthy . uuidnode) ts
- uuidnode u = Dot.graphNode (fromUUID u) $ M.findWithDefault "" u umap
+ uuidnode u = trustDecorate trustmap u $
+ Dot.graphNode (fromUUID u) $ M.findWithDefault "" u umap
+ ts = M.keys (M.filter (== Trusted) trustmap)
hostname :: Git.Repo -> String
hostname r
@@ -100,15 +103,13 @@ nodeId r =
UUID u -> u
{- A node representing a repo. -}
-node :: M.Map UUID String -> [Git.Repo] -> Git.Repo -> String
-node umap fullinfo r = unlines $ n:edges
+node :: M.Map UUID String -> [Git.Repo] -> TrustMap -> Git.Repo -> String
+node umap fullinfo trustmap r = unlines $ n:edges
where
n = Dot.subGraph (hostname r) (basehostname r) "lightblue" $
- decorate $ Dot.graphNode (nodeId r) (repoName umap r)
+ trustDecorate trustmap (getUncachedUUID r) $
+ Dot.graphNode (nodeId r) (repoName umap r)
edges = map (edge umap fullinfo r) (Git.remotes r)
- decorate
- | Git.config r == M.empty = unreachable
- | otherwise = reachable
{- An edge between two repos. The second repo is a remote of the first. -}
edge :: M.Map UUID String -> [Git.Repo] -> Git.Repo -> Git.Repo -> String
@@ -129,12 +130,13 @@ edge umap fullinfo from to =
| n `elem` [repoName umap fullto, hostname fullto] = Nothing
| otherwise = Just n
-unreachable :: String -> String
-unreachable = Dot.fillColor "red"
-reachable :: String -> String
-reachable = Dot.fillColor "white"
-trustworthy :: String -> String
-trustworthy = Dot.fillColor "green"
+trustDecorate :: TrustMap -> UUID -> String -> String
+trustDecorate trustmap u s = case M.lookup u trustmap of
+ Just Trusted -> Dot.fillColor "green" s
+ Just UnTrusted -> Dot.fillColor "red" s
+ Just SemiTrusted -> Dot.fillColor "white" s
+ Just DeadTrusted -> Dot.fillColor "grey" s
+ Nothing -> Dot.fillColor "white" s
{- Recursively searches out remotes starting with the specified repo. -}
spider :: Git.Repo -> Annex [Git.Repo]
diff --git a/Command/Smudge.hs b/Command/Smudge.hs
index 1e169c1..52367d4 100644
--- a/Command/Smudge.hs
+++ b/Command/Smudge.hs
@@ -73,8 +73,13 @@ clean file = do
if isJust (parseLinkOrPointer b)
then liftIO $ B.hPut stdout b
else ifM (shouldAnnex file)
- ( liftIO . emitPointer
- =<< go =<< ingest =<< lockDown cfg file
+ ( do
+ -- Even though we ingest the actual file,
+ -- and not stdin, we need to consume all
+ -- stdin, or git will get annoyed.
+ B.length b `seq` return ()
+ liftIO . emitPointer
+ =<< go =<< ingest =<< lockDown cfg file
, liftIO $ B.hPut stdout b
)
stop
diff --git a/Command/Version.hs b/Command/Version.hs
index 1cfc0ae..e15f1fb 100644
--- a/Command/Version.hs
+++ b/Command/Version.hs
@@ -16,6 +16,8 @@ import qualified Types.Remote as R
import qualified Remote
import qualified Backend
+import System.Info
+
cmd :: Command
cmd = dontCheck repoExists $ noCommit $
noRepo (seekNoRepo <$$> optParser) $
@@ -53,6 +55,8 @@ showVersion = do
unwords supportedVersions
vinfo "upgrade supported from repository versions" $
unwords upgradableVersions
+ vinfo "operating system" $
+ unwords [os, arch]
showPackageVersion :: IO ()
showPackageVersion = do
diff --git a/Common.hs b/Common.hs
index 2b8b9a8..5213863 100644
--- a/Common.hs
+++ b/Common.hs
@@ -14,7 +14,6 @@ import Data.Monoid as X
import Data.Default as X
import System.FilePath as X
-import System.Directory as X
import System.IO as X hiding (FilePath)
#ifndef mingw32_HOST_OS
import System.Posix.IO as X hiding (createPipe)
diff --git a/Creds.hs b/Creds.hs
index 8cc7eed..6a2eaaf 100644
--- a/Creds.hs
+++ b/Creds.hs
@@ -94,7 +94,7 @@ getRemoteCredPair c storage = maybe fromcache (return . Just) =<< fromenv
Nothing -> return Nothing
fromenccreds enccreds cipher storablecipher = do
cmd <- gpgCmd <$> Annex.getGitConfig
- mcreds <- liftIO $ catchMaybeIO $ decrypt cmd cipher
+ mcreds <- liftIO $ catchMaybeIO $ decrypt cmd (getGpgDecParams c) cipher
(feedBytes $ L.pack $ fromB64 enccreds)
(readBytes $ return . L.unpack)
case mcreds of
diff --git a/Crypto.hs b/Crypto.hs
index 64b7f69..62c807f 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -18,8 +18,8 @@ module Crypto (
StorableCipher(..),
genEncryptedCipher,
genSharedCipher,
- updateEncryptedCipher,
- describeCipher,
+ genSharedPubKeyCipher,
+ updateCipherKeyIds,
decryptCipher,
encryptKey,
isEncKey,
@@ -29,6 +29,7 @@ module Crypto (
encrypt,
decrypt,
getGpgEncParams,
+ getGpgDecParams,
prop_HmacSha1WithCipher_sane
) where
@@ -73,7 +74,7 @@ cipherMac (Cipher c) = take cipherBeginning c
cipherMac (MacOnlyCipher c) = c
{- Creates a new Cipher, encrypted to the specified key id. -}
-genEncryptedCipher :: Gpg.GpgCmd -> String -> EncryptedCipherVariant -> Bool -> IO StorableCipher
+genEncryptedCipher :: Gpg.GpgCmd -> Gpg.KeyId -> EncryptedCipherVariant -> Bool -> IO StorableCipher
genEncryptedCipher cmd keyid variant highQuality = do
ks <- Gpg.findPubKeys cmd keyid
random <- Gpg.genRandom cmd highQuality size
@@ -88,35 +89,40 @@ genSharedCipher :: Gpg.GpgCmd -> Bool -> IO StorableCipher
genSharedCipher cmd highQuality =
SharedCipher <$> Gpg.genRandom cmd highQuality cipherSize
-{- Updates an existing Cipher, re-encrypting it to add or remove keyids,
- - depending on whether the first component is True or False. -}
-updateEncryptedCipher :: Gpg.GpgCmd -> [(Bool, String)] -> StorableCipher -> IO StorableCipher
-updateEncryptedCipher _ _ SharedCipher{} = error "Cannot update shared cipher"
-updateEncryptedCipher _ [] encipher = return encipher
-updateEncryptedCipher cmd newkeys encipher@(EncryptedCipher _ variant (KeyIds ks)) = do
- dropKeys <- listKeyIds [ k | (False, k) <- newkeys ]
- forM_ dropKeys $ \k -> unless (k `elem` ks) $
+{- Creates a new, shared Cipher, and looks up the gpg public key that will
+ - be used for encrypting content. -}
+genSharedPubKeyCipher :: Gpg.GpgCmd -> Gpg.KeyId -> Bool -> IO StorableCipher
+genSharedPubKeyCipher cmd keyid highQuality = do
+ ks <- Gpg.findPubKeys cmd keyid
+ random <- Gpg.genRandom cmd highQuality cipherSize
+ return $ SharedPubKeyCipher random ks
+
+{- Updates an existing Cipher, making changes to its keyids.
+ -
+ - When the Cipher is encrypted, re-encrypts it. -}
+updateCipherKeyIds :: Gpg.GpgCmd -> [(Bool, Gpg.KeyId)] -> StorableCipher -> IO StorableCipher
+updateCipherKeyIds _ _ SharedCipher{} = error "Cannot update shared cipher"
+updateCipherKeyIds _ [] c = return c
+updateCipherKeyIds cmd changes encipher@(EncryptedCipher _ variant ks) = do
+ ks' <- updateCipherKeyIds' cmd changes ks
+ cipher <- decryptCipher cmd encipher
+ encryptCipher cmd cipher variant ks'
+updateCipherKeyIds cmd changes (SharedPubKeyCipher cipher ks) =
+ SharedPubKeyCipher cipher <$> updateCipherKeyIds' cmd changes ks
+
+updateCipherKeyIds' :: Gpg.GpgCmd -> [(Bool, Gpg.KeyId)] -> KeyIds -> IO KeyIds
+updateCipherKeyIds' cmd changes (KeyIds ks) = do
+ dropkeys <- listKeyIds [ k | (False, k) <- changes ]
+ forM_ dropkeys $ \k -> unless (k `elem` ks) $
error $ "Key " ++ k ++ " was not present; cannot remove."
- addKeys <- listKeyIds [ k | (True, k) <- newkeys ]
- let ks' = (addKeys ++ ks) \\ dropKeys
+ addkeys <- listKeyIds [ k | (True, k) <- changes ]
+ let ks' = (addkeys ++ ks) \\ dropkeys
when (null ks') $
error "Cannot remove the last key."
- cipher <- decryptCipher cmd encipher
- encryptCipher cmd cipher variant $ KeyIds ks'
+ return $ KeyIds ks'
where
listKeyIds = concat <$$> mapM (keyIds <$$> Gpg.findPubKeys cmd)
-describeCipher :: StorableCipher -> String
-describeCipher (SharedCipher _) = "shared cipher"
-describeCipher (EncryptedCipher _ variant (KeyIds ks)) =
- scheme ++ " with gpg " ++ keys ks ++ " " ++ unwords ks
- where
- scheme = case variant of
- Hybrid -> "hybrid cipher"
- PubKey -> "pubkey crypto"
- keys [_] = "key"
- keys _ = "keys"
-
{- Encrypts a Cipher to the specified KeyIds. -}
encryptCipher :: Gpg.GpgCmd -> Cipher -> EncryptedCipherVariant -> KeyIds -> IO StorableCipher
encryptCipher cmd c variant (KeyIds ks) = do
@@ -133,6 +139,7 @@ encryptCipher cmd c variant (KeyIds ks) = do
{- Decrypting an EncryptedCipher is expensive; the Cipher should be cached. -}
decryptCipher :: Gpg.GpgCmd -> StorableCipher -> IO Cipher
decryptCipher _ (SharedCipher t) = return $ Cipher t
+decryptCipher _ (SharedPubKeyCipher t _) = return $ MacOnlyCipher t
decryptCipher cmd (EncryptedCipher t variant _) =
mkCipher <$> Gpg.pipeStrict cmd [ Param "--decrypt" ] t
where
@@ -184,10 +191,12 @@ encrypt cmd params cipher = case cipher of
{- Runs a Feeder action, that generates content that is decrypted with the
- Cipher (or using a private key if the Cipher is empty), and read by the
- Reader action. -}
-decrypt :: (MonadIO m, MonadMask m) => Gpg.GpgCmd -> Cipher -> Feeder -> Reader m a -> m a
-decrypt cmd cipher = case cipher of
- Cipher{} -> Gpg.feedRead cmd [Param "--decrypt"] $ cipherPassphrase cipher
- MacOnlyCipher{} -> Gpg.pipeLazy cmd [Param "--decrypt"]
+decrypt :: (MonadIO m, MonadMask m) => Gpg.GpgCmd -> [CommandParam] -> Cipher -> Feeder -> Reader m a -> m a
+decrypt cmd params cipher = case cipher of
+ Cipher{} -> Gpg.feedRead cmd params' $ cipherPassphrase cipher
+ MacOnlyCipher{} -> Gpg.pipeLazy cmd params'
+ where
+ params' = Param "--decrypt" : params
macWithCipher :: Mac -> Cipher -> String -> String
macWithCipher mac c = macWithCipher' mac (cipherMac c)
@@ -200,26 +209,31 @@ prop_HmacSha1WithCipher_sane = known_good == macWithCipher' HmacSha1 "foo" "bar"
where
known_good = "46b4ec586117154dacd49d664e5d63fdc88efb51"
-{- Return some options suitable for GnuPG encryption, symmetric or not. -}
-class LensGpgEncParams a where getGpgEncParams :: a -> [CommandParam]
+class LensGpgEncParams a where
+ {- Parameters for encrypting. -}
+ getGpgEncParams :: a -> [CommandParam]
+ {- Parameters for decrypting. -}
+ getGpgDecParams :: a -> [CommandParam]
{- Extract the GnuPG options from a pair of a Remote Config and a Remote
- Git Config. -}
instance LensGpgEncParams (RemoteConfig, RemoteGitConfig) where
getGpgEncParams (c,gc) = map Param (remoteAnnexGnupgOptions gc) ++ getGpgEncParams c
- where
+ getGpgDecParams (c,gc) = map Param (remoteAnnexGnupgDecryptOptions gc) ++ getGpgDecParams c
{- Extract the GnuPG options from a Remote Config, ignoring any
- git config settings. (Which is ok if the remote is just being set up
- - and so doesn't have any.)
- -
- - If the remote is configured to use public-key encryption,
- - look up the recipient keys and add them to the option list.-}
+ - and so doesn't have any.) -}
instance LensGpgEncParams RemoteConfig where
+ {- If the remote is configured to use public-key encryption,
+ - look up the recipient keys and add them to the option list. -}
getGpgEncParams c = case M.lookup "encryption" c of
Just "pubkey" -> Gpg.pkEncTo $ maybe [] (split ",") $ M.lookup "cipherkeys" c
+ Just "sharedpubkey" -> Gpg.pkEncTo $ maybe [] (split ",") $ M.lookup "pubkeys" c
_ -> []
+ getGpgDecParams _ = []
{- Extract the GnuPG options from a Remote. -}
instance LensGpgEncParams (RemoteA a) where
getGpgEncParams r = getGpgEncParams (config r, gitconfig r)
+ getGpgDecParams r = getGpgDecParams (config r, gitconfig r)
diff --git a/Git.hs b/Git.hs
index 6f7769c..b350515 100644
--- a/Git.hs
+++ b/Git.hs
@@ -26,6 +26,7 @@ module Git (
repoDescribe,
repoLocation,
repoPath,
+ repoWorkTree,
localGitDir,
attributes,
attributesLocal,
@@ -73,6 +74,10 @@ repoPath Repo { location = Local { gitdir = d } } = d
repoPath Repo { location = LocalUnknown dir } = dir
repoPath Repo { location = Unknown } = error "unknown repoPath"
+repoWorkTree :: Repo -> Maybe FilePath
+repoWorkTree Repo { location = Local { worktree = Just d } } = Just d
+repoWorkTree _ = Nothing
+
{- Path to a local repository's .git directory. -}
localGitDir :: Repo -> FilePath
localGitDir Repo { location = Local { gitdir = d } } = d
diff --git a/Git/Env.hs b/Git/Env.hs
index b0070e9..f41f3ad 100644
--- a/Git/Env.hs
+++ b/Git/Env.hs
@@ -9,12 +9,10 @@
module Git.Env where
+import Common
import Git
import Git.Types
import Utility.Env
-#ifdef __ANDROID__
-import Common
-#endif
{- Adjusts the gitEnv of a Repo. Copies the system environment if the repo
- does not have any gitEnv yet. -}
@@ -41,6 +39,16 @@ adjustGitEnv g adj = do
addGitEnv :: Repo -> String -> String -> IO Repo
addGitEnv g var val = adjustGitEnv g (addEntry var val)
+{- Environment variables to use when running a command.
+ - Includes GIT_DIR pointing at the repo, and GIT_WORK_TREE when the repo
+ - is not bare. Also includes anything added to the Repo's gitEnv,
+ - and a copy of the rest of the system environment. -}
+propGitEnv :: Repo -> IO [(String, String)]
+propGitEnv g = do
+ g' <- addGitEnv g "GIT_DIR" (localGitDir g)
+ g'' <- maybe (pure g') (addGitEnv g' "GIT_WORK_TREE") (repoWorkTree g)
+ return $ fromMaybe [] (gitEnv g'')
+
{- Use with any action that makes a commit to set metadata. -}
commitWithMetaData :: CommitMetaData -> CommitMetaData -> (Repo -> IO a) -> Repo -> IO a
commitWithMetaData authormetadata committermetadata a g =
diff --git a/Git/Tree.hs b/Git/Tree.hs
index 3ef3f68..cfd5b91 100644
--- a/Git/Tree.hs
+++ b/Git/Tree.hs
@@ -117,9 +117,9 @@ treeItemToTreeContent (TreeItem f m s) = TreeBlob f m s
treeItemsToTree :: [TreeItem] -> Tree
treeItemsToTree = go M.empty
where
- go m [] = Tree $ filter (notElem '/' . gitPath) (M.elems m)
+ go m [] = Tree $ filter inTopTree (M.elems m)
go m (i:is)
- | '/' `notElem` p =
+ | inTopTree p =
go (M.insert p (treeItemToTreeContent i) m) is
| otherwise = case M.lookup idir m of
Just (NewSubTree d l) ->
@@ -132,7 +132,7 @@ treeItemsToTree = go M.empty
c = treeItemToTreeContent i
addsubtree d m t
- | elem '/' d =
+ | not (inTopTree d) =
let m' = M.insert d t m
in case M.lookup parent m' of
Just (NewSubTree d' l) ->
@@ -202,8 +202,8 @@ adjustTree adjusttreeitem addtreeitems removefiles r repo =
addunderhere' <- liftIO $ mapM (recordSubTree h) addunderhere
return (addunderhere'++l')
- removeset = S.fromList removefiles
- removed (TreeBlob f _ _) = S.member f removeset
+ removeset = S.fromList $ map (normalise . gitPath) removefiles
+ removed (TreeBlob f _ _) = S.member (normalise (gitPath f)) removeset
removed _ = False
{- Assumes the list is ordered, with tree objects coming right before their
@@ -256,7 +256,7 @@ inTree :: (GitPath t, GitPath f) => t -> f -> Bool
inTree t f = gitPath t == takeDirectory (gitPath f)
beneathSubTree :: (GitPath t, GitPath f) => t -> f -> Bool
-beneathSubTree t f = prefix `isPrefixOf` gitPath f
+beneathSubTree t f = prefix `isPrefixOf` normalise (gitPath f)
where
tp = gitPath t
- prefix = if null tp then tp else tp ++ "/"
+ prefix = if null tp then tp else addTrailingPathSeparator (normalise tp)
diff --git a/Remote/External.hs b/Remote/External.hs
index 20fd4e5..54db82d 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -16,6 +16,7 @@ import Types.UrlContents
import qualified Git
import Config
import Git.Config (isTrue, boolConfig)
+import Git.Env
import Remote.Helper.Special
import Remote.Helper.ReadOnly
import Remote.Helper.Messages
@@ -227,6 +228,8 @@ handleRequest' lck external req mp responsehandler
maybe noop (\a -> liftIO $ a bytesprocessed) mp
handleRemoteRequest (DIRHASH k) =
send $ VALUE $ hashDirMixed def k
+ handleRemoteRequest (DIRHASH_LOWER k) =
+ send $ VALUE $ hashDirLower def k
handleRemoteRequest (SETCONFIG setting value) =
liftIO $ atomically $ do
let v = externalConfig external
@@ -367,7 +370,9 @@ fromExternal lck external extractor a =
startExternal :: ExternalType -> Annex ExternalState
startExternal externaltype = do
errrelayer <- mkStderrRelayer
+ g <- Annex.gitRepo
liftIO $ do
+ p <- propgit g cmdp
(Just hin, Just hout, Just herr, pid) <-
createProcess p `catchIO` runerr
fileEncoding hin
@@ -385,11 +390,14 @@ startExternal externaltype = do
}
where
cmd = externalRemoteProgram externaltype
- p = (proc cmd [])
+ cmdp = (proc cmd [])
{ std_in = CreatePipe
, std_out = CreatePipe
, std_err = CreatePipe
}
+ propgit g p = do
+ environ <- propGitEnv g
+ return $ p { env = Just environ }
runerr _ = error ("Cannot run " ++ cmd ++ " -- Make sure it's in your PATH and is executable.")
diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs
index 80c7857..2ce4983 100644
--- a/Remote/External/Types.hs
+++ b/Remote/External/Types.hs
@@ -176,6 +176,7 @@ data RemoteRequest
= VERSION ProtocolVersion
| PROGRESS BytesProcessed
| DIRHASH Key
+ | DIRHASH_LOWER Key
| SETCONFIG Setting String
| GETCONFIG Setting
| SETCREDS Setting String String
@@ -198,6 +199,7 @@ instance Proto.Receivable RemoteRequest where
parseCommand "VERSION" = Proto.parse1 VERSION
parseCommand "PROGRESS" = Proto.parse1 PROGRESS
parseCommand "DIRHASH" = Proto.parse1 DIRHASH
+ parseCommand "DIRHASH-LOWER" = Proto.parse1 DIRHASH_LOWER
parseCommand "SETCONFIG" = Proto.parse2 SETCONFIG
parseCommand "GETCONFIG" = Proto.parse1 GETCONFIG
parseCommand "SETCREDS" = Proto.parse3 SETCREDS
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs
index eb81726..38b85d9 100644
--- a/Remote/GCrypt.hs
+++ b/Remote/GCrypt.hs
@@ -297,9 +297,9 @@ shellOrRsync r ashell arsync
setGcryptEncryption :: RemoteConfig -> String -> Annex ()
setGcryptEncryption c remotename = do
let participants = remoteconfig Git.GCrypt.remoteParticipantConfigKey
- case extractCipher c of
+ case cipherKeyIds =<< extractCipher c of
Nothing -> noCrypto
- Just (EncryptedCipher _ _ (KeyIds { keyIds = ks})) -> do
+ Just (KeyIds { keyIds = ks}) -> do
setConfig participants (unwords ks)
let signingkey = ConfigKey $ Git.GCrypt.remoteSigningKey remotename
cmd <- gpgCmd <$> Annex.getGitConfig
@@ -307,8 +307,6 @@ setGcryptEncryption c remotename = do
case filter (`elem` ks) skeys of
[] -> noop
(k:_) -> setConfig signingkey k
- Just (SharedCipher _) ->
- unsetConfig participants
setConfig (remoteconfig Git.GCrypt.remotePublishParticipantConfigKey)
(Git.Config.boolConfig True)
where
diff --git a/Remote/Git.hs b/Remote/Git.hs
index a099295..627a606 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -233,14 +233,17 @@ tryGitConfigRead autoinit r
hClose h
let url = Git.repoLocation r ++ "/config"
ifM (Url.downloadQuiet url tmpfile uo)
- ( pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]
- , return $ Left $ error $ "unable to load config from " ++ url
+ ( Just <$> pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]
+ , return Nothing
)
case v of
- Left _ -> do
+ Nothing -> do
+ warning $ "Failed to get annex.uuid configuration of repository " ++ Git.repoDescribe r
+ return r
+ Just (Left _) -> do
set_ignore "not usable by git-annex" False
return r
- Right r' -> do
+ Just (Right r') -> do
-- Cache when http remote is not bare for
-- optimisation.
unless (Git.Config.isBare r') $
diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs
index 6d294b9..46ce57d 100644
--- a/Remote/Helper/Encryptable.hs
+++ b/Remote/Helper/Encryptable.hs
@@ -14,7 +14,6 @@ module Remote.Helper.Encryptable (
remoteCipher',
embedCreds,
cipherKey,
- storeCipher,
extractCipher,
describeEncryption,
) where
@@ -58,20 +57,18 @@ encryptionSetup c = do
encryption = M.lookup "encryption" c
-- Generate a new cipher, depending on the chosen encryption scheme
genCipher cmd = case encryption of
- _ | M.member "cipher" c || M.member "cipherkeys" c -> cannotchange
+ _ | M.member "cipher" c || M.member "cipherkeys" c || M.member "pubkeys" c -> cannotchange
Just "none" -> return (c, NoEncryption)
- Just "shared" -> use "encryption setup" . genSharedCipher cmd
- =<< highRandomQuality
+ Just "shared" -> encsetup $ genSharedCipher cmd
-- hybrid encryption is the default when a keyid is
-- specified but no encryption
_ | maybe (M.member "keyid" c) (== "hybrid") encryption ->
- use "encryption setup" . genEncryptedCipher cmd key Hybrid
- =<< highRandomQuality
- Just "pubkey" -> use "encryption setup" . genEncryptedCipher cmd key PubKey
- =<< highRandomQuality
+ encsetup $ genEncryptedCipher cmd key Hybrid
+ Just "pubkey" -> encsetup $ genEncryptedCipher cmd key PubKey
+ Just "sharedpubkey" -> encsetup $ genSharedPubKeyCipher cmd key
_ -> error $ "Specify " ++ intercalate " or "
(map ("encryption=" ++)
- ["none","shared","hybrid","pubkey"])
+ ["none","shared","hybrid","pubkey", "sharedpubkey"])
++ "."
key = fromMaybe (error "Specifiy keyid=...") $ M.lookup "keyid" c
newkeys = maybe [] (\k -> [(True,k)]) (M.lookup "keyid+" c) ++
@@ -82,13 +79,16 @@ encryptionSetup c = do
SharedCipher _ | maybe True (== "shared") encryption -> return (c', EncryptionIsSetup)
EncryptedCipher _ variant _
| maybe True (== if variant == Hybrid then "hybrid" else "pubkey") encryption ->
- use "encryption update" $ updateEncryptedCipher cmd newkeys v
+ use "encryption update" $ updateCipherKeyIds cmd newkeys v
+ SharedPubKeyCipher _ _ ->
+ use "encryption update" $ updateCipherKeyIds cmd newkeys v
_ -> cannotchange
+ encsetup a = use "encryption setup" . a =<< highRandomQuality
use m a = do
showNote m
cipher <- liftIO a
- showNote $ describeCipher cipher
- return (storeCipher c' cipher, EncryptionIsSetup)
+ mapM_ showNote (describeCipher cipher)
+ return (storeCipher cipher c', EncryptionIsSetup)
highRandomQuality =
(&&) (maybe True ( /= "false") $ M.lookup "highRandomQuality" c)
<$> fmap not (Annex.getState Annex.fast)
@@ -123,8 +123,8 @@ remoteCipher' c = go $ extractCipher c
- embedcreds=yes allows this, and embedcreds=no prevents it.
-
- If not set, the default is to only store creds when it's surely safe:
- - When gpg encryption is used, in which case the creds will be encrypted
- - using it. Not when a shared cipher is used.
+ - When gpg encryption is used and the creds are encrypted using it.
+ - Not when a shared cipher is used.
-}
embedCreds :: RemoteConfig -> Bool
embedCreds c
@@ -141,22 +141,26 @@ cipherKey c = fmap make <$> remoteCipher c
mac = fromMaybe defaultMac $ M.lookup "mac" c >>= readMac
{- Stores an StorableCipher in a remote's configuration. -}
-storeCipher :: RemoteConfig -> StorableCipher -> RemoteConfig
-storeCipher c (SharedCipher t) = M.insert "cipher" (toB64bs t) c
-storeCipher c (EncryptedCipher t _ ks) =
- M.insert "cipher" (toB64bs t) $ M.insert "cipherkeys" (showkeys ks) c
+storeCipher :: StorableCipher -> RemoteConfig -> RemoteConfig
+storeCipher cip = case cip of
+ (SharedCipher t) -> addcipher t
+ (EncryptedCipher t _ ks) -> addcipher t . storekeys ks "cipherkeys"
+ (SharedPubKeyCipher t ks) -> addcipher t . storekeys ks "pubkeys"
where
- showkeys (KeyIds l) = intercalate "," l
+ addcipher t = M.insert "cipher" (toB64bs t)
+ storekeys (KeyIds l) n = M.insert n (intercalate "," l)
{- Extracts an StorableCipher from a remote's configuration. -}
extractCipher :: RemoteConfig -> Maybe StorableCipher
extractCipher c = case (M.lookup "cipher" c,
- M.lookup "cipherkeys" c,
+ M.lookup "cipherkeys" c <|> M.lookup "pubkeys" c,
M.lookup "encryption" c) of
(Just t, Just ks, encryption) | maybe True (== "hybrid") encryption ->
Just $ EncryptedCipher (fromB64bs t) Hybrid (readkeys ks)
(Just t, Just ks, Just "pubkey") ->
Just $ EncryptedCipher (fromB64bs t) PubKey (readkeys ks)
+ (Just t, Just ks, Just "sharedpubkey") ->
+ Just $ SharedPubKeyCipher (fromB64bs t) (readkeys ks)
(Just t, Nothing, encryption) | maybe True (== "shared") encryption ->
Just $ SharedCipher (fromB64bs t)
_ -> Nothing
@@ -166,14 +170,25 @@ extractCipher c = case (M.lookup "cipher" c,
describeEncryption :: RemoteConfig -> String
describeEncryption c = case extractCipher c of
Nothing -> "not encrypted"
- (Just (SharedCipher _)) -> "encrypted (encryption key stored in git repository)"
- (Just (EncryptedCipher _ v (KeyIds { keyIds = ks }))) -> unwords $ catMaybes
- [ Just "encrypted (to gpg keys:"
- , Just (unwords ks ++ ")")
+ Just cip -> "encrypted " ++ unwords (map paren (describeCipher cip))
+ where
+ paren s = "(" ++ s ++ ")"
+
+describeCipher :: StorableCipher -> [String]
+describeCipher c = case c of
+ (SharedCipher _) -> ["encryption key stored in git repository"]
+ (EncryptedCipher _ v ks) -> catMaybes
+ [ Just $ showkeys ks
, case v of
PubKey -> Nothing
- Hybrid -> Just "(hybrid mode)"
+ Hybrid -> Just "hybrid mode"
]
+ (SharedPubKeyCipher _ ks) ->
+ [ showkeys ks
+ , "shared cipher"
+ ]
+ where
+ showkeys (KeyIds { keyIds = ks }) = "to gpg keys: " ++ unwords ks
{- Not using Utility.Base64 because these "Strings" are really
- bags of bytes and that would convert to unicode and not round-trip
diff --git a/Remote/Helper/Special.hs b/Remote/Helper/Special.hs
index f9b5dea..cf0524d 100644
--- a/Remote/Helper/Special.hs
+++ b/Remote/Helper/Special.hs
@@ -178,7 +178,8 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
}
cip = cipherKey c
isencrypted = isJust (extractCipher c)
- gpgopts = getGpgEncParams encr
+ gpgencopts = getGpgEncParams encr
+ gpgdecopts = getGpgDecParams encr
safely a = catchNonAsync a (\e -> warning (show e) >> return False)
@@ -200,7 +201,7 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
storechunk (Just (cipher, enck)) storer k content p = do
cmd <- gpgCmd <$> Annex.getGitConfig
withBytes content $ \b ->
- encrypt cmd gpgopts cipher (feedBytes b) $
+ encrypt cmd gpgencopts cipher (feedBytes b) $
readBytes $ \encb ->
storer (enck k) (ByteContent encb) p
@@ -210,7 +211,7 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
where
go (Just retriever) = displayprogress p k $ \p' ->
retrieveChunks retriever (uuid baser) chunkconfig
- enck k dest p' (sink dest enc)
+ enck k dest p' (sink dest enc gpgdecopts)
go Nothing = return False
enck = maybe id snd enc
@@ -245,23 +246,24 @@ specialRemote' cfg c preparestorer prepareretriever prepareremover preparecheckp
sink
:: FilePath
-> Maybe (Cipher, EncKey)
+ -> [CommandParam]
-> Maybe Handle
-> Maybe MeterUpdate
-> ContentSource
-> Annex Bool
-sink dest enc mh mp content = do
+sink dest enc gpgdecopts mh mp content = do
case (enc, mh, content) of
(Nothing, Nothing, FileContent f)
| f == dest -> noop
| otherwise -> liftIO $ moveFile f dest
(Just (cipher, _), _, ByteContent b) -> do
cmd <- gpgCmd <$> Annex.getGitConfig
- decrypt cmd cipher (feedBytes b) $
+ decrypt cmd gpgdecopts cipher (feedBytes b) $
readBytes write
(Just (cipher, _), _, FileContent f) -> do
cmd <- gpgCmd <$> Annex.getGitConfig
withBytes content $ \b ->
- decrypt cmd cipher (feedBytes b) $
+ decrypt cmd gpgdecopts cipher (feedBytes b) $
readBytes write
liftIO $ nukeFile f
(Nothing, _, FileContent f) -> do
diff --git a/Remote/S3.hs b/Remote/S3.hs
index d1c6dd3..1635d22 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -604,7 +604,7 @@ s3Info c info = catMaybes
[ Just ("bucket", fromMaybe "unknown" (getBucketName c))
, Just ("endpoint", w82s (S.unpack (S3.s3Endpoint s3c)))
, Just ("port", show (S3.s3Port s3c))
- , Just ("storage class", show (getStorageClass c))
+ , Just ("storage class", showstorageclass (getStorageClass c))
, if configIA c
then Just ("internet archive item", iaItemUrl $ fromMaybe "unknown" $ getBucketName c)
else Nothing
@@ -613,6 +613,10 @@ s3Info c info = catMaybes
]
where
s3c = s3Configuration c
+#if MIN_VERSION_aws(0,13,0)
+ showstorageclass (S3.OtherStorageClass t) = T.unpack t
+#endif
+ showstorageclass sc = show sc
getWebUrls :: S3Info -> Key -> Annex [URLString]
getWebUrls info k = case (public info, getpublicurl info) of
diff --git a/Setup.hs b/Setup.hs
index 0684674..3e6637f 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -15,6 +15,7 @@ import Control.Monad
import System.Directory
import Data.List
import Control.Exception
+import qualified System.Info
import qualified Build.DesktopFile as DesktopFile
import qualified Build.Configure as Configure
@@ -28,7 +29,7 @@ main = defaultMainWithHooks simpleUserHooks
}
myPostCopy :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO ()
-myPostCopy _ flags pkg lbi = do
+myPostCopy _ flags pkg lbi = when (System.Info.os /= "mingw32") $ do
installGitAnnexShell dest verbosity pkg lbi
installManpages dest verbosity pkg lbi
installDesktopFile dest verbosity pkg lbi
diff --git a/Types/Crypto.hs b/Types/Crypto.hs
index 79970c2..c5a00d0 100644
--- a/Types/Crypto.hs
+++ b/Types/Crypto.hs
@@ -10,6 +10,7 @@ module Types.Crypto (
StorableCipher(..),
EncryptedCipherVariant(..),
KeyIds(..),
+ cipherKeyIds,
Mac(..),
readMac,
showMac,
@@ -23,12 +24,19 @@ import Utility.Gpg (KeyIds(..))
-- XXX ideally, this would be a locked memory region
data Cipher = Cipher String | MacOnlyCipher String
-data StorableCipher = EncryptedCipher String EncryptedCipherVariant KeyIds
- | SharedCipher String
+data StorableCipher
+ = EncryptedCipher String EncryptedCipherVariant KeyIds
+ | SharedCipher String
+ | SharedPubKeyCipher String KeyIds
deriving (Ord, Eq)
data EncryptedCipherVariant = Hybrid | PubKey
deriving (Ord, Eq)
+cipherKeyIds :: StorableCipher -> Maybe KeyIds
+cipherKeyIds (EncryptedCipher _ _ ks) = Just ks
+cipherKeyIds (SharedPubKeyCipher _ ks) = Just ks
+cipherKeyIds (SharedCipher _) = Nothing
+
defaultMac :: Mac
defaultMac = HmacSha1
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs
index b5e3d79..33f102e 100644
--- a/Types/GitConfig.hs
+++ b/Types/GitConfig.hs
@@ -162,6 +162,7 @@ data RemoteGitConfig = RemoteGitConfig
, remoteAnnexRsyncDownloadOptions :: [String]
, remoteAnnexRsyncTransport :: [String]
, remoteAnnexGnupgOptions :: [String]
+ , remoteAnnexGnupgDecryptOptions :: [String]
, remoteAnnexRsyncUrl :: Maybe String
, remoteAnnexBupRepo :: Maybe String
, remoteAnnexTahoe :: Maybe FilePath
@@ -196,6 +197,7 @@ extractRemoteGitConfig r remotename = RemoteGitConfig
, remoteAnnexRsyncUploadOptions = getoptions "rsync-upload-options"
, remoteAnnexRsyncTransport = getoptions "rsync-transport"
, remoteAnnexGnupgOptions = getoptions "gnupg-options"
+ , remoteAnnexGnupgDecryptOptions = getoptions "gnupg-decrypt-options"
, remoteAnnexRsyncUrl = notempty $ getmaybe "rsyncurl"
, remoteAnnexBupRepo = getmaybe "buprepo"
, remoteAnnexTahoe = getmaybe "tahoe"
diff --git a/Utility/Directory.hs b/Utility/Directory.hs
index fa9d14f..3b12b9f 100644
--- a/Utility/Directory.hs
+++ b/Utility/Directory.hs
@@ -6,12 +6,15 @@
-}
{-# LANGUAGE CPP #-}
-{-# OPTIONS_GHC -fno-warn-tabs #-}
+{-# OPTIONS_GHC -fno-warn-tabs -w #-}
-module Utility.Directory where
+module Utility.Directory (
+ module Utility.Directory,
+ module System.Directory
+) where
import System.IO.Error
-import System.Directory
+import System.Directory hiding (isSymbolicLink)
import Control.Monad
import System.FilePath
import Control.Applicative
diff --git a/Utility/FreeDesktop.hs b/Utility/FreeDesktop.hs
index f8b9fd7..abaa313 100644
--- a/Utility/FreeDesktop.hs
+++ b/Utility/FreeDesktop.hs
@@ -33,9 +33,9 @@ import Utility.Path
import Utility.UserInfo
import Utility.Process
import Utility.PartialPrelude
+import Utility.Directory
import System.Environment
-import System.Directory
import System.FilePath
import Data.List
import Data.String.Utils
diff --git a/Utility/LinuxMkLibs.hs b/Utility/LinuxMkLibs.hs
index fdeb779..122f396 100644
--- a/Utility/LinuxMkLibs.hs
+++ b/Utility/LinuxMkLibs.hs
@@ -14,7 +14,6 @@ import Utility.Monad
import Utility.Path
import Data.Maybe
-import System.Directory
import System.FilePath
import Data.List.Utils
import System.Posix.Files
diff --git a/Utility/LockFile/PidLock.hs b/Utility/LockFile/PidLock.hs
index a21014c..6a3e86a 100644
--- a/Utility/LockFile/PidLock.hs
+++ b/Utility/LockFile/PidLock.hs
@@ -34,7 +34,6 @@ import Data.List
import Network.BSD
import System.FilePath
import Data.Hash.MD5
-import System.Directory
import Control.Applicative
import Prelude
diff --git a/Utility/Path.hs b/Utility/Path.hs
index e44975a..3ee5ff3 100644
--- a/Utility/Path.hs
+++ b/Utility/Path.hs
@@ -12,7 +12,6 @@ module Utility.Path where
import Data.String.Utils
import System.FilePath
-import System.Directory
import Data.List
import Data.Maybe
import Data.Char
@@ -29,6 +28,7 @@ import Utility.Exception
import qualified "MissingH" System.Path as MissingH
import Utility.Monad
import Utility.UserInfo
+import Utility.Directory
{- Simplifies a path, removing any "." component, collapsing "dir/..",
- and removing the trailing path separator.
diff --git a/Utility/Tmp.hs b/Utility/Tmp.hs
index 7610f6c..6a541cf 100644
--- a/Utility/Tmp.hs
+++ b/Utility/Tmp.hs
@@ -11,9 +11,9 @@
module Utility.Tmp where
import System.IO
-import System.Directory
import Control.Monad.IfElse
import System.FilePath
+import System.Directory
import Control.Monad.IO.Class
#ifndef mingw32_HOST_OS
import System.Posix.Temp (mkdtemp)
diff --git a/debian/changelog b/debian/changelog
index 86986ab..ab23627 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,46 @@
+git-annex (6.20160511) unstable; urgency=medium
+
+ * Fix bug that sometimes prevented git-annex smudge --clean from consuming
+ all its input, which resulted in git add bypassing git-annex.
+ * Fix build with directory-1.2.6.2.
+ * Improve behavior when a just added http remote is not available
+ during uuid probe. Do not mark it as annex-ignore, so it will be tried
+ again later.
+ * Android: Icon refresh.
+ Thanks, freewheelinfranks.
+ * Added DIRHASH-LOWER to external special remote protocol.
+ * git-annex.cabal: Add Setup-Depends.
+ * stack.yaml: Enable explicit-setup-deps.
+ * Windows: Fix several bugs in propigation of changes from the adjusted
+ branch back to the master branch.
+ * Windows: Fix an over-long temp directory name.
+ * map: Hide dead repositories that are not connected to the graph.
+ * map: Changed colors; red is used for untrusted repositories and grey
+ for dead.
+ * version: Display OS version and architecture too.
+ * Propigate GIT_DIR and GIT_WORK_TREE environment to external special
+ remotes.
+ * Added annex.gnupg-decrypt-options and
+ remote.<name>.annex-gnupg-decrypt-options, which are passed to gpg
+ when it's decrypting data.
+ * fsck: When a key is not previously known in the location log,
+ record something so that reinject --known will work.
+ * In the unusual configuration where annex.crippledfilesystem=true but
+ core.symlinks=true, store object contents in mixed case hash
+ directories so that symlinks will point to them.
+ * Added new encryption=sharedpubkey mode for special remotes.
+ This is useful for makking a special remote that anyone with a clone
+ of the repo and your public keys can upload files to, but only you can
+ decrypt the files stored in it.
+
+ -- Joey Hess <id@joeyh.name> Wed, 11 May 2016 12:41:42 -0400
+
git-annex (6.20160419) unstable; urgency=medium
* Fix bug that prevented resuming of uploads to encrypted special remotes
that used chunking.
- * That bug could also expose the names of keys to such remotes when
- attempting to resume an upload, so it is a minor security issue.
+ * That bug could also expose the names of keys to such remotes, so it is a
+ minor security issue.
* Fix duplicate progress meter display when downloading from a git remote
over http with -J.
* reinject: When src file's content cannot be verified, leave it alone,
diff --git a/doc/bugs/Android_chroot_stuck_in_Cabal_hell.mdwn b/doc/bugs/Android_chroot_stuck_in_Cabal_hell.mdwn
index 1587d4a..1cca413 100644
--- a/doc/bugs/Android_chroot_stuck_in_Cabal_hell.mdwn
+++ b/doc/bugs/Android_chroot_stuck_in_Cabal_hell.mdwn
@@ -18,3 +18,5 @@ collect2: error: ld returned 1 exit status
Makefile:225: recipe for target 'android' failed
make: *** [android] Error 1
"""]]
+
+> [[fixed|done]] --[[Joey]]
diff --git a/doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn b/doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn
new file mode 100644
index 0000000..a9e822d
--- /dev/null
+++ b/doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn
@@ -0,0 +1,104 @@
+### Please describe the problem.
+Git-annex with v6 repo causes weird file creation behavior.
+
+### What steps will reproduce the problem?
+On central repo:
+ git init --bare central6
+ cd central6
+ git annex init origin
+ git annex upgrade
+On Client A
+ git clone {central6 repo path/URI}
+ cd central6
+ git annex init clientA6
+ git annex upgrade
+On Client B
+ git clone {central6 repo path/URI}
+ cd central6
+ git annex init clientB6
+ git annex upgrade
+Start assistant on both clients.
+Start webapp on both clients.
+Add files to both clients.
+Wait for assistant to sync new files.
+Force sync with webapp on both clients
+
+At this point examine files coming from the central repo on the non-originating client. I see:
+Client A originated file:
+-rw-rw-r--. 1 user group 92528731 May 10 20:16 image.png
+Client B created file:
+-rw-rw-r--. 1 user group 103 May 10 20:21 image.png
+
+Here's the content of Client B's file:
+/annex/objects/SHA256E-s92528731--098928032fddbd0327c1d608249a133e276a00b8aa8bffca371bd32bded49777.png
+
+### What version of git-annex are you using? On what operating system?
+Linux (Fedora 23/CentOS 7)
+[[!format sh """
+git-annex version: 6.20160428-g1f253e8
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: 6
+supported repository versions: 5 6
+upgrade supported from repository versions: 0 1 2 4 5
+"""]]
+
+### Please provide any additional information below.
+
+[[!format sh """
+# Client B
+[2016-05-10 20:09:51.879642] main: starting assistant version 6.20160428-g1f253e8
+[2016-05-10 20:09:52.127709] Cronner: You should enable consistency checking to protect your data.
+[2016-05-10 20:09:57.340186] TransferScanner: Syncing with origin
+(scanning...) [2016-05-10 20:09:58.182781] Watcher: Performing startup scan
+(started...)
+
+merge: refs/remotes/origin/master - not something we can merge
+
+merge: refs/remotes/origin/synced/master - not something we can merge
+gpg: Signature made Thu 28 Apr 2016 10:44:48 AM EDT using DSA key ID 89C809CB
+gpg: /tmp/git-annex-gpg.tmpOTZtDq/trustdb.gpg: trustdb created
+gpg: Good signature from "git-annex distribution signing key (for Joey Hess) <id@joeyh.name>"
+gpg: WARNING: This key is not certified with a trusted signature!
+gpg: There is no indication that the signature belongs to the owner.
+Primary key fingerprint: 4005 5C6A FD2D 526B 2961 E78F 5EE1 DBA7 89C8 09CB
+git-annex: Daemon is already running.
+[2016-05-10 20:21:19.633914] main: Syncing with origin
+From /smb/r7000/USB_Storage/tmp/git-annex/central6
+ 7f1d48c..3e6f240 git-annex -> origin/git-annex
+ * [new branch] master -> origin/master
+ * [new branch] synced/git-annex -> origin/synced/git-annex
+ * [new branch] synced/master -> origin/synced/master
+(merging origin/git-annex into git-annex...)
+(recording state in git...)
+
+Already up-to-date.
+[2016-05-10 20:21:23.337732] Pusher: Syncing with origin
+To /smb/r7000/USB_Storage/tmp/git-annex/central6
+ 3e6f240..358afc3 git-annex -> synced/git-annex
+[2016-05-10 20:21:25.056294] Committer: Adding image.png
+add image.png ok
+[2016-05-10 20:21:25.543293] Committer: Committing changes to git
+(recording state in git...)
+
+SHA256E-s103--d7d52e9de4a9c7c030743825c3a1ca072062e4ccadefcf1eb34be3004360b9b2.png
+ 103 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/1)
+(checksum...) [2016-05-10 20:21:27.240904] Transferrer: Uploaded image.png
+[2016-05-10 20:21:27.787233] Pusher: Syncing with origin
+[2016-05-10 20:21:28.12119] Committer: Adding image.png
+(recording state in git...)
+add image.png ok
+[2016-05-10 20:21:28.696135] Committer: Committing changes to git
+(recording state in git...)
+To /smb/r7000/USB_Storage/tmp/git-annex/central6
+ 358afc3..e3ef364 git-annex -> synced/git-annex
+ 15d9319..976e99f master -> synced/master
+[2016-05-10 20:21:32.584488] Pusher: Syncing with origin
+Everything up-to-date
+
+# End of transcript or log.
+"""]]
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+It seems to work really well on v5, but the file "corruption" is difficult to recover from.
diff --git a/doc/bugs/annex.gnupg-options_not_used_by_assistant.mdwn b/doc/bugs/annex.gnupg-options_not_used_by_assistant.mdwn
new file mode 100644
index 0000000..9ad3f53
--- /dev/null
+++ b/doc/bugs/annex.gnupg-options_not_used_by_assistant.mdwn
@@ -0,0 +1,81 @@
+### Please describe the problem.
+
+I am using annex with a gcrypt encrypted repository but I am not able to sync content to the remote share via Webapp. If I sync via command line everything is working as expected but via Webapp I receive several error messages complaining about tty not available.
+
+As I workaround I changed two things:
+
+1. /usr/local/bin/git-remote-gcrypt: As $GPG_AGENT_INFO was not set I needed to include "--no-tty" on line 377
+2. Add a line in ~/.gnupg/gpg.conf with option "no-tty"
+
+As this breaks gpg2 for use on command line I wanted to provide the --no-tty via option **annex.gnupg-options** as mentioned in the manual. Not sure what I am doing wrong but the Webapp does not pick up these options.
+
+```
+[annex]
+ gnupg-options = --no-tty
+```
+
+
+### What steps will reproduce the problem?
+
+Create repository via
+
+```sh
+git annex initremote hidrive type=gcrypt gitrepo=rsync.hidrive.strato.com:/users/xxxxxx/hidrive.git chunk=5MiB keyid=XXXXXXXX
+```
+Launch Webapp
+
+```sh
+git annex webapp
+```
+
+Copy files to local annex directory
+
+### What version of git-annex are you using? On what operating system?
+
+OSX 10.11.4
+
+gpg (GnuPG) 2.0.30
+libgcrypt 1.7.0
+Copyright (C) 2015 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Home: ~/.gnupg
+Supported algorithms:
+Pubkey: RSA, RSA, RSA, ELG, DSA
+Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
+ CAMELLIA128, CAMELLIA192, CAMELLIA256
+Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
+Compression: Uncompressed, ZIP, ZLIB, BZIP2
+
+
+git-annex version: 6.20160418
+build flags: Assistant Webapp Pairing Testsuite WebDAV FsEvents XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+local repository version: 6
+supported repository versions: 5 6
+upgrade supported from repository versions: 0 1 2 4 5
+
+
+### Please provide any additional information below.
+
+[[!format sh """
+
+[2016-05-05 15:04:31.059236] Pusher: Syncing with hidrive
+(recording state in git...)
+gcrypt: Development version -- Repository format MAY CHANGE
+gpg: cannot open `/dev/tty': Device not configured
+
+ user error (gpg2 ["--quiet","--trust-model","always","--decrypt"] exited 2)
+gpg: cannot open `/dev/tty': Device not configured
+
+ user error (gpg2 ["--quiet","--trust-model","always","--decrypt"] exited 2)
+
+"""]]
+
+### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
+
+
+> added annex.gnupg-decrypt-options; [[done]] --[[Joey]]
diff --git a/doc/bugs/dropkey_--batch_--json_--force_is_always_succesfull.mdwn b/doc/bugs/dropkey_--batch_--json_--force_is_always_succesfull.mdwn
new file mode 100644
index 0000000..8dcf3b6
--- /dev/null
+++ b/doc/bugs/dropkey_--batch_--json_--force_is_always_succesfull.mdwn
@@ -0,0 +1,35 @@
+### Please describe the problem.
+
+just want to check if that is "by design"... --force was demanded seem operation is dangerous, but I expected that it would still report success false if key was not actually dropped, at least if a key is a completely wrong key
+
+so is that "by design" and I shouldn't care to check success field...?
+
+### What version of git-annex are you using? On what operating system?
+6.20160425+gitgffe2ea2-1~ndall+1
+
+### Please provide any additional information below.
+
+[[!format sh """
+
+$> echo MD5E-s11--74d80f7d99b835e5189948c8d4297efd | git annex dropkey --batch --json --force
+{"command":"dropkey","key":"MD5E-s11--74d80f7d99b835e5189948c8d4297efd","success":true}
+
+$> ls -l
+total 0
+0 lrwxrwxrwx 1 yoh yoh 110 Apr 29 09:21 124 -> .git/annex/objects/MV/Jw/MD5E-s11--74d80f7d99b835e5189948c8d4297efd/MD5E-s11--74d80f7d99b835e5189948c8d4297efd
+
+$> echo MD5E-s11--74d80f7d99b835e5189948c8d4297efd | git annex dropkey --batch --json --force
+{"command":"dropkey","key":"MD5E-s11--74d80f7d99b835e5189948c8d4297efd","success":true}
+
+$> echo MD5E-s11--74d80f7dsd99b835e5189948c8d4297efd | git annex dropkey --batch --json --force
+{"command":"dropkey","key":"MD5E-s11--74d80f7dsd99b835e5189948c8d4297efd","success":true}
+
+$> echo MD5E-s11--74d80f7dsd99b835e5189948c8d4297efdsdfsdf | git annex dropkey --batch --json --force
+{"command":"dropkey","key":"MD5E-s11--74d80f7dsd99b835e5189948c8d4297efdsdfsdf","success":true}
+
+
+"""]]
+
+[[!meta author=yoh]]
+
+> [[notabug|done]] --[[Joey]]
diff --git a/doc/bugs/git-annex_smudge_fails_on_git_add.mdwn b/doc/bugs/git-annex_smudge_fails_on_git_add.mdwn
index 61e90d1..5b91e1e 100644
--- a/doc/bugs/git-annex_smudge_fails_on_git_add.mdwn
+++ b/doc/bugs/git-annex_smudge_fails_on_git_add.mdwn
@@ -55,3 +55,5 @@ error: external filter git-annex smudge --clean %f failed
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
No, I'm a first-time user. Thanks for this neat piece of software.
+
+> [[fixed|done]] --[[Joey]]
diff --git a/doc/bugs/stack_build_Setup.hs_dependencies.mdwn b/doc/bugs/stack_build_Setup.hs_dependencies.mdwn
index 0dcc6f7..8911cef 100644
--- a/doc/bugs/stack_build_Setup.hs_dependencies.mdwn
+++ b/doc/bugs/stack_build_Setup.hs_dependencies.mdwn
@@ -69,3 +69,10 @@ fixes the error and builds git-annex successfully.
> above error.
>
> --[[Joey]]
+
+> > I've filed a bug on stack about this,
+> > <https://github.com/commercialhaskell/stack/issues/2093> --[[Joey]]
+
+> > > Gone ahead and added it to stack.yaml, despite it causing some build
+> > > failures, as it's certianly needed on many systems. [[done]]
+> > > --[[Joey]]
diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn
index f9eca2a..81feda1 100644
--- a/doc/design/external_special_remote_protocol.mdwn
+++ b/doc/design/external_special_remote_protocol.mdwn
@@ -230,7 +230,15 @@ in control.
* `DIRHASH Key`
Gets a two level hash associated with a Key. Something like "aB/Cd".
This is always the same for any given Key, so can be used for eg,
- creating hash directory structures to store Keys in.
+ creating hash directory structures to store Keys in. This is the same
+ directory hash that git-annex uses inside `.git/annex/objects/`
+ (git-annex replies with VALUE followed by the value.)
+* `DIRHASH-LOWER Key`
+ Gets a two level hash associated with a Key, using only lower-case.
+ Something like "abc/def".
+ This is always the same for any given Key, so can be used for eg,
+ creating hash directory structures to store Keys in. This is the same
+ directory hash that is used by eg, the directory special remote.
(git-annex replies with VALUE followed by the value.)
* `SETCONFIG Setting Value`
Sets one of the special remote's configuration settings.
diff --git a/doc/design/roadmap.mdwn b/doc/design/roadmap.mdwn
index 834ab2e..795cc8c 100644
--- a/doc/design/roadmap.mdwn
+++ b/doc/design/roadmap.mdwn
@@ -1,6 +1,5 @@
## ahead
-* [[adjusted_branches]]
* [[design/caching_database]] for metadata views
* [[assistant/deltas]]
* [[assistant/gpgkeys]] management for the assistant
@@ -10,6 +9,8 @@
## the rearview
+* Spring 2016 [[adjusted_branches]]
+* Winter 2015 v6 repo format
* Mar-Oct 2015 busy busy busy, too busy to update!
* Feb 2015 user-driven features and polishing, [[design/caching_database]] part 1
* Jan 2015 Android 5, relative paths, workload [[tuning]]
diff --git a/doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment b/doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment
deleted file mode 100644
index 9077ead..0000000
--- a/doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment
+++ /dev/null
@@ -1,14 +0,0 @@
-[[!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.
-"""]]
diff --git a/doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment b/doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment
deleted file mode 100644
index ef050ac..0000000
--- a/doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment
+++ /dev/null
@@ -1,24 +0,0 @@
-[[!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/devblog/day_387__release_day.mdwn b/doc/devblog/day_387__release_day.mdwn
new file mode 100644
index 0000000..0a36a61
--- /dev/null
+++ b/doc/devblog/day_387__release_day.mdwn
@@ -0,0 +1,10 @@
+git-annex 6.20160419 has a rare security fix.
+A [bug](http://git-annex.branchable.com/bugs/External_special_remote_broken__63__/) made encrypted special
+remotes that are configured to use chunks accidentially expose the checksums
+of content that is uploaded to the remote. Such information is supposed to
+be hidden from the remote's view by the encryption. The same bug also made
+resuming interrupted uploads to such remotes start over from the beginning.
+
+After releasing that, I've been occupied today with fixing the Android
+autobuilder, which somehow got its build environment broken (unsure how),
+and fixing some other dependency issues.
diff --git a/doc/devblog/day_388-389__various_and_windows.mdwn b/doc/devblog/day_388-389__various_and_windows.mdwn
new file mode 100644
index 0000000..b929882
--- /dev/null
+++ b/doc/devblog/day_388-389__various_and_windows.mdwn
@@ -0,0 +1,13 @@
+Lots of little fixes and improvements here and there over the past couple
+days.
+
+The main thing was fixing several bugs with adjusted branches and Windows.
+They seem to work now, and commits made on the adjusted branch are
+propigated back to master correctly.
+
+It would be good to finish up the last todos for v6 mode this month.
+The sticking point is I need a way to update the file stat in the git index
+when git-annex gets/drops/etc an unlocked file. I have not decided yet if
+it makes the most sense to add a dependency on libgit2 for that, or extend
+`git update-index`, or even write a pure haskell library to manipulate
+index files. Each has its pluses and its minuses.
diff --git a/doc/devblog/day_390__sharedpubkey.mdwn b/doc/devblog/day_390__sharedpubkey.mdwn
new file mode 100644
index 0000000..805b5b6
--- /dev/null
+++ b/doc/devblog/day_390__sharedpubkey.mdwn
@@ -0,0 +1,5 @@
+It's not every day I add a new special remote encryption mode to
+git-annex! The new encryption=sharedpubkey mode
+lets anyone with a clone of the git repository (and access to the remote)
+store files in the remote, but then only the private key owner can access
+those files. Which opens up some interesting new use cases...
diff --git a/doc/encryption.mdwn b/doc/encryption.mdwn
index bf6a9a2..e8d150c 100644
--- a/doc/encryption.mdwn
+++ b/doc/encryption.mdwn
@@ -23,8 +23,9 @@ to disable encryption. To use encryption, you run
* `git annex initremote newremote type=... encryption=hybrid keyid=KEYID ...`
* `git annex initremote newremote type=... encryption=shared`
* `git annex initremote newremote type=... encryption=pubkey keyid=KEYID ...`
+* `git annex initremote newremote type=... encryption=sharedpubkey keyid=KEYID ...`
-## hybrid encryption keys
+## hybrid encryption keys (encryption=hybrid)
The [[hybrid_key_design|design/encryption]] allows additional
encryption keys to be added on to a special remote later. Due to this
@@ -53,7 +54,7 @@ probably to replace a revoked key:
See also [[encryption_design|design/encryption]] for other security
risks associated with encryption.
-## shared encryption key
+## shared encryption key (encryption=shared)
Alternatively, you can configure git-annex to use a shared cipher to
encrypt data stored in a remote. This shared cipher is stored,
@@ -66,7 +67,7 @@ The advantage is you don't need to set up gpg keys. The disadvantage is
that this is **insecure** unless you trust every clone of the git
repository with access to the encrypted data stored in the special remote.
-## regular public key encryption
+## regular public key encryption (encryption=pubkey)
This alternative simply encrypts the files in the special remotes to one or
more public keys. It might be considered more secure due to its simplicity
@@ -88,9 +89,25 @@ key has to be kept around to be able to decrypt those files.
that the key has been compromised, it is **insecure** to leave files
encrypted using that old key, and the user should re-encrypt everything.)
-(Because filenames are MAC'ed, a cipher still needs to be
-generated (and encrypted to the given key IDs). It is only used for MHAC
-encryption of filenames.)
+(A cipher still needs to be generated (and is encrypted to the given key IDs).
+It is only used for HMAC encryption of filenames.)
+
+## regular public key encryption with shared filename encryption (encryption=sharedpubkey)
+
+This is a variation on encryption=pubkey which lets anyone who
+has access to the gpg public keys store files in the special remote.
+But, only owners of the corresponding private keys can retrieve the files
+from the special remote.
+
+ git annex initremote newremote type=... encryption=sharedpubkey keyid=KEYID ...
+
+This might be useful if you want to let others drop off files for you in a
+special remote, so that only you can access them.
+
+The filenames used on the special remote are encrypted using HMAC,
+which prevents the special remote from seeing the filenames. But, anyone
+who can clone the git repository can access the HMAC cipher; it's stored
+**unencrypted** in the git repository.
## MAC algorithm
diff --git a/doc/forum/Deleting_remotes_doesn__39__t_work__8230__.mdwn b/doc/forum/Deleting_remotes_doesn__39__t_work__8230__.mdwn
new file mode 100644
index 0000000..012afe8
--- /dev/null
+++ b/doc/forum/Deleting_remotes_doesn__39__t_work__8230__.mdwn
@@ -0,0 +1 @@
+I'm trying to get rid of two remotes through the assistant, but when I'm trying to delete it, it doesn't start deletion process, as far as I can tell, since the symbol where it say syncing enabled/disabled is not changed to "delete" or whatever it is.
diff --git a/doc/forum/Fails_to_get_file_from_s3._How_to_recover__63__.mdwn b/doc/forum/Fails_to_get_file_from_s3._How_to_recover__63__.mdwn
new file mode 100644
index 0000000..e6bfd4a
--- /dev/null
+++ b/doc/forum/Fails_to_get_file_from_s3._How_to_recover__63__.mdwn
@@ -0,0 +1,16 @@
+I have an annex that has an s3 special remote. The s3 remote has been configured with shared encryption and it uses partsize (not chunking). Currently when I try to get a file from the s3 remote, it fails:
+
+ $ git annex get mybigfile.tbz.gpg
+ get mybigfile.tbz.gpg (from s3...)
+ 76% 10.6MB/s 57sgpg: WARNING: encrypted message has been manipulated!
+
+ Unable to access these remotes: s3
+
+ Try making some of these repositories available:
+ 15ac19e4-223a-4c81-b7f7-797b9b026b86 -- [s3]
+
+ (Note that these git remotes have annex-ignore set: origin)
+ failed
+ git-annex: get: 1 failed
+
+The file is about 3GB. This happens consistently at 76%. No other copy of the file exists. Is there some way I can get the file from s3, either without git annex or just have git annex ignore the error, so that I can inspect the file locally and see if there is anything wrong with it?
diff --git a/doc/forum/How_to_find_out_if_assistant_is_still_repairing__63__.mdwn b/doc/forum/How_to_find_out_if_assistant_is_still_repairing__63__.mdwn
new file mode 100644
index 0000000..a959424
--- /dev/null
+++ b/doc/forum/How_to_find_out_if_assistant_is_still_repairing__63__.mdwn
@@ -0,0 +1 @@
+I have a corrupted repository, that git annex assistant wanted to repair. Before clicing on the button to start the repairing process, I had to deactivate my internet connection for another reason. The daemon.log is showing some connection errors to my remotes. But since pressing the button to repair my repo, the webapp is not showing the dashboard and there's no indicator that's trustworthy enough, that stuff is happening. There are some git and git annex processes running, but is there really now better way to know, if the repairing process is making progress, or if I need to restart the assistant because I needed to reset my internet connection.
diff --git a/doc/forum/Ignoring_folders__63__.mdwn b/doc/forum/Ignoring_folders__63__.mdwn
new file mode 100644
index 0000000..55c7884
--- /dev/null
+++ b/doc/forum/Ignoring_folders__63__.mdwn
@@ -0,0 +1 @@
+What is the correct way to ignore subfolders or files? Just use .gitignore? Or is there a git-annex specific way? For example, partial download files.
diff --git a/doc/forum/Integrating_git-annex_with_Windows_Git_Extensions__63__.mdwn b/doc/forum/Integrating_git-annex_with_Windows_Git_Extensions__63__.mdwn
new file mode 100644
index 0000000..2bb88ab
--- /dev/null
+++ b/doc/forum/Integrating_git-annex_with_Windows_Git_Extensions__63__.mdwn
@@ -0,0 +1,10 @@
+I installed the Windows git-annex, and had to run the following command from Git Bash (in Admin mode) in order to get git to see git-annex:
+
+$ ln -s /C/Program\ Files\ \(x86\)/Git/usr/bin/git-annex.exe git-annex.exe
+
+Was this
+1) a known install issue that I missed somewhere?
+2) a failure in my particular installation?
+3) or was I supposed to put C:\Program Files (x86)\Git\usr\bin in my Windows path?
+
+Wasn't sure if we needed a docs update...
diff --git a/doc/forum/Making_a_git-annexy_symlink___34__known__34____63__.mdwn b/doc/forum/Making_a_git-annexy_symlink___34__known__34____63__.mdwn
new file mode 100644
index 0000000..8d298ae
--- /dev/null
+++ b/doc/forum/Making_a_git-annexy_symlink___34__known__34____63__.mdwn
@@ -0,0 +1,7 @@
+Currently, if you git-add a symlink copied from another git-annex, git-annex will 'fix' it so it points to where the files would be in its new annex object store, but doesn't create the corresponding file for the key on the git-annex branch, so git-annex doesn't actually "know" about the file.
+
+This means running *git annex reinject --known* won't reinject the content for the symlink (e.g. "Not known content; skipping").
+
+I tried running git-annex-fsck hoping it would create the file (with the information that 0 copies exist) but it doesn't do that..?
+
+Any advice on how to go about resolving this? Preferably a "lightweight" way as this repository has a lot of such transplanted symlinks.. :)
diff --git a/doc/forum/S3_remote_not_available.mdwn b/doc/forum/S3_remote_not_available.mdwn
new file mode 100644
index 0000000..e89a8ea
--- /dev/null
+++ b/doc/forum/S3_remote_not_available.mdwn
@@ -0,0 +1,31 @@
+One of my remotes is S3 (named s3). I used to be able to run
+
+ $ git annex sync s3 --content
+
+But now I'm getting the following error:
+
+ commit
+ On branch master
+ nothing to commit, working directory clean
+ ok
+ git-annex: there is no available git remote named "s3"
+
+My `.git/config` file contains following lines which I would assume mean that the remote is there:
+
+ [remote "s3"]
+ annex-s3 = true
+ annex-uuid = bd9af194-b736-4114-a689-9a8bf212fb18
+ fetch =
+ annex-sync = false
+
+As far as I can tell only change I did was to install newer version of git-annex, currently I have:
+
+ git-annex version: 6.20160418
+ build flags: Assistant Webapp Pairing Testsuite WebDAV FsEvents XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+ key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+ remote types: git gcrypt bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+ local repository version: 6
+ supported repository versions: 5 6
+ upgrade supported from repository versions: 0 1 2 4 5
+
+How do I recover access to that remote?
diff --git a/doc/forum/Wrong_symlink_target_on_usb_drive.mdwn b/doc/forum/Wrong_symlink_target_on_usb_drive.mdwn
new file mode 100644
index 0000000..661dc5b
--- /dev/null
+++ b/doc/forum/Wrong_symlink_target_on_usb_drive.mdwn
@@ -0,0 +1,55 @@
+As I'm not sure whether this is my fault or a bug of git-annex, I'll post it in forum first.
+
+I have a normal v6 git-annex setup, with a desktop, laptop and usb stick.
+
+All repositories are in sync, also the usb drive.
+There are some unlocked files, which are fine.
+But there are also some locked files, which appear to be broken.
+Checking the target, there is a big difference between the paths. On the computers, it's `.git/annex/objects/0W/vj/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed`.
+
+Also the usb drive links to this location, but the file does not exist.
+Searching with the firs part of the hash, I got some interesting result: the file was stored in `.git/annex/objects/1cc/840/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed`.
+The difference is that the two first directories have three instead of two letters and only one layer.
+The hash remains the same, and the file is valid.
+
+```
+$ cd desktop
+$ git annex sync --content
+(success)
+$ readlink -f locked-file
+.git/annex/objects/0W/vj/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed
+$ cd usb-drive
+$ readlink -f locked-file
+(no output → broken)
+$ find .git/annex/objects/ -name *SHA256E-s10230770*
+.git/annex/objects/1cc/840/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed
+(file is at different place)
+```
+
+I did some troubleshooting and unspecific fixing.
+
+```
+$ git annex whereis locked-file
+whereis locked-file (3 copies)
+ d0a64b4b-054e-4c42-a64f-58a08591abab -- laptop
+ e3013e6b-a06a-46a5-a67a-ce9ec0520d21 -- desktop
+ ebd16ddb-548c-4078-b35e-087132523924 -- usb-drive [here]
+ok
+$ git annex fsck
+(everything fine, also unlocked-file was checked)
+$ git annex fix
+(no error, but no solution)
+$ git annex unlock locked-file
+(file is there and editable, great!)
+$ git annex lock locked-file
+(symlink is there and points… right, to the wrong location)
+$ git annex drop locked-file && git annex get locked-file
+(no change visible in work directory)
+```
+
+Specially on this drive disk space is important, so it would be for me a bad solution to keep them unlocked.
+
+As I mentioned earlier, this could be also my fault, as I have done some not-often used methods
+
+- I rebased the history and checked manually (without `git annex sync`) the `master` and `synced/master` branch to the same commit on all repositories, no errors reported
+- I used a v5 repository on laptop before syncing with the drive, then upgraded. I don't think it is the problem here as it works on desktop after the sync as wanted
diff --git a/doc/forum/race_condition_with_drop_-J__63__.mdwn b/doc/forum/race_condition_with_drop_-J__63__.mdwn
new file mode 100644
index 0000000..77ece25
--- /dev/null
+++ b/doc/forum/race_condition_with_drop_-J__63__.mdwn
@@ -0,0 +1,7 @@
+When I run a command like: "git-annex drop . -J 20"
+
+I get: "git-annex: content is locked"
+
+Running with -J 5 works.
+
+EDIT: Even as low as -J 2 runs into problems. The issue is simply more likely to trigger with more threads.
diff --git a/doc/forum/time_profiling_the_assistant.mdwn b/doc/forum/time_profiling_the_assistant.mdwn
new file mode 100644
index 0000000..95a0297
--- /dev/null
+++ b/doc/forum/time_profiling_the_assistant.mdwn
@@ -0,0 +1,19 @@
+From the repo (commit ecc548) I built git-annex with stack issuing this command:
+
+ stack install --executable-profiling --library-profiling --ghc-options="-rtsopts -auto-all"
+
+then I run the output executable with +RTS -p like
+
+ git-annex version +RTS -p
+
+and obtain the corresponding git-annex.prof with the time profile.
+
+What I am unable to do is to get a time profile of the assistant: if I kill it the git-annex.prof file is empty, same happens if I stop the assistant with
+
+ git-annex assistant --stop
+
+So... is there another way to time-profile a git-annex command? Am I missing something in this procedure?
+
+Any advice is welcome :)
+
+-- zarel
diff --git a/doc/forum/unable_to_clone_annex_repo_in_windows.mdwn b/doc/forum/unable_to_clone_annex_repo_in_windows.mdwn
new file mode 100644
index 0000000..6e58c7a
--- /dev/null
+++ b/doc/forum/unable_to_clone_annex_repo_in_windows.mdwn
@@ -0,0 +1,29 @@
+Dear all,
+ I successfuly cloned my annex repo (hosted on gitlab.com) on my windows box (win 7, 64bits), and my data is on an exFat partition.
+git annex version is
+----------------
+git-annex version: 6.20160126-g2336107
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload) WebDAV ConcurrentOutput TorrentParser Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+-------------
+However, when I try to initialize annex on the newly cloned repo fails with the following error:
+
+$ git annex init "repo_win"
+init repo_win
+ Detected a filesystem without fifo support.
+
+ Disabling ssh connection caching.
+
+ Detected a crippled filesystem.
+
+ Enabling direct mode.
+
+git-annex: .git\annex\objects\c89\57a\SHA256E-s1339658--e7cfebb4ac9c81a6a060506c537b55aed9f13bd02d861d2b341fb8a79ad6e046.png\: openTempFile: does not exist (No such file or directory)
+failed
+git-annex: init: 1 failed
+
+any hints about this?
+Thanks in advance.
+Best regards,
+ Juan
diff --git a/doc/git-annex-drop/comment_1_ecb863aea64eadbaeb7759c5cb0bf5a5._comment b/doc/git-annex-drop/comment_1_ecb863aea64eadbaeb7759c5cb0bf5a5._comment
new file mode 100644
index 0000000..1ca83ec
--- /dev/null
+++ b/doc/git-annex-drop/comment_1_ecb863aea64eadbaeb7759c5cb0bf5a5._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="zpeters@669a56d871ec94de11e1bf63f4a21e80ea90b2fa"
+ nickname="zpeters"
+ subject="Choose which remote to lock when dropping"
+ date="2016-05-03T23:37:09Z"
+ content="""
+I might have a unique situation but i have a git annex repo that has multiple remotes for the same actual location. I have a server at home and when i'm \"out in the world\" i use it's external IP and when i'm at home i use it's internal IP. It appears that when i do an git annex drop on my laptop to compares and locks whichever remote is alphabetically first.
+
+What i'm wondering is is there a way to tell git annex which remote i want to compare against? For example when i'm remote i want to do something like \"git annex drop . --compare remoteServer\"
+
+Thank you!
+"""]]
diff --git a/doc/git-annex-drop/comment_2_c9017041b01d803b346b1b14b8d1e066._comment b/doc/git-annex-drop/comment_2_c9017041b01d803b346b1b14b8d1e066._comment
new file mode 100644
index 0000000..63047d7
--- /dev/null
+++ b/doc/git-annex-drop/comment_2_c9017041b01d803b346b1b14b8d1e066._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2016-05-04T17:23:41Z"
+ content="""
+@zpeters, the order that remotes are accessed are ordered by cost.
+
+You can configure the costs of remotes by setting remote.$name.annex-cost
+to eg 100 to make it be checked first or 300 to make it be checked later.
+
+There's also a remote.$name.annex-cost-command that runs a command to get
+the cost. You could perhaps use that to detect which network you're on and
+alter the costs appropriately.
+"""]]
diff --git a/doc/git-annex-map.mdwn b/doc/git-annex-map.mdwn
index 6e5ced2..cf28a95 100644
--- a/doc/git-annex-map.mdwn
+++ b/doc/git-annex-map.mdwn
@@ -23,6 +23,16 @@ it several times as the map is being built.
Note that this subcommand can be used to graph any git repository; it
is not limited to git-annex repositories.
+# LEGEND
+
+Ovals are repositories. White is regular, green is trusted, red is
+untrusted, and grey is dead.
+
+Arrows between repositories are connections via git remotes.
+
+Light blue boxes are hosts that were mapped, and contain the repositories
+on that host.
+
# OPTIONS
* `--fast`
diff --git a/doc/git-annex-view.mdwn b/doc/git-annex-view.mdwn
index d8d0ce5..74ed5db 100644
--- a/doc/git-annex-view.mdwn
+++ b/doc/git-annex-view.mdwn
@@ -31,6 +31,11 @@ For example, `/=foo` will only include files from the foo
directory in the view, while `foo/=*` will preserve the
subdirectories of the foo directory in the view.
+To enter a view containing only files that lack a given metadata
+field or tag, specify field!=value or !tag. Globs can also be used here,
+so `field!="*"` will enter a view containing only files that do not have
+the field set to any value.
+
# SEE ALSO
[[git-annex]](1)
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 236912d..955f676 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -1189,15 +1189,22 @@ Here are all the supported configuration settings.
* `remote.<name>.annex-gnupg-options`
- Options to pass to GnuPG for symmetric encryption. For instance, to
+ Options to pass to GnuPG when it's encrypting data. For instance, to
use the AES cipher with a 256 bits key and disable compression, set it
to `--cipher-algo AES256 --compress-algo none`. (These options take
precedence over the default GnuPG configuration, which is otherwise
used.)
+* `remote.<name>.annex-gnupg-decrypt-options`
+
+ Options to pass to GnuPG when it's decrypting data. (These options take
+ precedence over the default GnuPG configuration, which is otherwise
+ used.)
+
* `annex.ssh-options`, `annex.rsync-options`,
`annex.rsync-upload-options`, `annex.rsync-download-options`,
- `annex.bup-split-options`, `annex.gnupg-options`
+ `annex.bup-split-options`, `annex.gnupg-options`,
+ `annex.gnupg-decrypt-options`
Default options to use if a remote does not have more specific options
as described above.
diff --git a/doc/install/OSX/comment_13_f4b39e2009274539d60b29711a4a2c8d._comment b/doc/install/OSX/comment_13_f4b39e2009274539d60b29711a4a2c8d._comment
new file mode 100644
index 0000000..960591b
--- /dev/null
+++ b/doc/install/OSX/comment_13_f4b39e2009274539d60b29711a4a2c8d._comment
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="lhunath@3b4ff15f4600f3276d1776a490b734fca0f5c245"
+ nickname="lhunath"
+ subject="The application cannot be opened because its executable is missing."
+ date="2016-05-05T04:33:06Z"
+ content="""
+Just downloaded the DMG, copied the .app into /Applications and ran it; does nothing, from terminal:
+
+$ open -W /Applications/git-annex.app
+The application cannot be opened because its executable is missing.
+
+$ /Applications/git-annex.app/Contents/MacOS/git-annex-webapp
+$
+unable to start webapp in repository /Users/lhunath/annex: Not in a git repository.
+Launching web browser on file:///var/folders/np/v9byg9092bbf31jw5cydzszm0000gn/T/webapp1622650073984943658.html
+
+$ /Applications/git-annex.app/Contents/MacOS/git-annex version
+git-annex version: 6.20160427-gd0036b9
+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV FsEvents XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi
+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL
+remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external
+"""]]
diff --git a/doc/install/OSX/comment_14_5581b7d1c09e6a78419d626bb25261b6._comment b/doc/install/OSX/comment_14_5581b7d1c09e6a78419d626bb25261b6._comment
new file mode 100644
index 0000000..f42d308
--- /dev/null
+++ b/doc/install/OSX/comment_14_5581b7d1c09e6a78419d626bb25261b6._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 14"""
+ date="2016-05-10T17:22:03Z"
+ content="""
+I don't know what needs to be put where in the app to make `open`
+run git-annex-webapp. There is already a Info.plist file that I thought was
+supposed to handle that. If someone wants to help make `open` work please
+be my guest.
+"""]]
diff --git a/doc/install/Windows.mdwn b/doc/install/Windows.mdwn
index d32a790..7ea667a 100644
--- a/doc/install/Windows.mdwn
+++ b/doc/install/Windows.mdwn
@@ -1,6 +1,6 @@
git-annex now does Windows!
-* First, [install git for Windows](http://git-scm.com/downloads)
+* First, [install Git for Windows](http://git-scm.com/downloads)
Important: **Get the 32 bit version not the 64 bit version.**
(Note that msysgit is no longer supported.)
* Then, [install git-annex](https://downloads.kitenet.net/git-annex/windows/current/)
@@ -25,15 +25,19 @@ A daily build is also available, thanks to Yury V. Zaytsev and
## building it yourself
To build git-annex from source on Windows, you need to install
-the Haskell Platform and Cygwin. Use Cygwin to install these packages:
-gcc rsync git wget ssh gnupg
+[Git for Windows](http://git-scm.com/downloads), and
+[Stack](http://haskellstack.org/).
-Once the prerequisites are installed, run:
+You also need to install rsync and wget for windows.
+They need to be linked with the same MINGW32 libraries that come with Git
+for Windows. One way is to download them from
+<https://downloads.kitenet.net/git-annex/windows/assets/>.
+Put them somewhere in PATH.
- cabal update
- git clone git://git-annex.branchable.com/ gitannex
- cd gitannex
- build
+Then open Git Bash, [[clone git-annex|download]], and in
+git-annex's source tree, run "stack build" to download and build
+all dependencies and git-annex. "stack install" will install git-annex.
(To build the git-annex installer, you also need to install the NullSoft
-installer system.)
+installer system. The script `standalone/windows/build.sh` is
+used to make the builds linked to above.)
diff --git a/doc/install/fromsource.mdwn b/doc/install/fromsource.mdwn
index ef8482e..cfc58c4 100644
--- a/doc/install/fromsource.mdwn
+++ b/doc/install/fromsource.mdwn
@@ -42,7 +42,7 @@ and avoids build failures due to fast-changing haskell libraries.
First, [install stack](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md)
It will be part of the Haskell Platform soon. On Debian unstable/testing:
- sudo apt-get install haskell-stack zlib1g-dev
+ sudo apt-get install haskell-stack zlib1g-dev libtinfo-dev
Use stack to install all dependencies and git-annex:
diff --git a/doc/news/version_6.20160229.mdwn b/doc/news/version_6.20160229.mdwn
deleted file mode 100644
index a670846..0000000
--- a/doc/news/version_6.20160229.mdwn
+++ /dev/null
@@ -1,24 +0,0 @@
-git-annex 6.20160229 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * Update perlmagick build dependency. Closes: #[789225](http://bugs.debian.org/789225)
- * Fix memory leak in last release, which affected commands like
- git-annex status when a large non-annexed file is present in the work
- tree.
- * fsck: When the only copy of a file is in a dead repository, mention
- the repository.
- * info: Mention when run in a dead repository.
- * Linux and OSX standalone builds put the bundled gpg last in PATH,
- so any system gpg will be preferred over it.
- * Avoid crashing when built with MagicMime support, but when the magic
- database cannot be loaded.
- * Include magic database in the linux and OSX standalone builds.
- * Fix memory leak when hashing files, which triggered during fsck
- when an external hash program was not used.
- (This leak was introduced in version 6.20160114.)
- * Support --metadata field&lt;number, --metadata field&gt;number etc
- to match ranges of numeric values.
- * Similarly, support preferred content expressions like
- metadata=field&lt;number and metadata=field&gt;number
- * The pre-commit-annex hook script that automatically extracts
- metadata has been updated to also use exiftool.
- Thanks, Klaus Ethgen."""]] \ No newline at end of file
diff --git a/doc/news/version_6.20160318.mdwn b/doc/news/version_6.20160318.mdwn
deleted file mode 100644
index 7277d06..0000000
--- a/doc/news/version_6.20160318.mdwn
+++ /dev/null
@@ -1,18 +0,0 @@
-git-annex 6.20160318 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * metadata: Added -r to remove all current values of a field.
- * Fix data loss that can occur when annex.pidlock is set in a repository.
- * Fix bug preventing moving files to/from a repository with annex.pidlock set.
- * Fix shared lock file FD leak.
- * Fix metadata hook behavior when multiple files are added at once.
- Thanks, Klaus Ethgen.
- * Added dependencies on haskell mountpoints and disk-free-space
- libraries, removing FFI code from git-annex.
- * dropkey: Add --batch and --json.
- * Fix OSX dmg to include libraries needed by bundled gpg,
- lost in last release.
- * Always try to thaw content, even when annex.crippledfilesystem is set.
- * Correct git-annex info to include unlocked files in v6 repository.
- * Sped up git-annex add in direct mode and v6 by using
- git hash-object --stdin-paths.
- * Sped up git-annex merge by using git hash-object --stdin-paths."""]] \ No newline at end of file
diff --git a/doc/news/version_6.20160511.mdwn b/doc/news/version_6.20160511.mdwn
new file mode 100644
index 0000000..9dbb5c1
--- /dev/null
+++ b/doc/news/version_6.20160511.mdwn
@@ -0,0 +1,34 @@
+git-annex 6.20160511 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Fix bug that sometimes prevented git-annex smudge --clean from consuming
+ all its input, which resulted in git add bypassing git-annex.
+ * Fix build with directory-1.2.6.2.
+ * Improve behavior when a just added http remote is not available
+ during uuid probe. Do not mark it as annex-ignore, so it will be tried
+ again later.
+ * Android: Icon refresh.
+ Thanks, freewheelinfranks.
+ * Added DIRHASH-LOWER to external special remote protocol.
+ * git-annex.cabal: Add Setup-Depends.
+ * stack.yaml: Enable explicit-setup-deps.
+ * Windows: Fix several bugs in propigation of changes from the adjusted
+ branch back to the master branch.
+ * Windows: Fix an over-long temp directory name.
+ * map: Hide dead repositories that are not connected to the graph.
+ * map: Changed colors; red is used for untrusted repositories and grey
+ for dead.
+ * version: Display OS version and architecture too.
+ * Propigate GIT\_DIR and GIT\_WORK\_TREE environment to external special
+ remotes.
+ * Added annex.gnupg-decrypt-options and
+ remote.&lt;name&gt;.annex-gnupg-decrypt-options, which are passed to gpg
+ when it's decrypting data.
+ * fsck: When a key is not previously known in the location log,
+ record something so that reinject --known will work.
+ * In the unusual configuration where annex.crippledfilesystem=true but
+ core.symlinks=true, store object contents in mixed case hash
+ directories so that symlinks will point to them.
+ * Added new encryption=sharedpubkey mode for special remotes.
+ This is useful for makking a special remote that anyone with a clone
+ of the repo and your public keys can upload files to, but only you can
+ decrypt the files stored in it."""]] \ No newline at end of file
diff --git a/doc/special_remotes/comment_33_317c4d5edc9de8159c3b03a3e161e257._comment b/doc/special_remotes/comment_33_317c4d5edc9de8159c3b03a3e161e257._comment
new file mode 100644
index 0000000..ccf879f
--- /dev/null
+++ b/doc/special_remotes/comment_33_317c4d5edc9de8159c3b03a3e161e257._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="grawity@2ea26be48562f66fcb9b66307da72b1e2e37453f"
+ nickname="grawity"
+ subject="comment 33"
+ date="2016-05-02T18:41:53Z"
+ content="""
+I'm trying to write a remote (for smb:// support via GNOME's Gvfs), and I can't seem to find a way to change an existing special remote's parameters?
+
+Even when marked as \"dead\" (the closest to deleting a remote that I could find), it still blocks subsequent `annex initremote` calls with the same name.
+
+Also, ideally I'd want to reuse the same name _and_ keep the same UUID (e.g. when the backend is moved/renamed). Though of course there are situations where a new UUID would be wanted as well... (I guess that could depend on whether the remote is currently \"dead\" or not?)
+"""]]
diff --git a/doc/special_remotes/comment_34_31256dd4b74d344aa49902adec4bcf02._comment b/doc/special_remotes/comment_34_31256dd4b74d344aa49902adec4bcf02._comment
new file mode 100644
index 0000000..f241f3d
--- /dev/null
+++ b/doc/special_remotes/comment_34_31256dd4b74d344aa49902adec4bcf02._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="grawity@2ea26be48562f66fcb9b66307da72b1e2e37453f"
+ nickname="grawity"
+ subject="comment 34"
+ date="2016-05-02T18:43:33Z"
+ content="""
+Hmm, I just found that `annex enableremote` accepts parameters to be modified; that should work for now.
+
+Though I still wonder about situations where one wants to add a new empty remote with new UUID, but reuse the old name...
+"""]]
diff --git a/doc/special_remotes/comment_35_5801755d10149f0d3971fef0b6e1b62f._comment b/doc/special_remotes/comment_35_5801755d10149f0d3971fef0b6e1b62f._comment
new file mode 100644
index 0000000..cdb0a1b
--- /dev/null
+++ b/doc/special_remotes/comment_35_5801755d10149f0d3971fef0b6e1b62f._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 35"""
+ date="2016-05-03T17:12:42Z"
+ content="""
+@grawity yes, enableremote is the way to change configuration of an
+existing special remote.
+
+The special remote names are a bit funky; to keep the user from needing to
+enter in a long uuid when enabling a particular special remote, a name
+has to be recorded for the remote, and that becomes shared across clones
+of that repository, in a way that the names of git remotes are not
+normally. (Normally, my "origin" might be your "upstream" etc.)
+
+While it could ignore dead remotes when initializing a new remote with an
+existing name, then if the old remote got brought back from the dead, there
+would be a naming conflict. So, I think it's best to not go down that path,
+to avoid the undead horrors lurking there. ;-)
+"""]]
diff --git a/doc/todo/drop_--batch/comment_1_eff1bec0af5e7a7364d2fdaea6a8826f._comment b/doc/todo/drop_--batch/comment_1_eff1bec0af5e7a7364d2fdaea6a8826f._comment
new file mode 100644
index 0000000..d921d9e
--- /dev/null
+++ b/doc/todo/drop_--batch/comment_1_eff1bec0af5e7a7364d2fdaea6a8826f._comment
@@ -0,0 +1,18 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-05-03T19:06:53Z"
+ content="""
+Might be better to make `dropkey` do the same numcopies checking as
+`drop` does. Currently, `dropkey` needs `--force` to do anything (and it's
+always needed that), so it could do numcopies checking when not forced,
+without breaking backwards compatability.
+
+The benefit of keeping this in `dropkey` is that dropping by key
+tends to work better with batch adds/imports of files that are occurring at
+the same time.
+
+Only downside I see is that dropping by key is unable to honor
+.gitattributes numcopies settings, since the associated filename is not
+known.
+"""]]
diff --git a/doc/todo/feature_request__58___pubkey-only_encryption_mode.mdwn b/doc/todo/feature_request__58___pubkey-only_encryption_mode.mdwn
index 2bfc629..5a3c108 100644
--- a/doc/todo/feature_request__58___pubkey-only_encryption_mode.mdwn
+++ b/doc/todo/feature_request__58___pubkey-only_encryption_mode.mdwn
@@ -12,3 +12,5 @@ remotes (S3). In that case, I don't care much about hiding file names, but
would appreciate the increased security of not having the secret key on the
backup server. It would only be needed if I wanted to verify or restore
backups.
+
+> Added "encryption=sharedpubkey" [[done]] --[[Joey]]
diff --git a/doc/todo/use_inode_cache_in_unlocked_files.mdwn b/doc/todo/use_inode_cache_in_unlocked_files.mdwn
index adf2bc3..572d80e 100644
--- a/doc/todo/use_inode_cache_in_unlocked_files.mdwn
+++ b/doc/todo/use_inode_cache_in_unlocked_files.mdwn
@@ -21,3 +21,13 @@ direct mode, the worst that can happen in this case is probably that a
modified file doesn't get added and committed. But, using the inode cache
for unlocked files would result in any such modified versions being thrown
away when the file is added, which is much more data lossy..
+
+> This bug was regarding v5 unlock/lock. In v6 mode, locking a
+> file doesn't need to rechecksum it; the key is pulled out of the
+> associated files database, and the inode cache is used to detect if the
+> unlocked file has been modified and so avoid data loss.
+>
+> So, this is [[done]] but only for v6 mode. I don't think I want to
+> backport it to v5 mode though; it fell out naturally as a consequence of
+> v6 mode, but to support it in v5 mode would be a lot more work.
+> --[[Joey]]
diff --git a/doc/todo/wishlist__58___add_repository_name_to_commit_messages.mdwn b/doc/todo/wishlist__58___add_repository_name_to_commit_messages.mdwn
index 1c37cc1..64388d5 100644
--- a/doc/todo/wishlist__58___add_repository_name_to_commit_messages.mdwn
+++ b/doc/todo/wishlist__58___add_repository_name_to_commit_messages.mdwn
@@ -1,3 +1,6 @@
The commit messages made by git-annex are quite spartan, especially in direct mode where one cannot enter its own commit messages. This means that all that the messages say is "branch created", "git-annex automatic sync", "update", "merging" or little more.
It would be nice if git-annex could add at least the name of the repository/remote to the commit message. This would make the log a lot more clear, especially when dealing with problems or bugs.
+
+> The repository name is included now. Also, `git annex sync` can be passed
+> --message. [[done]] --[[Joey]]
diff --git a/doc/todo/wishlist__58__alias_system.mdwn b/doc/todo/wishlist__58__alias_system.mdwn
index 1f50129..5982a94 100644
--- a/doc/todo/wishlist__58__alias_system.mdwn
+++ b/doc/todo/wishlist__58__alias_system.mdwn
@@ -1 +1,3 @@
To implement things like my custom `git annex-push` without the dash, i.e. `git annex push`, an alias system for git-annex would be nice.
+
+> [[closing|done]] --[[Joey]]
diff --git a/git-annex.cabal b/git-annex.cabal
index 23baea6..9e89c8e 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -1,5 +1,5 @@
Name: git-annex
-Version: 6.20160419
+Version: 6.20160511
Cabal-Version: >= 1.8
License: GPL-3
Maintainer: Joey Hess <id@joeyh.name>
diff --git a/man/git-annex-map.1 b/man/git-annex-map.1
index be41daa..b0bca7c 100644
--- a/man/git-annex-map.1
+++ b/man/git-annex-map.1
@@ -21,6 +21,15 @@ it several times as the map is being built.
Note that this subcommand can be used to graph any git repository; it
is not limited to git-annex repositories.
.PP
+.SH LEGEND
+Ovals are repositories. White is regular, green is trusted, red is
+untrusted, and grey is dead.
+.PP
+Arrows between repositories are connections via git remotes.
+.PP
+Light blue boxes are hosts that were mapped, and contain the repositories
+on that host.
+.PP
.SH OPTIONS
.IP "\fB\-\-fast\fP"
.IP
diff --git a/man/git-annex-view.1 b/man/git-annex-view.1
index e258d2a..51b4d75 100644
--- a/man/git-annex-view.1
+++ b/man/git-annex-view.1
@@ -29,6 +29,11 @@ For example, \fB/=foo\fP will only include files from the foo
directory in the view, while \fBfoo/=*\fP will preserve the
subdirectories of the foo directory in the view.
.PP
+To enter a view containing only files that lack a given metadata
+field or tag, specify field!=value or !tag. Globs can also be used here,
+so \fBfield!="*"\fP will enter a view containing only files that do not have
+the field set to any value.
+.PP
.SH SEE ALSO
git-annex(1)
.PP
diff --git a/man/git-annex.1 b/man/git-annex.1
index 4ddd5d8..406880f 100644
--- a/man/git-annex.1
+++ b/man/git-annex.1
@@ -1024,15 +1024,21 @@ For example, to limit the bandwidth to 100Kbyte/s, set it to \fB\-\-bwlimit 100k
(There is no corresponding option for bup join.)
.IP
.IP "\fBremote.<name>.annex\-gnupg\-options\fP"
-Options to pass to GnuPG for symmetric encryption. For instance, to
+Options to pass to GnuPG when it's encrypting data. For instance, to
use the AES cipher with a 256 bits key and disable compression, set it
to \fB\-\-cipher\-algo AES256 \-\-compress\-algo none\fP. (These options take
precedence over the default GnuPG configuration, which is otherwise
used.)
.IP
+.IP "\fBremote.<name>.annex\-gnupg\-decrypt\-options\fP"
+Options to pass to GnuPG when it's decrypting data. (These options take
+precedence over the default GnuPG configuration, which is otherwise
+used.)
+.IP
.IP "\fBannex.ssh\-options\fP, \fBannex.rsync\-options\fP,"
\fBannex.rsync\-upload\-options\fP, \fBannex.rsync\-download\-options\fP,
-\fBannex.bup\-split\-options\fP, \fBannex.gnupg\-options\fP
+\fBannex.bup\-split\-options\fP, \fBannex.gnupg\-options\fP,
+\fBannex.gnupg\-decrypt\-options\fP
.IP
Default options to use if a remote does not have more specific options
as described above.
diff --git a/stack.yaml b/stack.yaml
index 5f202e7..346ba7a 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -24,3 +24,5 @@ extra-deps:
- mountpoints-1.0.1
- disk-free-space-0.1.0.1
- process-1.3.0.0
+explicit-setup-deps:
+ git-annex: true
diff --git a/standalone/android/cabal.config b/standalone/android/cabal.config
index ab31104..a55d85b 100644
--- a/standalone/android/cabal.config
+++ b/standalone/android/cabal.config
@@ -1,10 +1,12 @@
-constraints: Crypto ==4.2.5.1,
+constraints: unix installed,
+ Crypto ==4.2.5.1,
binary ==0.7.6.1,
DAV ==1.0.3,
HTTP ==4000.2.17,
HUnit ==1.2.5.2,
IfElse ==0.85,
MissingH ==1.2.1.0,
+ directory ==1.2.2.0,
MonadRandom ==0.1.13,
QuickCheck ==2.7.6,
SafeSemaphore ==0.10.1,
@@ -84,6 +86,7 @@ constraints: Crypto ==4.2.5.1,
http-conduit ==2.1.5,
http-date ==0.0.2,
http-types ==0.8.5,
+ blaze-builder ==0.3.3.2,
hxt ==9.3.1.4,
hxt-charproperties ==9.1.1.1,
hxt-regex-xmlschema ==9.0.4,
@@ -194,6 +197,6 @@ constraints: Crypto ==4.2.5.1,
yesod-routes ==1.2.0.7,
yesod-static ==1.2.4,
zlib ==0.5.4.1,
- bytestring ==0.10.4.0,
+ bytestring installed,
scientific ==0.3.3.1,
clock ==0.4.6.0
diff --git a/standalone/android/icons/drawable-hdpi/ic_launcher.png b/standalone/android/icons/drawable-hdpi/ic_launcher.png
index 6170d72..f438747 100644
--- a/standalone/android/icons/drawable-hdpi/ic_launcher.png
+++ b/standalone/android/icons/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/standalone/android/icons/drawable-ldpi/ic_launcher.png b/standalone/android/icons/drawable-ldpi/ic_launcher.png
index 0c5d55a..8decfec 100644
--- a/standalone/android/icons/drawable-ldpi/ic_launcher.png
+++ b/standalone/android/icons/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/standalone/android/icons/drawable-mdpi/ic_launcher.png b/standalone/android/icons/drawable-mdpi/ic_launcher.png
index 46302b2..aaf2c79 100644
--- a/standalone/android/icons/drawable-mdpi/ic_launcher.png
+++ b/standalone/android/icons/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/standalone/android/icons/drawable-xhdpi/ic_launcher.png b/standalone/android/icons/drawable-xhdpi/ic_launcher.png
index 601b787..4a4ec14 100644
--- a/standalone/android/icons/drawable-xhdpi/ic_launcher.png
+++ b/standalone/android/icons/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/standalone/android/icons/drawable/ic_launcher.png b/standalone/android/icons/drawable/ic_launcher.png
index 46302b2..aaf2c79 100644
--- a/standalone/android/icons/drawable/ic_launcher.png
+++ b/standalone/android/icons/drawable/ic_launcher.png
Binary files differ
diff --git a/standalone/android/tmp/network-2.4.1.2/cabal.config b/standalone/android/tmp/network-2.4.1.2/cabal.config
index ab31104..a55d85b 100644
--- a/standalone/android/tmp/network-2.4.1.2/cabal.config
+++ b/standalone/android/tmp/network-2.4.1.2/cabal.config
@@ -1,10 +1,12 @@
-constraints: Crypto ==4.2.5.1,
+constraints: unix installed,
+ Crypto ==4.2.5.1,
binary ==0.7.6.1,
DAV ==1.0.3,
HTTP ==4000.2.17,
HUnit ==1.2.5.2,
IfElse ==0.85,
MissingH ==1.2.1.0,
+ directory ==1.2.2.0,
MonadRandom ==0.1.13,
QuickCheck ==2.7.6,
SafeSemaphore ==0.10.1,
@@ -84,6 +86,7 @@ constraints: Crypto ==4.2.5.1,
http-conduit ==2.1.5,
http-date ==0.0.2,
http-types ==0.8.5,
+ blaze-builder ==0.3.3.2,
hxt ==9.3.1.4,
hxt-charproperties ==9.1.1.1,
hxt-regex-xmlschema ==9.0.4,
@@ -194,6 +197,6 @@ constraints: Crypto ==4.2.5.1,
yesod-routes ==1.2.0.7,
yesod-static ==1.2.4,
zlib ==0.5.4.1,
- bytestring ==0.10.4.0,
+ bytestring installed,
scientific ==0.3.3.1,
clock ==0.4.6.0