aboutsummaryrefslogtreecommitdiff
path: root/Annex/Branch.hs
Commit message (Collapse)AuthorAge
* annex.merge-annex-branchesGravatar Joey Hess2018-02-22
| | | | | | | | | | | | | | Added annex.merge-annex-branches config setting which can be used to disable automatic merge of git-annex branches. I wonder if git-annex merge/sync/assistant should disable this setting? Not sure yet, so have not done so. May be that users will not set it in git config, but pass it via -c to commands that need it. Checking the config setting adds a very small overhead, but it's only checked once per command so should be insignificant. This commit was supported by the NSF-funded DataLad project.
* Remove temporary code added in 6.20160619 to prime the mergedrefs log.Gravatar Joey Hess2018-02-22
| | | | | | Repositories that are upgraded from before that version to this one will not break, but will just not see the benefit of the mergedrefs log speeding things up, until one new ref gets merged in.
* Improve startup time for commands that do not operate on remotesGravatar Joey Hess2018-01-09
| | | | | | | | | | | | | | And for tab completion, by not unnessessarily statting paths to remotes, which used to cause eg, spin-up of removable drives. Got rid of the remotes member of Git.Repo. This was a bit painful. Remote.Git modifies the list of remotes as it reads their configs, so still need a persistent list of remotes. So, put it in as Annex.gitremotes. It's only populated by getGitRemotes, so commands like examinekey that don't care about remotes won't do so. This commit was sponsored by Jake Vosloo on Patreon.
* more core.sharedRepository perm fixesGravatar Joey Hess2018-01-04
| | | | | | | Fix more places where files in .git/annex/ were written with modes that did not take the core.sharedRepository config into account. This commit was sponsored by Jeff Goeke-Smith on Patreon.
* finally really add back custom-setup stanzaGravatar Joey Hess2017-12-31
| | | | | | | | | | | | Fourth or fifth try at this and finally found a way to make it work. Absurd amount of busy-work forced on me by change in cabal's behavior. Split up Utility modules that need posix stuff out of ones used by Setup. Various other hacks around inability for Setup to use anything that ifdefs a use of unix. Probably lost a full day of my life to this. This is how build systems make their users hate them. Just saying.
* enable LambdaCase and convert around 10% of places that could use itGravatar Joey Hess2017-11-15
| | | | | | | | | | | Needs ghc 7.6.1, so minimum base version increased slightly. All builds are well above this version of ghc, and debian oldstable is as well. Code that could use lambdacase can be found by running: git grep -B 1 'case ' | less and searching in less for "<-" This commit was sponsored by andrea rota.
* fix compaction of export.logGravatar Joey Hess2017-09-12
| | | | | | | | It was not getting old lines removed, because the tree graft confused the updater, so it union merged from the previous git-annex branch, which still contained the old lines. Fixed by carefully using setIndexSha. This commit was supported by the NSF-funded DataLad project.
* graft exported tree into git-annex branchGravatar Joey Hess2017-08-31
| | | | | | | | | | | So it will be available later and elsewhere, even after GC. I first though to use git update-index to do this, but feeding it a line with a tree object seems to always cause it to generate a git subtree merge. So, fell back to using the Git.Tree interface to maniupulate the trees, and not involving the git-annex branch index file at all. This commit was sponsored by Andreas Karlsson.
* adeiu, MissingHGravatar Joey Hess2017-05-16
| | | | | | | | | | | | | | | | Removed dependency on MissingH, instead depending on the split library. After laying groundwork for this since 2015, it was mostly straightforward. Added Utility.Tuple and Utility.Split. Eyeballed System.Path.WildMatch while implementing the same thing. Since MissingH's progress meter display was being used, I re-implemented my own. Bonus: Now progress is displayed for transfers of files of unknown size. This commit was sponsored by Shane-o on Patreon.
* correct spelling mistakesGravatar Edward Betts2017-02-12
|
* config: New command for storing configuration in the git-annex branch.Gravatar Joey Hess2017-01-30
| | | | | | | | | | | Any config names can be set using this; git-annex commands will only look at specific ones that make sense and are worth the overhead of querying the branch. This might also be useful for storing whatever other config-type stuff the user might want to shove into the git-annex branch. This commit was sponsored by Jochen Bartl on Patreon.
* Always use filesystem encoding for all file and handle reads and writes.Gravatar Joey Hess2016-12-24
| | | | | This is a big scary change. I have convinced myself it should be safe. I hope!
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* Speed up startup time by caching the refs that have been merged into the ↵Gravatar Joey Hess2016-07-17
| | | | | | | git-annex branch. This can speed up git-annex commands by as much as a second, depending on the number of remotes.
* nub transitionList to avoid ugly message after repeated transitions, and ↵Gravatar Joey Hess2016-05-18
| | | | avoid redundant work for repeated ForgetDeadRemotes transitions
* Work around git bug in handling of relative path to GIT_INDEX_FILE when in a ↵Gravatar Joey Hess2016-05-17
| | | | | | | | subdirectory of the repository. This affected git annex view. It turns out that some other places that use GIT_INDEX_FILE were already working around the bug. I removed the workaround from Annex.Branch since the new workaround will do.
* new method for merging changes into adjusted branch that avoids unncessary ↵Gravatar Joey Hess2016-04-06
| | | | | | merge conflicts Still needs work when there are actual merge conflicts.
* reuse annex's HashObjectHandleGravatar Joey Hess2016-03-14
|
* Sped up git-annex merge by using git hash-object --batch.Gravatar Joey Hess2016-03-14
| | | | | | | This does mean that it has to write out temp files containing updated objects for the merge. So may use more disk space, and disk IO, but that should generally win out over needing to launch N separate git hash-object processes.
* use hash-object --batchGravatar Joey Hess2016-03-14
| | | | Handle was plumbed through, but not used.
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* Avoid unncessary write to the location log when a file is unlocked and then ↵Gravatar Joey Hess2015-10-12
| | | | | | | | | | | | | | | added back with unchanged content. Implemented with no additional overhead of compares etc. This is safe to do for presence logs because of their locality of change; a given repo's presence logs are only ever changed in that repo, or in a repo that has just been actively changing the content of that repo. So, we don't need to worry about a split-brain situation where there'd be disagreement about the location of a key in a repo. And so, it's ok to not update the timestamp when that's the only change that would be made due to logging presence info.
* Only look at reflogs for relevant branches, not for git-annex branchesGravatar Joey Hess2015-07-07
| | | | This speeds it up quite a bit.. May still be too slow in large repos.
* unused: --used-refspec can now be configured to look at refs in the reflog. ↵Gravatar Joey Hess2015-07-07
| | | | | | This provides a way to not consider old versions of files to be unused after they have reached a specified age, when the old refs in the reflog expire. May be slow.
* refactor ls-tree paramsGravatar Joey Hess2015-07-06
| | | | All in one place to avoid bugs like 2ea34c47dd9819111f3cbaa2ce848581d286c05c
* bugfix: Pass --full-tree when using git ls-files to get a list of files on ↵Gravatar Joey Hess2015-07-06
| | | | the git-annex branch, so it works when run in a subdirectory. This bug affected git-annex unused, and potentially also transitions running code and other things.
* remove Params constructor from Utility.SafeCommandGravatar Joey Hess2015-06-01
| | | | | | | | | | | | | | | | | | This removes a bit of complexity, and should make things faster (avoids tokenizing Params string), and probably involve less garbage collection. In a few places, it was useful to use Params to avoid needing a list, but that is easily avoided. Problems noticed while doing this conversion: * Some uses of Params "oneword" which was entirely unnecessary overhead. * A few places that built up a list of parameters with ++ and then used Params to split it! Test suite passes.
* followup to bug I cannot reproduce, and analysis based presumptive fixGravatar Joey Hess2015-04-09
|
* Improve error message when --in @date is used and there is no reflog for the ↵Gravatar Joey Hess2015-03-26
| | | | git-annex branch.
* Added a post-update-annex hook, which is run after the git-annex branch is ↵Gravatar Joey Hess2015-03-20
| | | | | | updated. Needed for git update-server-info. See https://github.com/datalad/datalad/issues/1#issuecomment-84094406
* Improve race recovery code when committing to git-annex branch.Gravatar Joey Hess2015-02-09
|
* Repository tuning parameters can now be passed when initializing a ↵Gravatar Joey Hess2015-01-27
| | | | | | | | | | repository for the first time. * init: Repository tuning parameters can now be passed when initializing a repository for the first time. For details, see http://git-annex.branchable.com/tuning/ * merge: Refuse to merge changes from a git-annex branch of a repo that has been tuned in incompatable ways.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* absolute path to index file; test suite passesGravatar Joey Hess2015-01-06
| | | | | There are still known problems; for example git annex view a=b fails when run in a subdir of the repo.
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* Fix minor FD leak in journal code.Gravatar Joey Hess2014-07-09
| | | | | | | | | | | | | | | | | | | | | | | | Minor because normally only 1 FD is leaked per git-annex run. However, the test suite leaks a few hundred FDs, and this broke it on the Debian autobuilders, which seem to have a tigher than usual ulimit. The leak was introduced by the lazy getDirectoryContents' that was introduced in b54de1dad4874b7561d2c5a345954b6b5c594078 in order to scale to millions of journal files -- if the lazy list was never fully consumed, the directory handle did not get closed. Instead, pull in openDirectory/readDirectory/closeDirectory code that I already developed and submitted in a patch to the haskell directory library earlier. Using this in journalDirty avoids the place that the lazy list caused a problem. And using it in stageJournal eliminates the need for getDirectoryContents'. The getJournalFiles* functions are switched back to using the regular strict getDirectoryContents. I'm not sure if those always consume the whole list, so this avoids any leak. And the things that call those are things like git annex unused, which also look at every file committed to the git-annex branch, so would need more work to scale to insane numbers of files anyway.
* Fix memory leak when committing millions of changes to the git-annex branchGravatar Joey Hess2014-07-04
| | | | | | | | | Eg after git-annex add has run on 2 million files in one go. Slightly unhappy with the neeed to use a temp file here, but I cannot see any other alternative (see comments on the bug report). This commit was sponsored by Hamish Coleman.
* support commit.gpgsignGravatar Joey Hess2014-07-04
| | | | | | | | | | | | | | | | | | | | | Support users who have set commit.gpgsign, by disabling gpg signatures for git-annex branch commits and commits made by the assistant. The thinking here is that a user sets commit.gpgsign intending the commits that they manually initiate to be gpg signed. But not commits made in the background, whether by a deamon or implicitly to the git-annex branch. gpg signing those would be at best a waste of CPU and at worst would fail, or flood the user with gpg passphrase prompts, or put their signature on changes they did not directly do. See Debian bug #753720. Also makes all commits done by git-annex go through a few central control points, to make such changes easier in future. Also disables commit.gpgsign in the test suite. This commit was sponsored by Antoine Boegli.
* webapp: When adding a new local repository, fix bug that caused its group ↵Gravatar Joey Hess2014-05-29
| | | | | | | | | and preferred content to be set in the current repository, even when not combining. There was a tricky bit here, when it does combine, the edit form is shown, and so the info needs to be committed to the new repository, but then pulled into the current one. And caches need to be invalidated for it to be visible in the edit form.
* Fix encoding of data written to git-annex branch. Avoid truncating unicode ↵Gravatar Joey Hess2014-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | characters to 8 bits. Allow any encoding to be used, as with filenames (but utf8 is the sane choice). Affects metadata and repository descriptions, and preferred content expressions. The question of what's the right encoding for the git-annex branch is a vexing one. utf-8 would be a nice choice, but this leaves the possibility of bad data getting into a git-annex branch somehow, and this resulting in git-annex crashing with encoding errors, which is a failure mode I want to avoid. (Also, preferred content expressions can refer to filenames, and filenames can have any encoding, so limiting to utf-8 would not be ideal.) The union merge code already took care to not assume any encoding for a file. Except it assumes that any \n is a literal newline, and not part of some encoding of a character that happens to contain a newline. (At least utf-8 avoids using newline for anything except liternal newlines.) Adapted the git-annex branch code to use this same approach. Note that there is a potential interop problem with Windows, since FileSystemEncoding doesn't work there, and instead things are always decoded as utf-8. If someone uses non-utf8 encoding for data on the git-annex branch, this can lead to an encoding error on windows. However, this commit doesn't actually make that any worse, because the union merge code would similarly fail with an encoding error on windows in that situation. This commit was sponsored by Kyle Meyer.
* remove Read instance for RefGravatar Joey Hess2014-02-19
| | | | | | | | Removed instance, got it all to build using fromRef. (With a few things that really need to show something using a ref for debugging stubbed out.) Then added back Read instance, and made Logs.View use it for serialization. This changes the view log format.
* add git annex view commandGravatar Joey Hess2014-02-18
| | | | | | | | | | | | | | | | | | (And a vpop command, which is still a bit buggy.) Still need to do vadd and vrm, though this also adds their documentation. Currently not very happy with the view log data serialization. I had to lose the TDFA regexps temporarily, so I can have Read/Show instances of View. I expect the view log format will change in some incompatable way later, probably adding last known refs for the parent branch to View or something like that. Anyway, it basically works, although it's a bit slow looking up the metadata. The actual git branch construction is about as fast as it can be using the current git plumbing. This commit was sponsored by Peter Hogg.
* --in can now refer to files that were located in a repository at some past ↵Gravatar Joey Hess2014-02-06
| | | | date. For example, --in="here@{yesterday}"
* remove debug printGravatar Joey Hess2014-01-26
| | | | just saw it legitimately occur when 2 git-annex were running
* avoid needing a build-dep on hxt for Data.AssocListGravatar Joey Hess2014-01-14
|
* Fix a long-standing bug that could cause the wrong index file to be used ↵Gravatar Joey Hess2014-01-14
| | | | when committing to the git-annex branch, if GIT_INDEX_FILE is set in the environment. This typically resulted in git-annex branch log files being committed to the master branch and later showing up in the work tree. (These log files can be safely removed.)
* Avoid using git commit in direct mode, since in some situations it will read ↵Gravatar Joey Hess2013-12-01
| | | | | | | | | | | | the full contents of files in the tree. The assistant's commit code also always avoids git commit, for simplicity. Indirect mode sync still does a git commit -a to catch unstaged changes. Note that this means that direct mode sync no longer runs the pre-commit hook or any other hooks git commit might call. The git annex pre-commit hook action for direct mode is however explicitly run. (The assistant already ran git commit with hooks disabled, so no change there.)
* Ensure that core.sharedrepository is honored when creating the .git/annex ↵Gravatar Joey Hess2013-11-18
| | | | directory.
* Ensure execute bit is set on directories when core.sharedrepsitory is set.Gravatar Joey Hess2013-11-18
|
* typoGravatar Joey Hess2013-11-06
|