aboutsummaryrefslogtreecommitdiff
path: root/Branch.hs
Commit message (Collapse)AuthorAge
* code simplification thanks to applicative functorsGravatar Joey Hess2011-08-25
|
* split groups of related functions out of UtilityGravatar Joey Hess2011-08-22
|
* avoid the functorGravatar Joey Hess2011-08-21
| | | | fmap = liftM
* Now "git annex init" only has to be run onceGravatar Joey Hess2011-08-17
| | | | | | | when a git repository is first being created. Clones will automatically notice that git-annex is in use and automatically perform a basic initalization. It's still recommended to run "git annex init" in any clones, to describe them.
* unify elipsis handlingGravatar Joey Hess2011-07-19
| | | | | And add a simple dots-based progress display, currently only used in v2 upgrade.
* hlint tweaksGravatar Joey Hess2011-07-15
| | | | Did all sources except Remotes/* and Command/*
* fork a process to feed git hash-objectGravatar Joey Hess2011-07-05
| | | | | This is another workaround for bug #624389. I hope it will fix http://git-annex.branchable.com/bugs/problem_with_upgrade_v2_-__62___v3/
* simplify git cat-file startupGravatar Joey Hess2011-07-02
|
* further improved git cat-file error handlingGravatar Joey Hess2011-07-02
|
* rename GitUnionMerge to Git.UnionMergeGravatar Joey Hess2011-06-30
| | | | Also, moved commit function into Git proper, it's not union merge specific.
* renamed GitRepo to GitGravatar Joey Hess2011-06-30
| | | | It was always imported qualified as Git anyway
* more robust git cat-file output parserGravatar Joey Hess2011-06-30
| | | | | Only remaining ugliness is the handling of error messages for files that are not present on the branch.
* Fix encoding of utf-8 etc when storing the description of repository and ↵Gravatar Joey Hess2011-06-30
| | | | | | | | | other content. Write files in raw mode, to avoid mangling the encoding of content provided. Note: This was a longstanding problem, it was not introduced in v3.
* use ByteString for hGetGravatar Joey Hess2011-06-29
| | | | Avoids the crazy low-level hGetBuf stuff. Also slightly faster.
* improve git cat-file codeGravatar Joey Hess2011-06-29
| | | | | | | Now it reads the size specified, rather than using the sentinal hack to determine EOF. It still depends on error messages to handle files that are not present.
* Sped back up fsck, copy --from etcGravatar Joey Hess2011-06-29
| | | | | | | | | | | All commands that often have to read a lot of information from the git-annex branch should now be nearly as fast as before the branch was introduced. Before fsck was taking approximatly 3 hours, now it's running in 8 minutes. The code is very nasty. It should be rewritten to read the header line from git cat-file, and then read the specified number of bytes of content.
* tweaksGravatar Joey Hess2011-06-28
|
* Always ensure git-annex branch exists.Gravatar Joey Hess2011-06-26
|
* better setup of git-annex branch pushing on upgradeGravatar Joey Hess2011-06-24
|
* simplified to use existing functionsGravatar Joey Hess2011-06-23
|
* commit after merge if any journal files were stagedGravatar Joey Hess2011-06-23
|
* fix consistency, and partially close a race during mergeGravatar Joey Hess2011-06-23
| | | | | | | | | | | | | | | | | Only "partially" because the journal is not locked during the merge, so there's a small window where a different git-annex process could write info to the journal that overwrites info taken from the merge. That could be dealt with by locking, but the lock would really need to be around the whole git-annex, to only let one run at a time. Otherwise, even with the journal locked during the merge, another git-annex could already be running, generate an overwriting change, and only store it in the journal after the merge was complete. And similarly, two git-annex processes could fight and overwrite each other's information independant of any merging. So, a toplevel lock for git-annex may get added; it's something I've considered before, as these potential, unlikely problems are not new. (OTOH, fsck will deal with such problems.)
* fix bootstrapping, broken by move of .git/annex/indexGravatar Joey Hess2011-06-23
|
* fix gotcha with closed stderr and --debugGravatar Joey Hess2011-06-23
|
* rename git-annex index fileGravatar Joey Hess2011-06-23
|
* 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
|
* rewrite loggedkeys to use git-annex branchGravatar Joey Hess2011-06-22
| | | | | | That sucking sound is a whole page of code vanishing to be replaced with return . catMaybes . map (logFileKey . takeFileName) =<< Branch.files What can I say, git is my database, and haskell my copilot.
* bugfix: restore index file env varGravatar Joey Hess2011-06-22
| | | | | | | | | This fixes precommit, since in that hook, git sets the env var to write to the lock file, which avoids git add failing due to the presence of the lock file. (Took me a good hour and a half of confusion to figure this out.) Test suite now passes 100%! Only the upgrade code still remains to be written.
* squelched git-cat-file's error message when file DNEGravatar Joey Hess2011-06-22
| | | | | This seemed much too hard to do. I just wanted to close stderr when running it.
* better branch displayGravatar 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
* Branch handling improvementsGravatar Joey Hess2011-06-22
| | | | | | | | Support creating the branch. Unified branch state into a single data type. Only commit changes when the index has been changed.
* add a small cache of the most recently accessed item from the git-annex branchGravatar Joey Hess2011-06-22
| | | | | | | | | | | This will speed up typical cases like git-annex get, which currently has to read the location log once, then read it a second time in order to add a line to it. Since these reads now involve more than just reading in a file, it seemed good to add a cache layer. Only the most recent thing needs to be cached, because git-annex has good locality; it operates on one file at a time, and only cares about one item from the branch per file.
* allow for union merges between a tree and the content in the indexGravatar Joey Hess2011-06-21
| | | | | | | | | | | | | | | This is needed for robust handling of the git-annex branch. Since changes are staged to its index as git-annex runs, and committed at the end, it's possible that git-annex is interrupted, and leaves a dirty index. When it next runs, it needs to be able to merge the git-annex branch as necessary, without losing the existing changes in the index. Note that this assumes that the git-annex branch is only modified by git-annex. Any changes to it will be lost when git-annex updates the branch. I don't see a good, inexpensive way to find changes in the git-annex branch that arn't in the index, and union merging the git-annex branch into the index every time would likewise be expensive.
* fixesGravatar Joey Hess2011-06-21
| | | | | | make commit commit to the right branch when getting content from the branch, update first
* Branch module completeGravatar Joey Hess2011-06-21
| | | | Refactored some code that it needs into GitRepo.
* refactorGravatar Joey Hess2011-06-21
|
* code to update a git-annex branchGravatar Joey Hess2011-06-21
There is no suitable git hook to run code when pulling changes that might need to be merged into the git-annex branch. The post-merge hook is only run when changes are merged into HEAD, and it's possible, and indeed likely that many pulls will only have changes in git-annex, but not in HEAD, and not trigger it. So, git-annex will have to take care to update the branch before reading from it, to make sure it has merged in current info from remotes. Happily, this can be done quite inexpensively, just a git-show-ref to list branches, and a minimalized git-log to see if there are unmerged changes on the branches. To further speed up, it will be done only once per git-annex run, max.