Commit graph

32359 commits

Author SHA1 Message Date
Joey Hess
ec91b6e4b2
plan to fix race 2018-08-17 11:18:53 -04:00
Joey Hess
35e1697377
expand 2018-08-17 10:48:18 -04:00
Joey Hess
2e153de34a
close 2018-08-16 16:41:08 -04:00
Joey Hess
9eb708a11c
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-16 16:39:08 -04:00
Joey Hess
b187bc9cc6
devblog 2018-08-16 16:38:01 -04:00
Joey Hess
5799d325f0
update todo categories 2018-08-16 16:36:47 -04:00
Joey Hess
0f25d48639
pass absolute path to update-index
Test suite found a case where this is necessary.

And the man page says this, although current behavior is not as
documented..

           Note that files beginning with .  are discarded.
           This includes ./file and dir/./file. If you don’t want
           this, then use cleaner names.

This may hit path length limits on Windows. shrug

This commit was supported by the NSF-funded DataLad project.
2018-08-16 16:00:29 -04:00
Joey Hess
82a239675f
narrow the race where a file gets modified before update-index
Check just before running update-index if the worktree file's content is
still the same, don't update it when it's been modified. This narrows
the race window a lot, from possibly minutes or hours, to seconds or
less.

(Use replaceFile so that the worktree update happens atomically,
allowing the InodeCache of the new worktree file to itself be gathered
w/o any other race.)

This doesn't eliminate the race; it can still occur in the window before
update-index runs. When annex.queue is large, a lot of files will be
statted by the checks, and so the window may still be large enough to be a
problem.

When only a few files are being processed, the window is as small as it
is in the race where a modification gets overwritten by git-annex when
it updates the worktree. Or maybe as small as whatever race git
checkout/pull/merge may have when the worktree gets modified during it.
Still, I've kept a todo about this race.

This commit was supported by the NSF-funded DataLad project.
2018-08-16 15:56:43 -04:00
Joey Hess
6a445dc086
support conditionally excluding queued files
Switched code to use a for loop to avoid a filterM that would have
doubled the memory used.

This commit was supported by the NSF-funded DataLad project.
2018-08-16 14:38:37 -04:00
Joey Hess
82cfcfc838
better index file refresh method
Use git update-index --refresh, since it's a little bit more
efficient and the user can be told to run it if a locked index prevents
git-annex from running it.

This also fixes the problem where an annexed file was deleted in the index
and a get of another file that uses the same key caused the index update to
add back the deleted file. update-index will not add back the deleted file.

Documented in tips/unlocked_files.mdwn the gotcha that the index update
may conflict with other operations. I can't see any way to possibly avoid
that conflict.

One new todo about a race that causes a modification to be accidentially
staged.

Note that the assistant only flushes the git command queue when it
commits a modification. I have not tested the assistant with v6 unlocked
files, but assume most users of the assistant won't care if the index
shows a file as modified for a while.

This commit was supported by the NSF-funded DataLad project.
2018-08-16 14:16:24 -04:00
duncan_bayne
7e9d6c4ef1 Added a comment: RTFM 2018-08-16 04:25:27 +00:00
Joey Hess
5e87389f40
refactor 2018-08-15 13:46:28 -04:00
Joey Hess
4c5a9965c1
remove invalid todo item
I tested it, and it's ok. I think I was adding it under a filename that
produced a different key.
2018-08-15 13:34:48 -04:00
Joey Hess
24ed323208
response 2018-08-15 11:43:50 -04:00
https://launchpad.net/~liori
a6927da198 2018-08-15 14:07:31 +00:00
Joey Hess
e891e78032
devblog 2018-08-14 16:24:13 -04:00
Joey Hess
48e9e12961
finally fixed v6 get/drop git status
After updating the worktree for an add/drop, update git's index, so git
status will not show the files as modified.

What actually happens is that the index update removes the inode
information from the index. The next git status (or similar) run
then has to do some work. It runs the clean filter.

So, this depends on the clean filter being reasonably fast and on git
not leaking memory when running it. Both problems were fixed in
a96972015d, but only for git 2.5. Anyone
using an older git will see very expensive git status after an add/drop.

This uses the same git update-index queue as other parts of git-annex, so
the actual index update is fairly efficient. Of course, updating the index
does still have some overhead. The annex.queuesize config will control how
often the index gets updated when working on a lot of files.

This is an imperfect workaround... Added several todos about new
problems this workaround causes. Still, this seems a lot better than the
old behavior.

This commit was supported by the NSF-funded DataLad project.
2018-08-14 16:23:58 -04:00
Joey Hess
06fd4657db
response 2018-08-14 13:41:02 -04:00
Joey Hess
b3178547f1
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-14 13:39:51 -04:00
Joey Hess
42c5d7c64f
moving to filterdriver branch
Not used in master, so remove until/unless filterdriver branch is
merged.
2018-08-14 13:37:17 -04:00
jarno
3b155dd32d Added a comment 2018-08-14 16:03:39 +00:00
Joey Hess
63cfc1a615
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-14 11:08:44 -04:00
Joey Hess
66a4483dfa
response 2018-08-14 11:02:55 -04:00
hoabg102@4a7a5918bc078f792113da142cf8c6d825a1825c
f0779bc9f1 2018-08-14 10:22:06 +00:00
Joey Hess
d8a8f2df70
full plan 2018-08-13 17:51:02 -04:00
Joey Hess
86df0d6e1b
even better idea 2018-08-13 17:43:16 -04:00
Joey Hess
df5823cea0
update 2018-08-13 17:29:33 -04:00
Joey Hess
bc7d431a6a
status 2018-08-13 16:37:23 -04:00
Joey Hess
7a1a3ef11f
add missing flush-pkt after version 2018-08-13 16:22:39 -04:00
Joey Hess
d963d40815
use String not Text
On second thought, git passes filepaths, which may not be valid utf8, so
can't use Text here.

String will be a little bit slower, but not enough to worry about.
2018-08-13 16:22:31 -04:00
Joey Hess
c9866c7612
devblog 2018-08-13 16:19:15 -04:00
Joey Hess
f1dfed4d5a
response 2018-08-13 12:44:34 -04:00
Joey Hess
421564e02b
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-13 12:35:06 -04:00
webanck
cd62ab20a3 Added a comment: Similar issue again 2018-08-13 14:18:17 +00:00
webanck
55d7660576 removed 2018-08-13 14:16:09 +00:00
webanck
3829f2de16 Added a comment: Similar issue again 2018-08-13 14:11:48 +00:00
Mara
a2bb955467 Added a comment: Also with embedcreds=yes 2018-08-13 12:28:10 +00:00
Mara
3e8eadade4 2018-08-13 10:46:08 +00:00
duncan_bayne
6ce59ccfe5 2018-08-12 06:19:36 +00:00
duncan_bayne
b5910dac68 2018-08-12 06:18:36 +00:00
duncan_bayne
874dd3febf 2018-08-12 06:17:56 +00:00
Joey Hess
915cae8c54
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-11 11:37:16 -04:00
jarno
159154d2b2 2018-08-11 12:26:00 +00:00
Joey Hess
4649625f04
small improvement to packet flushing 2018-08-10 18:08:54 -04:00
Joey Hess
65de44aa13
improve layout 2018-08-10 16:26:31 -04:00
Joey Hess
c6884989dc
capability reply must be a subset of what git sent so filter it 2018-08-10 16:24:06 -04:00
Joey Hess
d0dfee1519
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-10 16:17:29 -04:00
Joey Hess
29a3174f11
devblog 2018-08-10 16:17:05 -04:00
Joey Hess
fd42df78a0
git long-running process handshake implementation
This commit was supported by the NSF-funded DataLad project.
2018-08-10 16:03:04 -04:00
yarikoptic
b47fef55f0 Added a comment: my 1c 2018-08-10 19:17:17 +00:00