summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Locations.hs13
-rw-r--r--debian/changelog2
-rw-r--r--doc/backends.mdwn12
3 files changed, 18 insertions, 9 deletions
diff --git a/Locations.hs b/Locations.hs
index 951924c40..78c0bff4b 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -13,7 +13,8 @@ module Locations (
annexLocation,
annexLocationRelative,
annexTmpLocation,
- annexDir
+ annexDir,
+ annexObjectDir
) where
import Data.String.Utils
@@ -29,7 +30,7 @@ gitStateDir :: Git.Repo -> FilePath
gitStateDir repo = (Git.workTree repo) ++ "/" ++ stateLoc
{- An annexed file's content is stored in
- - /path/to/repo/.git/annex/<key>, where <key> is of the form
+ - /path/to/repo/.git/annex/objects/<key>/<key>, where <key> is of the form
- <backend:fragment>
-
- That allows deriving the key and backend by looking at the symlink to it.
@@ -42,7 +43,8 @@ annexLocation r key =
-
- Note: Assumes repo is NOT bare.-}
annexLocationRelative :: Key -> FilePath
-annexLocationRelative key = ".git/annex/" ++ (keyFile key)
+annexLocationRelative key = ".git/annex/objects/" ++ f ++ f
+ where f = keyFile key
{- The annex directory of a repository.
-
@@ -50,6 +52,11 @@ annexLocationRelative key = ".git/annex/" ++ (keyFile key)
annexDir :: Git.Repo -> FilePath
annexDir r = Git.workTree r ++ "/.git/annex"
+{- The part of the annex directory where file contents are stored.
+ -}
+annexObjectDir :: Git.Repo -> FilePath
+annexObjectDir r = annexDir r ++ "/objects"
+
{- .git-annex/tmp is used for temp files -}
annexTmpLocation :: Git.Repo -> FilePath
annexTmpLocation r = annexDir r ++ "/tmp/"
diff --git a/debian/changelog b/debian/changelog
index 98b814eb9..49aa9829a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ git-annex (0.04) UNRELEASED; urgency=low
* Add build dep on libghc6-testpack-dev.
* Add annex.version, which will be used to automate upgrades.
+ * Reorganised the layout of .git/annex/ , moving cached file contents
+ to .git/annex/objects/<key>/<key>
-- Joey Hess <joeyh@debian.org> Mon, 08 Nov 2010 12:36:39 -0400
diff --git a/doc/backends.mdwn b/doc/backends.mdwn
index dc359174a..fde23df5e 100644
--- a/doc/backends.mdwn
+++ b/doc/backends.mdwn
@@ -10,13 +10,13 @@ Multiple pluggable backends are supported, and a single repository
can use different backends for different files.
* `WORM` ("Write Once, Read Many") This backend stores the file's content
- only in `.git/annex/`, and assumes that any file with the same basename,
- size, and modification time has the same content. So with this backend,
- files can be moved around, but should never be added to or changed.
- This is the default, and the least expensive backend.
+ only in `.git/annex/objects/`, and assumes that any file with the same
+ basename, size, and modification time has the same content. So with
+ this backend, files can be moved around, but should never be added to
+ or changed. This is the default, and the least expensive backend.
* `SHA1` -- This backend stores the file's content in
- `.git/annex/`, with a name based on its sha1 checksum. This backend allows
- modifications of files to be tracked. Its need to generate checksums
+ `.git/annex/objects/`, with a name based on its sha1 checksum. This backend
+ allows modifications of files to be tracked. Its need to generate checksums
can make it slower for large files. **Warning** this backend is not ready
for use.
* `URL` -- This backend downloads the file's content from an external URL.