reorg .git/annex
This commit is contained in:
parent
ab4de45491
commit
02a21d7f27
3 changed files with 18 additions and 9 deletions
13
Locations.hs
13
Locations.hs
|
@ -13,7 +13,8 @@ module Locations (
|
||||||
annexLocation,
|
annexLocation,
|
||||||
annexLocationRelative,
|
annexLocationRelative,
|
||||||
annexTmpLocation,
|
annexTmpLocation,
|
||||||
annexDir
|
annexDir,
|
||||||
|
annexObjectDir
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.String.Utils
|
import Data.String.Utils
|
||||||
|
@ -29,7 +30,7 @@ gitStateDir :: Git.Repo -> FilePath
|
||||||
gitStateDir repo = (Git.workTree repo) ++ "/" ++ stateLoc
|
gitStateDir repo = (Git.workTree repo) ++ "/" ++ stateLoc
|
||||||
|
|
||||||
{- An annexed file's content is stored in
|
{- 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>
|
- <backend:fragment>
|
||||||
-
|
-
|
||||||
- That allows deriving the key and backend by looking at the symlink to it.
|
- 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.-}
|
- Note: Assumes repo is NOT bare.-}
|
||||||
annexLocationRelative :: Key -> FilePath
|
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.
|
{- The annex directory of a repository.
|
||||||
-
|
-
|
||||||
|
@ -50,6 +52,11 @@ annexLocationRelative key = ".git/annex/" ++ (keyFile key)
|
||||||
annexDir :: Git.Repo -> FilePath
|
annexDir :: Git.Repo -> FilePath
|
||||||
annexDir r = Git.workTree r ++ "/.git/annex"
|
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 -}
|
{- .git-annex/tmp is used for temp files -}
|
||||||
annexTmpLocation :: Git.Repo -> FilePath
|
annexTmpLocation :: Git.Repo -> FilePath
|
||||||
annexTmpLocation r = annexDir r ++ "/tmp/"
|
annexTmpLocation r = annexDir r ++ "/tmp/"
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -2,6 +2,8 @@ git-annex (0.04) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* Add build dep on libghc6-testpack-dev.
|
* Add build dep on libghc6-testpack-dev.
|
||||||
* Add annex.version, which will be used to automate upgrades.
|
* 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
|
-- Joey Hess <joeyh@debian.org> Mon, 08 Nov 2010 12:36:39 -0400
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,13 @@ Multiple pluggable backends are supported, and a single repository
|
||||||
can use different backends for different files.
|
can use different backends for different files.
|
||||||
|
|
||||||
* `WORM` ("Write Once, Read Many") This backend stores the file's content
|
* `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,
|
only in `.git/annex/objects/`, and assumes that any file with the same
|
||||||
size, and modification time has the same content. So with this backend,
|
basename, size, and modification time has the same content. So with
|
||||||
files can be moved around, but should never be added to or changed.
|
this backend, files can be moved around, but should never be added to
|
||||||
This is the default, and the least expensive backend.
|
or changed. This is the default, and the least expensive backend.
|
||||||
* `SHA1` -- This backend stores the file's content in
|
* `SHA1` -- This backend stores the file's content in
|
||||||
`.git/annex/`, with a name based on its sha1 checksum. This backend allows
|
`.git/annex/objects/`, with a name based on its sha1 checksum. This backend
|
||||||
modifications of files to be tracked. Its need to generate checksums
|
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
|
can make it slower for large files. **Warning** this backend is not ready
|
||||||
for use.
|
for use.
|
||||||
* `URL` -- This backend downloads the file's content from an external URL.
|
* `URL` -- This backend downloads the file's content from an external URL.
|
||||||
|
|
Loading…
Reference in a new issue