Commit graph

40644 commits

Author SHA1 Message Date
alex@f04d0d3c452a2a99b27ccc93c1543bee4a1bf5be
3a86a15e47 Added a comment: Resuming an interrupted download 2021-10-01 23:18:33 +00:00
Joey Hess
9012fa0187
reinject: Fix crash when reinjecting a file from outside the repository
Commit 4bf7940d6b introduced this
problem, but was otherwise doing a good thing. Problem being
that fileRef "/foo" used to return ":./foo", which was actually wrong,
but as long as there was no foo in the local repository, catKey
could operate on it without crashing. After that fix though, fileRef
would return eg "../../foo", resulting in fileRef returning
":./../../foo", which will make git cat-file crash since that's
not a valid path in the repo.

Fix is simply to make fileRef detect paths outside the repo and return
Nothing. Then catKey can be skipped. This needed several bugfixes to
dirContains as well, in previous commits.

In Command.Smudge, this led to needing to check for Nothing. That case
should actually never happen, because the fileoutsiderepo check will
detect it earlier.

Sponsored-by: Brock Spratlen on Patreon
2021-10-01 14:06:34 -04:00
Joey Hess
b2efbd1cd3
fix bug in dirContains
dirContains "." ".." was incorrectly true
because normalize ("." </> "..") = ".."

Sponsored-by: Jochen Bartl on Patreon
2021-10-01 13:53:21 -04:00
Joey Hess
e8959617b6
fix bug in dirContains
dirContains ".." "../.." was incorrectly True.

This does not seem to be an exploitable security hole, at least
as dirContains is used in git-annex.

Sponsored-by: Jochen Bartl on Patreon
2021-10-01 13:15:52 -04:00
Joey Hess
596f0774fc
Merge branch 'master' of ssh://git-annex.branchable.com 2021-10-01 12:35:29 -04:00
Joey Hess
b9a1cc512d
avoid uncessary call to inAnnex
sync --content: Avoid a redundant checksum of a file that was
incrementally verified, when used on NTFS and perhaps other filesystems.

When sync has just gotten the content, it does not need to check inAnnex a
second time. On NTFS, for some reason the write of the inode cache after
it gets the content is not immediately able to be read, and with an
empty/non-matching inode cache due to that stale data, inAnnex falls back
to hashing the whole object to determine if it's present.

Sponsored-by: Brock Spratlen on Patreon
2021-10-01 12:02:35 -04:00
Joey Hess
17a31f8e1b
analysis 2021-10-01 11:49:12 -04:00
spwhitton
6fbca0bb5b add sign off 2021-09-30 21:19:39 +00:00
spwhitton
c6e1a6a3a1 post bug 2021-09-30 21:15:04 +00:00
Joey Hess
42c6bc6c3e
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-30 15:20:59 -04:00
Joey Hess
620685c73c
started analysis 2021-09-30 15:20:44 -04:00
jkniiv
a57c4f4482 Added a comment: Email resent from my personal domain jibun.eu 2021-09-30 18:22:44 +00:00
Joey Hess
6de57642f4
note about coreutils 9.0 supporting CoW by default 2021-09-30 14:12:58 -04:00
Joey Hess
8f3f25337a
comment 2021-09-30 12:52:02 -04:00
jkniiv
e01676a25c Added a comment 2021-09-29 04:38:08 +00:00
username
e848679d37 Added a comment 2021-09-28 22:56:17 +00:00
Joey Hess
07e160e589
comment 2021-09-28 17:58:10 -04:00
Joey Hess
2d154bfa54
comment 2021-09-28 16:33:21 -04:00
adina.wagner@2a4cac6443aada2bd2a329b8a33f4a7b87cc8eff
3ee5df48a5 Added a comment 2021-09-28 19:19:20 +00:00
Joey Hess
5802edb16c
comment 2021-09-28 14:14:37 -04:00
Joey Hess
6c7c568a27
response 2021-09-28 14:09:56 -04:00
Joey Hess
d322de3cc7
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-28 14:00:44 -04:00
Joey Hess
824b147286
followup 2021-09-28 14:00:10 -04:00
adina.wagner@2a4cac6443aada2bd2a329b8a33f4a7b87cc8eff
3194b6ed35 Added a comment 2021-09-28 12:53:14 +00:00
Joey Hess
b9aa2ce8d1
resume properly when copying a file to/from a local git remote is interrupted (take 2)
This method avoids breaking test_readonly. Just check if the dest file
exists, and avoid CoW probing when it does, so when CoW probing fails,
it can resume where the previous non-CoW copy left off.

If CoW has been probed already to work, delete the dest file
since a CoW copy will presumably work. It seems like it would be almost
as good to just skip CoW copying in this case too, but consider that the
dest file might have started to be copied from some other remote, not
using CoW, but CoW has been probed to work to copy from the current
place.

Sponsored-by: Dartmouth College's Datalad project
2021-09-27 16:03:01 -04:00
Joey Hess
7ccf642863
revert change that broke test_readonly
commit 63d508e885 broke test_readonly.
When a local git remote is readonly, tryCopyCoW run to copy a file
from it failed at withOtherTmp.

Sponsored-by: Dartmouth College's Datalad project
2021-09-27 16:02:41 -04:00
Joey Hess
a92427c0d3
comment 2021-09-27 14:14:52 -04:00
Joey Hess
69c1c02339
comment 2021-09-27 13:59:54 -04:00
Joey Hess
9566b4800a
comment 2021-09-27 12:54:43 -04:00
Joey Hess
0a951ac758
improve function name
onAddUnlocked suggested that it had to add the file locked, but it
doesn't, it only queues the add of the file, and it's up to the
committer what to do -- which is currently indeed to always add the file
locked.
2021-09-27 12:52:30 -04:00
Joey Hess
5bc83b52d8
comment 2021-09-27 12:35:15 -04:00
Joey Hess
0e2e7b143f
comment 2021-09-27 12:18:30 -04:00
Joey Hess
03963f8099
response 2021-09-27 12:14:25 -04:00
Joey Hess
a2222b5259
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-25 11:17:45 -04:00
jkniiv
d4627d91a1 Added a comment 2021-09-25 06:05:40 +00:00
jkniiv
c688d549d7 Added a comment 2021-09-25 05:47:16 +00:00
Joey Hess
91eb8a5df5
comment 2021-09-24 18:33:34 -04:00
bmx007@171b90624bc8f788a2a925a00b98aef5942e4787
177de6f8e5 Added a comment: comment 2 2021-09-24 20:08:22 +00:00
Joey Hess
c65a87c7d5
formatting 2021-09-24 14:21:55 -04:00
Joey Hess
ee16a8ea11
respond and close as not a bug 2021-09-24 14:20:40 -04:00
Joey Hess
a4a6fa1641
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-24 14:15:46 -04:00
Joey Hess
9ea8106bb0
sped up git-annex smudge --clean by 25%
Disabling git-annex branch update for this command is
ok, because it does not use any information from the branch,
but only logs the location when it adds a key.

Sponsored-by: Dartmouth College's Datalad project
2021-09-24 14:15:20 -04:00
Joey Hess
e47b4badb3
separate handles for cat-file and cat-file --batch-check
This avoids starting one process when only the other one is needed.
Eg in git-annex smudge --clean, this reduces the total number of
cat-file processes that are started from 4 to 2.

The only performance penalty is that when both are needed, it has to do
twice as much work to maintain the two Maps. But both are very small,
consisting of 1 or 2 items, so that work is negligible.

Sponsored-by: Dartmouth College's Datalad project
2021-09-24 13:16:13 -04:00
weinzwang
d712ed516a Added a comment 2021-09-23 21:40:51 +00:00
Joey Hess
e6c0bbd645
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-23 17:23:24 -04:00
Joey Hess
9c8f43ab69
comment 2021-09-23 17:23:06 -04:00
bmx007
6c3baa55ca 2021-09-23 19:18:49 +00:00
mih
300d7db57a Added a comment: v7 v v8 comparison 2021-09-23 06:29:30 +00:00
Joey Hess
6ac2642a24
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-22 19:29:47 -04:00
Joey Hess
64cac1a721
avoid potentially very long bwlimit delay at start
I first saw this getting with -J2 over ssh, but later saw it also
without the -J2. It was resuming, and the calulated unboundDelay was
many minutes. The first update of the meter jumped to some large value,
because of the resuming, and so it thought the BW was super fast.

Avoid by waiting until the second meter update.

Might be a good idea to also guard for the delay being many seconds
and avoid waiting. But how many? If BW is legitimately super fast, and a
remote happens to read more than a 32kb or so chunk at a time, it could
in theory download megabytes or gigabytes of data before the first meter
update. It would actually be appropriate then to delay for a long time,
if the desired BW was low. Could make up some numbers that are sane now,
but tech may improve.

(BTW, pleased to see bwlimit does work with -J. I had worried that
it might not, if the meter update happened in a different thread than
the downloading, but it's done in the same thread.)

Sponsored-by: Brett Eisenberg on Patreon
2021-09-22 19:23:30 -04:00