summaryrefslogtreecommitdiff
path: root/Locations.hs
Commit message (Collapse)AuthorAge
* Fix display of warning message when encountering a file that uses an ↵Gravatar Joey Hess2012-05-31
| | | | unsupported backend.
* Clean up handling of git directory and git worktree.Gravatar Joey Hess2012-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baked into the code was an assumption that a repository's git directory could be determined by adding ".git" to its work tree (or nothing for bare repos). That fails when core.worktree, or GIT_DIR and GIT_WORK_TREE are used to separate the two. This was attacked at the type level, by storing the gitdir and worktree separately, so Nothing for the worktree means a bare repo. A complication arose because we don't learn where a repository is bare until its configuration is read. So another Location type handles repositories that have not had their config read yet. I am not entirely happy with this being a Location type, rather than representing them entirely separate from the Git type. The new code is not worse than the old, but better types could enforce more safety. Added support for core.worktree. Overriding it with -c isn't supported because it's not really clear what to do if a git repo's config is read, is not bare, and is then overridden to bare. What is the right git directory in this case? I will worry about this if/when someone has a use case for overriding core.worktree with -c. (See Git.Config.updateLocation) Also removed and renamed some functions like gitDir and workTree that misused git's terminology. One minor regression is known: git annex add in a bare repository does not print a nice error message, but runs git ls-files in a way that fails earlier with a less nice error message. This is because before --work-tree was always passed to git commands, even in a bare repo, while now it's not.
* cabal file now autodetects whether S3 support is available.Gravatar Joey Hess2012-04-14
|
* perhaps more clear typeGravatar Joey Hess2012-03-10
|
* fix key directory hash calculation codeGravatar Joey Hess2012-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Key directory hash calculation code to behave as it did before version 3.20120227 when a key contains non-ascii. The hash directories for a given Key are based on its md5sum. Prior to ghc 7.4, Keys contained raw, undecoded bytes, so the md5sum was taken of each byte in turn. With the ghc 7.4 filename encoding change, keys contains decoded unicode characters (possibly with surrigates for undecodable bytes). This changes the result of the md5sum, since the md5sum used is pure haskell and supports unicode. And that won't do, as git-annex will start looking in a different hash directory for the content of a key. The surrigates are particularly bad, since that's essentially a ghc implementation detail, so could change again at any time. Also, changing the locale changes how the bytes are decoded, which can also change the md5sum. Symptoms would include things like: * git annex fsck would complain that no copies existed of a file, despite its symlink pointing to the content that was locally present * git annex fix would change the symlink to use the wrong hash directory. Only WORM backend is likely to have been affected, since only it tends to include much filename data (SHA1E could in theory also be affected). I have not tried to support the hash directories used by git-annex versions 3.20120227 to 3.20120308, so things added with those versions with WORM will require manual fixups. Sorry for the inconvenience!
* add remote start and stop hooksGravatar Joey Hess2012-03-04
| | | | | | Locking is used, so that, if there are multiple git-annex processes using a remote concurrently, the stop hook is only run by the last process that uses it.
* improve alwayscommit=false modeGravatar Joey Hess2012-02-25
| | | | | | | | | | | | | | Now changes are staged into the branch's index, but not committed, which avoids growing a large journal. And sync and merge always explicitly commit, ensuring that even when they do nothing else, they commit the staged changes. Added a flag file to indicate that the branch's journal contains uncommitted changes. (Could use git ls-files, but don't want to run that every time.) In the future, this ability to have uncommitted changes staged in the journal might be used on remotes after a series of oneshot commands.
* ssh connection cachingGravatar Joey Hess2012-01-20
| | | | | | | | | | | Ssh connection caching is now enabled automatically by git-annex. Only one ssh connection is made to each host per git-annex run, which can speed some things up a lot, as well as avoiding repeated password prompts. Concurrent git-annex processes also share ssh connections. Cached ssh connections are shut down when git-annex exits. Note: The rsync special remote does not yet participate in the ssh connection caching.
* avoid partial functionGravatar Joey Hess2011-12-15
|
* optimize index updatingGravatar Joey Hess2011-12-11
| | | | | | | | | | | The last branch ref that the index was updated to is stored in .git/annex/index.lck, and the index only updated when the current branch ref differs. (The .lck file should later be used for locking too.) Some more optimization is still needed, since there is some redundancy in calls to git show-ref.
* move a file location to Locations.hsGravatar Joey Hess2011-12-11
|
* better syntaxGravatar Joey Hess2011-12-10
|
* Fix bug in last version in getting contents from bare repositories.Gravatar Joey Hess2011-12-10
|
* refactorGravatar Joey Hess2011-12-03
|
* convert rsync special backend to using both hash directory typesGravatar Joey Hess2011-12-02
|
* use lowercase hash by default; non-bare repos are a special caseGravatar Joey Hess2011-12-02
| | | | | | | | Directory special remotes will now always store keys in the lowercase name, which avoids the complication of catching failures to create the mixed case name. Git remotes using http will now try the lowercase name first.
* refactorGravatar Joey Hess2011-12-02
|
* refactorGravatar Joey Hess2011-11-28
|
* optimize gitAnnexLocationGravatar Joey Hess2011-11-28
| | | | For non-bare it's back to doing no work.
* store content in hashDirLower directories in bare repositoriesGravatar Joey Hess2011-11-28
| | | | | | | When storing content in bare repositories, use the hashDirLower directories. Bare repositories can be on USB drives, which might use the FAT filesystem, and fall afoul of recent bugs in linux's handling of mixed case on FAT. Using hashDirLower avoids that.
* add support for using hashDirLower in addition to hashDirMixedGravatar Joey Hess2011-11-28
| | | | | | | | | | Supporting multiple directory hash types will allow converting to a different one, without a flag day. gitAnnexLocation now checks which of the possible locations have a file. This means more statting of files. Several places currently use gitAnnexLocation and immediately check if the returned file exists; those need to be optimised.
* Remove haskell98 to build with ghc 7.2.2, also built with ghc 7.0.4Gravatar Mark Wright2011-11-26
| | | | Signed-off-by: Joey Hess <joey@kitenet.net>
* reorder repo parameters lastGravatar Joey Hess2011-11-08
| | | | | | | | | | | | | Many functions took the repo as their first parameter. Changing it consistently to be the last parameter allows doing some useful things with currying, that reduce boilerplate. In particular, g <- gitRepo is almost never needed now, instead use inRepo to run an IO action in the repo, and fromRepo to get a value from the repo. This also provides more opportunities to use monadic and applicative combinators.
* clean Annex stuff out of Utility/Gravatar Joey Hess2011-10-16
|
* factor out common importsGravatar Joey Hess2011-10-03
| | | | no code changes
* Add locking to avoid races when changing the git-annex branch.Gravatar Joey Hess2011-10-03
|
* finished hlint passGravatar Joey Hess2011-07-15
|
* hlint tweaksGravatar Joey Hess2011-07-15
| | | | Did all sources except Remotes/* and Command/*
* add hashing to web log filesGravatar Joey Hess2011-07-01
|
* renamed GitRepo to GitGravatar Joey Hess2011-06-30
| | | | It was always imported qualified as Git anyway
* add journaling to speed up changes to the git-annex branchGravatar Joey Hess2011-06-23
| | | | | | | | git is slow when the index file is large and has to be rewritten each time a file is changed. To speed this up, added a journal where changes are recorded before being fed into the index file and committed to the git-annex branch. The entire journal can be fed into git with just 2 commands, and only one write of the index file.
* update re git-annex branch direct modificationGravatar Joey Hess2011-06-23
|
* remove stateDirGravatar Joey Hess2011-06-23
|
* stub in v2 upgradeGravatar Joey Hess2011-06-22
|
* store trust.log and remote.log in the git-annex branchGravatar Joey Hess2011-06-22
| | | | .. and I think that's everything that will use the branch
* moveGravatar Joey Hess2011-06-22
|
* fixed logFileGravatar Joey Hess2011-06-22
|
* typos in commentsGravatar Joey Hess2011-06-21
|
* rename modules for data types into Types/ directoryGravatar Joey Hess2011-06-01
|
* more pointless monadic golfingGravatar Joey Hess2011-05-16
|
* unused: Now also lists files fsck places in .git/annex/bad/Gravatar Joey Hess2011-04-29
|
* add loggedKeysGravatar Joey Hess2011-04-02
|
* Use lowercase hash directories for locationlog filesGravatar Joey Hess2011-04-02
| | | | | | to avoid some issues with git on OSX with the mixed-case directories. No migration is needed; the old mixed case hash directories are still read; new information is written to the new directories.
* use same directory structure as .git/annex/objects for directory remotesGravatar Joey Hess2011-03-30
| | | | And same file perms.
* better letter choice for hashingGravatar Joey Hess2011-03-16
|
* added 2 level hashingGravatar Joey Hess2011-03-15
| | | | | | This means there can be 1024 subdirs, each with up to 1024 sub-subdirs. So with hundreds of millions of annexed objects, each leaf directory will have only a few files on average.
* escape colons in key filesGravatar Joey Hess2011-03-15
|
* first pass at using new keysGravatar Joey Hess2011-03-15
| | | | | | | It compiles. It sorta works. Several subcommands are FIXME marked and broken, because things that used to accept separate --backend and --key params need to be changed to accept just a --key that encodes all the key info, now that there is metadata in keys.
* add hash directory stuff, not used yetGravatar Joey Hess2011-03-15
|
* some initial support for local bare reposGravatar Joey Hess2011-03-03
| | | | | | | | | | | This relies on git-annex's behavior of reading the config of local repos. That allows repoIsLocalBare to examine the git config for core.bare. Hopefully, gitAnnexLocation, gitAnnexDir, and gitAnnexObjectDir are only used on local repos. But, I have not audited fully, since they're probably not (see for example copyToRemote). And so, the functions fall back to their old non-bare-aware behavior for non-local repos.