summaryrefslogtreecommitdiff
path: root/Git
Commit message (Collapse)AuthorAge
...
* webapp: Improve UI around remote that have no annex.uuid set, either because ↵Gravatar Joey Hess2013-11-07
| | | | | | | | setup of them is incomplete, or because the remote git repository is not a git-annex repository. Complicated by such repositories potentially being repos that should have an annex.uuid, but it failed to be gotten, perhaps due to the past ssh repo setup bugs. This is handled now by an Upgrade Repository button.
* add new status commandGravatar Joey Hess2013-11-07
| | | | | | | | | | | | | | | This works for both direct and indirect mode. It may need some performance tuning. Note that unlike git status, it only shows the status of the work tree, not the status of the index. So only one status letter, not two .. and since files that have been added and not yet committed do not differ between the work tree and the index, they are not shown. Might want to add display of the index vs the last commit eventually. This commit was sponsored by an unknown bitcoin contributor, whose contribution as been going up lately! ;)
* work around lack of receive.denyCurrentBranch in direct modeGravatar Joey Hess2013-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that direct mode sets core.bare=true, git's normal prohibition about pushing into the currently checked out branch doesn't work. A simple fix for this would be an update hook which blocks the pushes.. but git hooks must be executable, and git-annex needs to be usable on eg, FAT, which lacks x bits. Instead, enabling direct mode switches the branch (eg master) to a special purpose branch (eg annex/direct/master). This branch is not pushed when syncing; instead any changes that git annex sync commits get written to master, and it's pushed (along with synced/master) to the remote. Note that initialization has been changed to always call setDirect, even if it's just setDirect False for indirect mode. This is needed because if the user has just cloned a direct mode repo, that nothing has synced with before, it may have no master branch, and only a annex/direct/master. Resulting in that branch being checked out locally too. Calling setDirect False for indirect mode moves back out of this branch, to a new master branch, and ensures that a manual "git push" doesn't push changes directly to the annex/direct/master of the remote. (It's possible that the user makes a commit w/o using git-annex and pushes it, but nothing I can do about that really.) This commit was sponsored by Jonathan Harrington.
* factor out updateGravatar Joey Hess2013-11-05
|
* v5 for direct mode, with automatic upgradeGravatar Joey Hess2013-11-05
| | | | | This includes storing the current state of the HEAD ref, which git annex sync is going to need, but does not make sync use it.
* automatically set and unset core.bare when switching to/from direct modeGravatar Joey Hess2013-11-05
|
* refactored hook setupGravatar Joey Hess2013-11-05
|
* pass -c option on to all git commands runGravatar Joey Hess2013-11-05
| | | | | | | | The -c option now not only modifies the git configuration seen by git-annex, but it is passed along to every git command git-annex runs. This was easy to plumb through because gitCommandLine is already used to construct every git command line, to add --git-dir and --work-tree
* map: Work when there are gcrypt remotes.Gravatar Joey Hess2013-11-04
|
* assistant: Support repairing git remotes that are locally accessibleGravatar Joey Hess2013-10-27
| | | | | | | | (eg, on removable drives) gcrypt remotes are not yet handled. This commit was sponsored by Sören Brunk.
* wire git repair into webappGravatar Joey Hess2013-10-23
|
* minorGravatar Joey Hess2013-10-23
|
* repair command: add handling of git-annex branch and indexGravatar Joey Hess2013-10-23
|
* add repair commandGravatar Joey Hess2013-10-23
|
* add git fsck to cronner, and UI for repository repair (not yet wired up)Gravatar Joey Hess2013-10-22
|
* clean warningsGravatar Joey Hess2013-10-22
|
* make git fsck batch-capableGravatar Joey Hess2013-10-22
|
* index file recoveryGravatar Joey Hess2013-10-22
|
* add reflogGravatar Joey Hess2013-10-21
|
* corrupt branch resetting (but not yet reflog walking)Gravatar Joey Hess2013-10-21
|
* implemented removal of corrupt tracking branchesGravatar Joey Hess2013-10-21
| | | | | | Oh, git, you made this so hard. Not determining if a branch pointed to some corrupt object, that was easy, but dealing with corrupt branches using git plumbing is a PITA.
* avoid redundant fsck when no changes are madeGravatar Joey Hess2013-10-20
|
* git-recover-repository 1/2 doneGravatar Joey Hess2013-10-20
|
* remove workaround for bug in git 1.8.4r0Gravatar Joey Hess2013-10-20
|
* fix lsTreeFiles to use --full-treeGravatar Joey Hess2013-10-18
| | | | | This makes it show the full tree, not just the current directory, and enables --full-name, which yields TopFilePaths.
* fixGravatar Joey Hess2013-10-17
|
* fixGravatar Joey Hess2013-10-17
|
* fixGravatar Joey Hess2013-10-17
|
* missing importGravatar Joey Hess2013-10-17
|
* Windows: Deal with strange msysgit 1.8.4 behavior of not understanding DOS ↵Gravatar Joey Hess2013-10-17
| | | | formatted paths for --git-dir and --work-tree.
* try working around windows xargs problemGravatar Joey Hess2013-10-17
|
* use TopFilePath for DiffTree and LsTreeGravatar Joey Hess2013-10-17
|
* fix off-by-oneGravatar Joey Hess2013-10-16
|
* Deal with git check-attr -z output format change in git 1.8.5.Gravatar Joey Hess2013-10-15
| | | | | | | | | | I have not actually tested with 1.8.5, which is not yet relesaed, but git.git commit f7cd8c50b9ab83e084e8f52653ecc8d90665eef2 changes -z to also apply to output, without regards to back-compat. (But with pretty good reasons.) New code should work with both versions, by fingerprinting for NULs and newlines.
* fix windows buildGravatar Joey Hess2013-10-02
|
* Disable receive.denyNonFastForwards when setting up a gcrypt special remoteGravatar Joey Hess2013-10-01
| | | | | | gcrypt needs to be able to fast-forward the master branch. If a git repository is set up with git init --shared --bare, it gets that set, and pushing to it will then fail, even when it's up-to-date.
* remove *>=> and >=*> ; use <$$> insteadGravatar Joey Hess2013-09-27
| | | | | | | | I forgot I had <$$> hidden away in Utility.Applicative. It allows doing the same kind of currying as does >=*> and I found using it made the code more readable for me. (*>=> was not used)
* blind enabling gcrypt repos on rsync.netGravatar Joey Hess2013-09-27
| | | | | | | | | | | This pulls off quite a nice trick: When given a path on rsync.net, it determines if it is an encrypted git repository that the user has the key to decrypt, and merges with it. This is works even when the local repository had no idea that the gcrypt remote exists! (As previously done with local drives.) This commit sponsored by Pedro Côrte-Real
* enabling rsync.net gcrypt reposGravatar Joey Hess2013-09-26
| | | | | Still need to detect when the user is trying to create a repo that already exists, and jump to the enabling code.
* prep for enabling remotre gcrypt repos in webappGravatar Joey Hess2013-09-26
|
* add back lost check that git-annex-shell supports gcryptGravatar Joey Hess2013-09-24
|
* Use cryptohash rather than SHA for hashing.Gravatar Joey Hess2013-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a massive win on OSX, which doesn't have a sha256sum normally. Only use external hash commands when the file is > 1 mb, since cryptohash is quite close to them in speed. SHA is still used to calculate HMACs. I don't quite understand cryptohash's API for those. Used the following benchmark to arrive at the 1 mb number. 1 mb file: benchmarking sha256/internal mean: 13.86696 ms, lb 13.83010 ms, ub 13.93453 ms, ci 0.950 std dev: 249.3235 us, lb 162.0448 us, ub 458.1744 us, ci 0.950 found 5 outliers among 100 samples (5.0%) 4 (4.0%) high mild 1 (1.0%) high severe variance introduced by outliers: 10.415% variance is moderately inflated by outliers benchmarking sha256/external mean: 14.20670 ms, lb 14.17237 ms, ub 14.27004 ms, ci 0.950 std dev: 230.5448 us, lb 150.7310 us, ub 427.6068 us, ci 0.950 found 3 outliers among 100 samples (3.0%) 2 (2.0%) high mild 1 (1.0%) high severe 2 mb file: benchmarking sha256/internal mean: 26.44270 ms, lb 26.23701 ms, ub 26.63414 ms, ci 0.950 std dev: 1.012303 ms, lb 925.8921 us, ub 1.122267 ms, ci 0.950 variance introduced by outliers: 35.540% variance is moderately inflated by outliers benchmarking sha256/external mean: 26.84521 ms, lb 26.77644 ms, ub 26.91433 ms, ci 0.950 std dev: 347.7867 us, lb 210.6283 us, ub 571.3351 us, ci 0.950 found 6 outliers among 100 samples (6.0%) import Crypto.Hash import Data.ByteString.Lazy as L import Criterion.Main import Common testfile :: FilePath testfile = "/run/shm/data" -- on ram disk main = defaultMain [ bgroup "sha256" [ bench "internal" $ whnfIO internal , bench "external" $ whnfIO external ] ] sha256 :: L.ByteString -> Digest SHA256 sha256 = hashlazy internal :: IO String internal = show . sha256 <$> L.readFile testfile external :: IO String external = do s <- readProcess "sha256sum" [testfile] return $ fst $ separate (== ' ') s
* more completely solve catKey memory leakGravatar Joey Hess2013-09-19
| | | | | | | | | | | | | | | | | | | Done using a mode witness, which ensures it's fixed everywhere. Fixing catFileKey was a bear, because git cat-file does not provide a nice way to query for the mode of a file and there is no other efficient way to do it. Oh, for libgit2.. Note that I am looking at tree objects from HEAD, rather than the index. Because I cat-file cannot show a tree object for the index. So this fix is technically incomplete. The only cases where it matters are: 1. A new large file has been directly staged in git, but not committed. 2. A file that was committed to HEAD as a symlink has been staged directly in the index. This could be fixed a lot better using libgit2.
* interface to parse git tree objectsGravatar Joey Hess2013-09-19
|
* sync, pre-commit, indirect: Avoid unnecessarily catting non-symlink files ↵Gravatar Joey Hess2013-09-19
| | | | from git, which can be so large it runs out of memory.
* better probing for gcrypt repositories using new --check optionGravatar Joey Hess2013-09-19
| | | | | | | | Now can tell if a repo uses gcrypt or not, and whether it's decryptable with the current gpg keys. This closes the hole that undecryptable gcrypt repos could have before been combined into the repo in encrypted mode.
* webapp: support adding existing gcrypt special remotes from removable drivesGravatar Joey Hess2013-09-18
| | | | | | | | | | | | | | | | | | | | | | | When adding a removable drive, it's now detected if the drive contains a gcrypt special remote, and that's all handled nicely. This includes fetching the git-annex branch from the gcrypt repo in order to find out how to set up the special remote. Note that gcrypt repos that are not git-annex special remotes are not supported. It will attempt to detect such a gcrypt repo and refuse to use it. (But this is hard to do any may fail; see https://github.com/blake2-ppc/git-remote-gcrypt/issues/6) The problem with supporting regular gcrypt repos is that we don't know what the gcrypt.participants setting is intended to be for the repo. So even if we can decrypt it, if we push changes to it they might not be visible to other participants. Anyway, encrypted sneakernet (or mailnet) is now fully possible with the git-annex assistant! Assuming that the gpg key distribution is handled somehow, which the assistant doesn't yet help with. This commit was sponsored by Navishkar Rao.
* gcrypt: Ensure that signing key is set to one of the participants keys.Gravatar Joey Hess2013-09-17
| | | | | | Otherwise gcrypt will fail to pull, since it requires this to be the case. This needs a patched gcrypt, which is in my forked version.
* sync: Fix bug that caused direct mode mappings to not be updated when ↵Gravatar Joey Hess2013-09-13
| | | | merging files into the tree on Windows.
* partially complete gcrypt remote (local send done; rest not)Gravatar Joey Hess2013-09-07
| | | | | | | | | | | | | | | | | | | | | | | | This is a git-remote-gcrypt encrypted special remote. Only sending files in to the remote works, and only for local repositories. Most of the work so far has involved making initremote work. A particular problem is that remote setup in this case needs to generate its own uuid, derivied from the gcrypt-id. That required some larger changes in the code to support. For ssh remotes, this will probably just reuse Remote.Rsync's code, so should be easy enough. And for downloading from a web remote, I will need to factor out the part of Remote.Git that does that. One particular thing that will need work is supporting hot-swapping a local gcrypt remote. I think it needs to store the gcrypt-id in the git config of the local remote, so that it can check it every time, and compare with the cached annex-uuid for the remote. If there is a mismatch, it can change both the cached annex-uuid and the gcrypt-id. That should work, and I laid some groundwork for it by already reading the remote's config when it's local. (Also needed for other reasons.) This commit was sponsored by Daniel Callahan.