Commit graph

73 commits

Author SHA1 Message Date
Joey Hess
f4bf444ae0 store content in hashDirLower directories in bare repositories
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.
2011-11-28 22:55:40 -04:00
Joey Hess
da9cd315be add support for using hashDirLower in addition to hashDirMixed
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.
2011-11-28 22:43:51 -04:00
Mark Wright
041d324125 Remove haskell98 to build with ghc 7.2.2, also built with ghc 7.0.4
Signed-off-by: Joey Hess <joey@kitenet.net>
2011-11-26 12:05:08 -04:00
Joey Hess
bf460a0a98 reorder repo parameters last
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.
2011-11-08 16:27:20 -04:00
Joey Hess
91366c896d clean Annex stuff out of Utility/ 2011-10-16 00:04:26 -04:00
Joey Hess
8ef2095fa0 factor out common imports
no code changes
2011-10-03 23:29:48 -04:00
Joey Hess
d357556141 Add locking to avoid races when changing the git-annex branch. 2011-10-03 16:32:36 -04:00
Joey Hess
6c396a256c finished hlint pass 2011-07-15 12:47:14 -04:00
Joey Hess
e784757376 hlint tweaks
Did all sources except Remotes/* and Command/*
2011-07-15 03:12:05 -04:00
Joey Hess
79016c197c add hashing to web log files 2011-07-01 17:23:01 -04:00
Joey Hess
f6063a094e renamed GitRepo to Git
It was always imported qualified as Git anyway
2011-06-30 13:21:39 -04:00
Joey Hess
5f494154a3 add journaling to speed up changes to the git-annex branch
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.
2011-06-23 11:37:26 -04:00
Joey Hess
23e765b67c update re git-annex branch direct modification 2011-06-23 09:56:04 -04:00
Joey Hess
9e37898e21 remove stateDir 2011-06-23 08:48:13 -04:00
Joey Hess
1a182d4d04 stub in v2 upgrade 2011-06-22 17:51:48 -04:00
Joey Hess
4c4ebf2d75 store trust.log and remote.log in the git-annex branch
.. and I think that's everything that will use the branch
2011-06-22 17:08:51 -04:00
Joey Hess
235e2e63a1 move 2011-06-22 16:30:34 -04:00
Joey Hess
1870186632 fixed logFile 2011-06-22 16:17:16 -04:00
Joey Hess
a5e6802b5b typos in comments 2011-06-21 14:44:56 -04:00
Joey Hess
703c437bd9 rename modules for data types into Types/ directory 2011-06-01 21:56:04 -04:00
Joey Hess
760cde28b6 more pointless monadic golfing 2011-05-16 14:49:28 -04:00
Joey Hess
43f0a666f0 unused: Now also lists files fsck places in .git/annex/bad/ 2011-04-29 13:59:00 -04:00
Joey Hess
f005a84e56 add loggedKeys 2011-04-02 15:50:51 -04:00
Joey Hess
616e6f8a84 Use lowercase hash directories for locationlog files
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.
2011-04-02 13:49:03 -04:00
Joey Hess
fdd455e913 use same directory structure as .git/annex/objects for directory remotes
And same file perms.
2011-03-30 14:56:31 -04:00
Joey Hess
137257ded1 better letter choice for hashing 2011-03-16 02:50:13 -04:00
Joey Hess
dd5448eb07 added 2 level hashing
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.
2011-03-15 23:58:27 -04:00
Joey Hess
6c412fb9f5 escape colons in key files 2011-03-15 23:39:04 -04:00
Joey Hess
9d49fe2c17 first pass at using new keys
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.
2011-03-15 21:34:13 -04:00
Joey Hess
0e0f85e09d add hash directory stuff, not used yet 2011-03-15 17:47:00 -04:00
Joey Hess
d651d4985b some initial support for local bare repos
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.
2011-03-03 14:51:57 -04:00
Joey Hess
e6da7eb177 Improved temp file handling
* Improved temp file handling. Transfers of content can now be resumed
  from temp files later; the resume does not have to be the immediate
  next git-annex run.
* unused: Include partially transferred content in the list.
2011-01-28 14:10:50 -04:00
Joey Hess
4f9336bb60 idiom 2011-01-27 17:58:30 -04:00
Joey Hess
167523f09d better directory handling
Rename Locations functions for better consitency, and make their values
more consistent too.

Used </> rather than manually building paths. There are still more places
that manually do so, but are tricky, due to the behavior of </> when
the second FilePath is absolute. So I only changed places where
it obviously was relative.
2011-01-27 17:00:32 -04:00
Joey Hess
9640417067 avoid warning when symlink in the repo contains a colon but is not a
pointer to annexed content
2011-01-27 16:10:45 -04:00
Joey Hess
57adb0347b hlint tweaks
Remotes.hs next, and also Backend/* and Command/*
2010-11-22 15:46:57 -04:00
Joey Hess
748a7475bb dropunused 2010-11-15 18:04:19 -04:00
Joey Hess
5fa25a812a fsck improvements
* fsck: Check if annex.numcopies is satisfied.
* fsck: Verify the sha1 of files when the SHA1 backend is used.
* fsck: Verify the size of files when the WORM backend is used.
* fsck: Allow specifying individual files to fsk if fscking everything
  is not desired.
* fsck: Fix bug, introduced in 0.04, in detection of unused data.
2010-11-13 14:59:27 -04:00
Joey Hess
8dd9f8e49e typo 2010-11-08 17:44:30 -04:00
Joey Hess
6395b790ce Reorganised the layout of .git/annex/ 2010-11-08 17:00:34 -04:00
Joey Hess
02a21d7f27 reorg .git/annex 2010-11-08 15:14:54 -04:00
Joey Hess
316264f3e8 add annexDir 2010-11-07 17:36:24 -04:00
Joey Hess
cf4c926f2e more Wall cleaning 2010-10-31 16:00:32 -04:00
Joey Hess
833d4b342e copyright statements 2010-10-27 16:53:54 -04:00
Joey Hess
4cda7b6e7c bugfix 2010-10-25 21:35:45 -04:00
Joey Hess
8beed17168 drop incomplete bare repo support
Added a bug about it.

Now git annex move --from works fully
2010-10-25 17:31:07 -04:00
Joey Hess
1aa19422ac git annex move --from remote almost working 2010-10-25 17:17:03 -04:00
Joey Hess
f3dcc8489d gratuitous rename 2010-10-18 02:06:27 -04:00
Joey Hess
a020b0c25c atomic file retrieval from backends 2010-10-17 16:39:30 -04:00
Joey Hess
da453ba701 bugfix: don't add files under .git-annex
That could happen if git annex add -N were used repeatedly..
2010-10-16 22:36:35 -04:00