Commit graph

32422 commits

Author SHA1 Message Date
Joey Hess
44658d80ef
clarify comment 2018-08-29 10:55:52 -04:00
Joey Hess
0a896bdf39
fix syntax 2018-08-29 09:20:25 -04:00
Joey Hess
2b0cc71fbf
don't configure smudge filter in bare repo
Pointless to do it there.

Also, the git status call would fail in such a repo.
2018-08-29 09:16:50 -04:00
Joey Hess
c565340adc
stop using external hash programs, since cryptonite is faster
In 2013, I wrote "Cryptohash benchmarks 90 to 101% faster than external
hashers". Re-benchmarking today, I found cryptonite's sha256 consistently
outperformed coreutils by 10% for large files. Tested 10 mb, 100 mb, 1 gb
files with both sha256 and sha512. And for smaller files, the external
process startup time swamps the hash time.

Perhaps cryptonite has improved. Or it could just do better on my
current CPU Intel(R) Pentium(R) CPU 4410Y @ 1.50GHz). Anyway, even if cryptonite
is slower in some situations, seems likely it would only be marginally slower;
it's got the same class of highly optimised C code under the hood as coreutils.
The main difference between the two sha256 implementations seems to be
how much of the inner loop they unroll..

This commit was sponsored by Henrik Riomar on Patreon.
2018-08-28 18:10:58 -04:00
Joey Hess
6001b3cf45
fix build warning 2018-08-28 13:17:06 -04:00
Joey Hess
759a87ad70
fix git command queue to be concurrency safe
Probably not noticed until now because the queue is large enough that two
threads each filling theirs at the same time and flushing is unlikely to
happen.

Also made explicit that each worker thread gets its own queue.
I think that was the case before, but if something was put in the queue
before worker threads were forked off, they could have each inherited the
same queue.

Could have gone with a single shared queue, but per-worker queues is more
efficient, because a worker can add lots of stuff to its own queue without
any locking.

This commit was sponsored by Ole-Morten Duesund on Patreon.
2018-08-28 13:16:33 -04:00
Joey Hess
3a71f3a4a9
reproduced 2018-08-28 12:35:15 -04:00
Joey Hess
ebdb17cda7
followup 2018-08-28 12:21:23 -04:00
Joey Hess
2b4a9a7cd8
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-28 12:14:41 -04:00
Joey Hess
b1280eb252
new todo (requested by yoh) 2018-08-28 12:14:06 -04:00
petr.marketlab@4024e478aebbe860ab1cbf03aca8adb30127c56e
2acca8a3ae 2018-08-28 15:26:07 +00:00
petr.marketlab@4024e478aebbe860ab1cbf03aca8adb30127c56e
1885cca783 2018-08-28 15:18:27 +00:00
Joey Hess
401a79675b
run git status before enabling clean filter
Avoids annex.largefiles inconsitency and also avoids a lot of
unneccessary calls to the clean filter when a large repo's clone
is being initialized.

This commit was supported by the NSF-funded DataLad project.
2018-08-28 10:36:22 -04:00
Joey Hess
82b28a8487
devblog 2018-08-27 15:10:16 -04:00
Joey Hess
6adc0d2b3f
bug triage 2018-08-27 15:10:05 -04:00
Joey Hess
10138056dc
v6: avoid accidental conversion when annex.largefiles is not configured
v6: When annex.largefiles is not configured for a file, running git add or
git commit, or otherwise using git to stage a file will add it to the annex
if the file was in the annex before, and to git otherwise. This is to avoid
accidental conversion.

Note that git-annex add's behavior has not changed, for reasons explained
in the added comment.

Performance: No added overhead when annex.largefiles is configured.
When not configured, there is an added call to catObjectMetaData,
which involves a round trip through git cat-file --batch.
However, the earlier catKeyFile primes the cache for it.

This commit was supported by the NSF-funded DataLad project.
2018-08-27 14:51:10 -04:00
Joey Hess
b3dfcd18fe
followup 2018-08-27 13:36:11 -04:00
Joey Hess
8478544b58
analysis, plan
This commit was supported by the NSF-funded DataLad project.
2018-08-27 13:14:34 -04:00
Joey Hess
d7f386a81d
reproduced with current 2018-08-27 12:20:58 -04:00
Joey Hess
d5980b7139
close, this was fixed last week 2018-08-27 12:15:43 -04:00
Joey Hess
4876f412fc
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-27 10:42:12 -04:00
Joey Hess
2c9f21e987
todo 2018-08-26 20:59:20 -04:00
duncan_bayne
5a90234f47 2018-08-26 02:37:25 +00:00
anarcat
af727108b0 update status to mention tor 2018-08-24 21:35:11 +00:00
anarcat
bfab1da5a7 mention that dat thing 2018-08-24 21:30:20 +00:00
hobbes@b2cacef69071743c3a831e60511062f7e014e52f
d8cd7c1ac4 Added a comment: Building with OpenBSD 2018-08-23 19:30:09 +00:00
Joey Hess
681ed8ea58
devblog 2018-08-22 16:10:27 -04:00
Joey Hess
98fd7ec6c9
recover from race between git mv+commit and git-annex get
Last of the known v6 races.

This also makes git add of a pointer file populate it when its content
is present in the annex. Which makes sense to do, I think.

This commit was supported by the NSF-funded DataLad project.
2018-08-22 16:01:50 -04:00
Joey Hess
50fa17aee6
v6: recover from race between git mv and git-annex get/drop
Update pointer file next time reconcileStaged is run to recover from the
race.

Note that restagePointerFile causes git to run the clean filter,
and that will run reconcileStaged. So, normally by the time the git
annex get/drop command finishes, the race has already been dealt with.
It may be that, in some case, that won't happen and the race will be
dealt with at a later point. git-annex could run reconcileStaged at
shutdown if that becomes a problem.

This does not handle the situation where the git mv is committed before
git-annex gets a chance to run again. git commit does run the clean
filter, and that happens to re-inject the content if it was supposed to
be dropped but is still populated. But, the case where the file was
supposed to be gotten but is not populated is not handled yet.

This commit was supported by the NSF-funded DataLad project.
2018-08-22 15:56:43 -04:00
Joey Hess
9ff1c62a4d
fix race
If a pointer file is being populated and something modifies it at the
same time, there was a race there the modified file's InodeCache
could get added into the keys database.

Note that replaceFile normally renames the temp file into place, so the
inode cache caculated for the temp file will still be good. If it has to
fall back to a copy, the worktree file won't be put in the inode cache.
This has the same result as if the worktree file gets touched, and will
be handled the same way. Eg, when dropping, isUnmodified will do an
expensive comparison and notice that the worktree file does have the
same content, and so drop it.

This commit was supported by the NSF-funded DataLad project.
2018-08-22 15:22:52 -04:00
Joey Hess
e094cf3377
split out modules from Annex.Content 2018-08-22 14:45:53 -04:00
Joey Hess
e9b2674281
plan 2018-08-22 13:58:32 -04:00
Joey Hess
38a934cf07
correction 2018-08-22 13:34:15 -04:00
Joey Hess
18ecf41917
avoid running reconcileStaged when the index has not changed
This commit was supported by the NSF-funded DataLad project.
2018-08-22 13:04:12 -04:00
rajagopal.abhejit@a18fbb434d26431ed70e7fad7bd6a696df2b7d85
65bd018f94 removed 2018-08-22 01:13:45 +00:00
rajagopal.abhejit@a18fbb434d26431ed70e7fad7bd6a696df2b7d85
529b84c5ca removed 2018-08-22 01:11:08 +00:00
rajagopal.abhejit@a18fbb434d26431ed70e7fad7bd6a696df2b7d85
7d0b838153 Added a comment 2018-08-22 01:10:54 +00:00
rajagopal.abhejit@a18fbb434d26431ed70e7fad7bd6a696df2b7d85
0b8759771a Added a comment 2018-08-22 01:10:40 +00:00
andrew@d9c20810619d89ecb4d8ebe187df122112b82fd9
fb5b2f1b7f Added a comment: Not connect to remote as part of initremote? 2018-08-21 23:34:55 +00:00
Joey Hess
5f31aba047
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-21 17:08:09 -04:00
Joey Hess
cff8eb430d
devblog 2018-08-21 17:07:46 -04:00
Joey Hess
5e56d9b620
v6: Update associated files database when git has staged changes to pointer files
This commit was supported by the NSF-funded DataLad project.
2018-08-21 17:02:20 -04:00
yarikoptic
78ecd6b17a Added a comment 2018-08-21 16:23:05 +00:00
yarikoptic
dae76d8ef3 fixup the trailer 2018-08-21 16:02:25 +00:00
Joey Hess
056b081280
followup 2018-08-21 11:56:51 -04:00
yarikoptic
e009c0efed original filing about web remote listing 2018-08-21 15:09:10 +00:00
Joey Hess
7ee3b02d49
replace stack trace with an explanation 2018-08-20 21:26:07 -04:00
Joey Hess
b8cd5fde17
idea 2018-08-20 16:13:46 -04:00
Joey Hess
c7331eebbf
Merge branch 'master' of ssh://git-annex.branchable.com 2018-08-20 12:21:11 -04:00
Joey Hess
fa44bca8b3
linux standalone: When LOCPATH is already set, use it instead of the bundled locales.
It can be set to an empty string to use the system locales too. Of course
whether that will work depends on the amount of divergence.

This commit was supported by the NSF-funded DataLad project.
2018-08-20 12:20:54 -04:00