Commit graph

2101 commits

Author SHA1 Message Date
Joey Hess
78a325b093 add a small cache of the most recently accessed item from the git-annex branch
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.
2011-06-22 14:18:49 -04:00
Joey Hess
1cca8b4edb rework core merge code
More likely to be 100% correct now, I think.
2011-06-22 13:59:42 -04:00
Joey Hess
818ae0c6da docs for v3 2011-06-21 20:21:33 -04:00
Joey Hess
7a693394f4 allow for union merges between a tree and the content in the index
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.
2011-06-21 20:12:53 -04:00
Joey Hess
5e0adb2637 fixes
make commit commit to the right branch

when getting content from the branch, update first
2011-06-21 19:11:55 -04:00
Joey Hess
5d20ac5800 export the commit function and generalize 2011-06-21 19:09:20 -04:00
Joey Hess
40ec8a9726 Branch module complete
Refactored some code that it needs into GitRepo.
2011-06-21 17:52:39 -04:00
Joey Hess
7e7428f173 refactor 2011-06-21 16:08:09 -04:00
Joey Hess
a5e6802b5b typos in comments 2011-06-21 14:44:56 -04:00
Joey Hess
9a1f0fcee2 start v3 2011-06-21 14:34:08 -04:00
Joey Hess
c03af0ed0c code to update a git-annex branch
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.
2011-06-21 14:33:59 -04:00
Joey Hess
e735d459b5 moved to library 2011-06-21 14:09:06 -04:00
Joey Hess
9f9e17aa0f unlock: Made atomic. 2011-06-20 22:38:18 -04:00
Joey Hess
53706ad9bf move bug report 2011-06-20 22:29:46 -04:00
Joey Hess
a9a4649148 typo 2011-06-20 22:21:02 -04:00
Joey Hess
8b749d4bfd reorder git-union-merge params 2011-06-20 21:42:17 -04:00
Joey Hess
01e8a0a9e5 allow git-union-merge to write to any ref
Not just refs/heads/* branches.
2011-06-20 21:38:52 -04:00
Joey Hess
d519bc7137 sped up git-union-merge
Avoided the slow git add, instead inject content directly into git and
populate the index all in one pass. Now this runs on my large real-world
repo in 10 seconds, which is acceptable.

Also lots of code cleanups.
2011-06-20 21:37:18 -04:00
Joey Hess
c835166a7c add git-union-merge
This is a new git subcommand, that does a generic union merge operation
between two refs, storing the result in a branch. It operates efficiently
without touching the working tree. It does need to write out a temporary
index file, and may need to write out some other temp files as well.

This could be useful for anything that stores data in a branch,
and needs to merge changes into that branch without actually checking the
branch out. Since conflict handling can't be done without a working copy,
the merge type is always a union merge, which is fine for data stored in
log format (as git-annex does), or in non-conflicting files
(as pristine-tar does).

This probably belongs in git proper, but it will live in git-annex for now.

---

Plan is to move .git-annex/ to a git-annex branch, and use git-union-merge
to handle merging changes when pulling from remotes.

Some preliminary benchmarking using real .git-annex/ data indicates
that it's quite fast, except for the "git add" call, which is as slow
as "git add" tends to be with a big index.
2011-06-20 21:37:18 -04:00
Joey Hess
91e50782ce thought 2011-06-20 21:37:18 -04:00
Joey Hess
2fcb8e3b11 update 2011-06-20 21:37:18 -04:00
Joey Hess
e593a81041 update 2011-06-20 21:37:18 -04:00
Joey Hess
bc731ba6e0 pointless golfing 2011-06-20 21:37:18 -04:00
https://www.google.com/accounts/o8/id?id=AItOawmL8pteP2jbYJUn1M3CbeLDvz2SWAA1wtg
dd4de9deb4 2011-06-20 21:03:00 +00:00
http://joey.kitenet.net/
601b07196e Comment moderation 2011-06-20 17:43:05 +00:00
Joey Hess
64d6520704 git is slow 2011-06-14 19:05:45 -04:00
http://christian.amsuess.com/chrysn
f4609a5d28 minor bug report 2011-06-14 17:01:13 +00:00
Joey Hess
f547277b75 Allow --trust etc to specify a repository by name, for temporarily trusting repositories that are not configured remotes. 2011-06-13 22:19:44 -04:00
Joey Hess
66f5b390fe fix test suite 2011-06-13 21:51:52 -04:00
Joey Hess
d0482d4154 bigfix: stat parent dirs 2011-06-13 21:46:28 -04:00
Joey Hess
c1acad8248 Merge branch 'master' of ssh://git-annex.branchable.com 2011-06-13 20:35:15 -04:00
Joey Hess
30d7cce7ec rsync is now used when copying files from repos on other filesystems
cp is still used when copying file from repos on the same filesystem, since
--reflink=auto can make it significantly faster on filesystems such as
btrfs.

Directory special remotes still use cp, not rsync. It's not clear what
tmp file should be used when rsyncing to such a remote.
2011-06-13 20:33:52 -04:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
056a784f3d 2011-06-13 18:09:58 +00:00
Joey Hess
eb5fbc4cb9 response 2011-06-13 13:03:23 -04:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
eb8ecd857d Added a comment 2011-06-13 16:58:53 +00:00
https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U
a85e9b1276 2011-06-13 16:57:19 +00:00
https://lithitux.org/openidserver/users/pavel
57ff2e297a 2011-06-13 10:13:47 +00:00
http://joey.kitenet.net/
76df8d5f86 Added a comment: short answer: no 2011-06-10 19:55:38 +00:00
https://www.google.com/accounts/o8/id?id=AItOawmByD9tmR48HuYgS4qWEGDDaoVTTC3m4kc
88bdf17e1a Added a comment: Any chance to get git-annex going on windows? 2011-06-10 18:08:37 +00:00
http://joey.kitenet.net/
8da84d8860 Added a comment 2011-06-10 16:46:03 +00:00
http://joey.kitenet.net/
68ed12eab4 Added a comment 2011-06-10 16:41:43 +00:00
http://joey.kitenet.net/
ef6209db43 Comment moderation 2011-06-10 16:39:45 +00:00
Joey Hess
0b85ffd6e7 S3 stub bug got fixed 2011-06-10 12:11:55 -04:00
Joey Hess
19428ea2f4 fix building with S3 stub 2011-06-10 12:11:34 -04:00
Joey Hess
a473560515 add news item for git-annex 0.20110610 2011-06-10 11:58:36 -04:00
Joey Hess
38e0100a69 releasing version 0.20110610 2011-06-10 11:58:21 -04:00
Joey Hess
9a272815dd Bugfix: Fix fsck to not think all SHAnE keys are bad. 2011-06-10 11:43:28 -04:00
Joey Hess
90dd245522 get --from is the same as copy --from
get not honoring --from has surprised me a few times, so least surprise
suggests it should just behave like copy --from. This leaves the difference
between get and copy being that copy always requires the remote to copy
from, while get will decide whether to get a file from a key/value store or
a remote.
2011-06-09 18:54:49 -04:00
Joey Hess
2136534be1 Merge branch 'master' of ssh://git-annex.branchable.com 2011-06-09 14:35:03 -04:00
http://joey.kitenet.net/
c9d8b830c6 Added a comment 2011-06-08 00:40:54 +00:00