Commit graph

10713 commits

Author SHA1 Message Date
Joey Hess
e147ae07f4
remove supportUnlocked check that is not worth its overhead
moveAnnex only gets to that check if the object file was not present
before. So in the case where dup files are being added repeatedly,
it will only run the first time, and so there's no significant speedup
from doing it; all it avoids is a single sqlite lookup. Since MVar
accesses do have overhead, it's better to optimise for the common case,
where unlocked files are supported.

removeAnnex is less clear cut, but I think mostly is skipped running on
keys when the object has already been dropped, so similar reasoning
applies.
2021-06-15 09:28:56 -04:00
Joey Hess
6099edbf1c
bloom doesn't work, but this should I hope 2021-06-14 17:53:01 -04:00
Joey Hess
2df4c1cf91
plan 2021-06-14 17:13:37 -04:00
Joey Hess
643dc36e37
going round and round, boredly 2021-06-14 14:37:06 -04:00
yarikoptic
6043a2c7a0 Added a comment 2021-06-14 17:36:16 +00:00
Joey Hess
372ace599a
comment 2021-06-14 13:13:46 -04:00
Joey Hess
dcd2c95249
fix windows build 2021-06-14 12:43:26 -04:00
Joey Hess
014dc63a55
avoid sometimes expensive operations when annex.supportunlocked = false
This will mostly just avoid a DB lookup, so things get marginally
faster. But in cases where there are many files using the same key, it
can be a more significant speedup.

Added overhead is one MVar lookup per call, which should be small
enough, since this happens after transferring or ingesting a file,
which is always a lot more work than that. It would be nice, though,
to move getGitConfig to AnnexRead, which there is an open todo about.
2021-06-14 12:40:41 -04:00
Joey Hess
a02b5c2904
response 2021-06-14 12:36:42 -04:00
yarikoptic
51fede57a2 Added a comment 2021-06-14 16:23:41 +00:00
Ilya_Shlyakhter
35afd58a76 Added a comment: git-annex-add slowdown 2021-06-14 16:00:44 +00:00
Joey Hess
c4f1465a81
check symlink before reading file
This is faster because when multiple files are in a directory, it gets
cached.
2021-06-14 11:53:51 -04:00
Joey Hess
4163344ed6
retitle 2021-06-14 11:44:55 -04:00
Joey Hess
0eff5a3f71
reproduced 2021-06-14 11:37:21 -04:00
yarikoptic
8f66f73fea Added a comment 2021-06-09 22:28:06 +00:00
yarikoptic
e30f973323 Added a comment: more "mystery resolved" -- identical (empty) keys 2021-06-09 21:00:34 +00:00
Joey Hess
4b09b93a18
Merge branch 'master' of ssh://git-annex.branchable.com 2021-06-09 15:38:58 -04:00
Joey Hess
fad281767a
comment 2021-06-09 15:38:55 -04:00
yarikoptic
714d9f1315 Added a comment 2021-06-08 22:02:34 +00:00
yarikoptic
a8fb61329d Added a comment 2021-06-08 21:58:20 +00:00
yarikoptic
3985ae3224 Added a comment: OSX mystery resolved. add --batch is effective mitigation 2021-06-08 21:56:53 +00:00
Joey Hess
6cb9113ff5
comments 2021-06-08 17:38:56 -04:00
yarikoptic
c3993a2655 Added a comment 2021-06-08 20:23:09 +00:00
yarikoptic
437d9366b7 Added a comment: getting closer... 2021-06-08 19:21:59 +00:00
Ilya_Shlyakhter
be4a029e1b Added a comment 2021-06-08 19:08:01 +00:00
yarikoptic
697921ecd8 Added a comment: all recent builds/logs are fetched to smaug 2021-06-08 16:50:12 +00:00
Joey Hess
ecbaa52571
clarification 2021-06-08 12:00:01 -04:00
Joey Hess
1a6fa5abc8
add debugging for reconcileStaged calls for benchmarking 2021-06-08 11:57:23 -04:00
yarikoptic
62758ffb9f Added a comment: slow down is OSX specific 2021-06-08 14:28:18 +00:00
Joey Hess
d12120739d
comment 2021-06-08 10:19:04 -04:00
yarikoptic
57b567ac87 Added a comment 2021-06-07 21:39:05 +00:00
yarikoptic
2ffb9cc01b Added a comment: clarification 2021-06-07 21:20:35 +00:00
Joey Hess
e9a8b48a52
Merge branch 'master' of ssh://git-annex.branchable.com 2021-06-07 17:02:15 -04:00
Joey Hess
0f10f208a7
avoid double work in git-annex init
reconcileStaged was doing a redundant scan to scannAnnexedFiles.

It would probably make sense to move the body of scannAnnexedFiles
into reconcileStaged, the separation does not really serve any purpose.

Sponsored-by: Dartmouth College's Datalad project
2021-06-07 16:50:14 -04:00
Ilya_Shlyakhter
bdf3c06401 Added a comment: deferring the scan 2021-06-07 17:41:45 +00:00
Joey Hess
0101363eb8
correctly update keys db in merge conflict
This is quite a subtle edge case, see the bug report for full details.

The second git diff is needed only when there's a merge conflict.
It would be possible to speed it up marginally by using
--diff-filter=Unmerged, but probably not enough to bother with.

Sponsored-by: Graham Spencer on Patreon
2021-06-07 12:52:36 -04:00
Joey Hess
da24034331
comment 2021-06-07 11:53:25 -04:00
Joey Hess
3aabaa1a2b
Merge branch 'master' of ssh://git-annex.branchable.com 2021-06-07 11:47:13 -04:00
Joey Hess
254199edc9
comment 2021-06-07 11:46:47 -04:00
jwodder
8822bf0803 2021-06-07 14:32:25 +00:00
Atemu
234d235a03 rename bugs/delayadd_doesn__39__t_work.mdwn to bugs/delayadd_doesn__39__t_work_with_smallfiles.mdwn 2021-06-06 16:50:40 +00:00
falsifian
f58d686ccf Add bug report 2021-06-05 20:31:39 +00:00
yarikoptic
717000f4f8 Added a comment 2021-06-05 13:50:43 +00:00
yarikoptic
c5e62c1968 Initial report on performance regression 2021-06-05 13:23:13 +00:00
Joey Hess
5b7429e73a
avoid removing old associated file when there is a merge conflict
It makes sense to keep the key used by the old version of an
associated file, until the merge conflict is resolved.

Note that, since in this case git diff is being run with --index, it's
not possible to use -1 or -3, which would let the keys
associated with the new versions of the file also be added. That would
be better, because it's possible that the local modification to the file
that caused the merge conflict has not yet gotten its new key recorded
in the db.

Opened a bug about a case this is thus not able to address.

Sponsored-by: Boyd Stephen Smith Jr. on Patreon
2021-06-01 11:43:00 -04:00
Joey Hess
f00e365f41
comments 2021-05-31 17:54:17 -04:00
Atemu
1b6715b4ca Added a comment 2021-05-31 19:07:31 +00:00
Ilya_Shlyakhter
9dbf93b9c5 Added a comment: clarifying preferred content expressions 2021-05-30 19:40:51 +00:00
Joey Hess
cd73fcc92c
Merge branch 'master' of ssh://git-annex.branchable.com 2021-05-25 11:45:02 -04:00
Joey Hess
483fc4dc6b
Merge branch 'trackassociated' 2021-05-25 11:43:52 -04:00
Joey Hess
01331f0b8f
required content update 2021-05-25 10:04:29 -04:00
Joey Hess
45c0fb29f0
update 2021-05-25 09:58:46 -04:00
Atemu
82ee0f053b Added a comment 2021-05-25 11:00:39 +00:00
Joey Hess
9a5981a153
comment 2021-05-24 16:43:06 -04:00
Joey Hess
125a28c58e
Merge branch 'master' of ssh://git-annex.branchable.com 2021-05-24 16:31:58 -04:00
Joey Hess
07c98a4ce2
update 2021-05-24 16:31:14 -04:00
Joey Hess
63de81b52a
Merge branch 'master' into trackassociated 2021-05-24 16:27:24 -04:00
Joey Hess
2de49c186f
update 2021-05-24 16:27:07 -04:00
Joey Hess
44a0d21e57
Merge branch 'master' into trackassociated 2021-05-24 16:24:53 -04:00
Joey Hess
a56b151f90
fix longstanding indeterminite preferred content for duplicated file problem
* drop: When two files have the same content, and a preferred content
  expression matches one but not the other, do not drop the file.
* sync --content, assistant: Fix an edge case where a file that is not
  preferred content did not get dropped.

The sync --content edge case is that handleDropsFrom loaded associated files
and used them without verifying that the information from the database was
not stale.

It seemed best to avoid changing --want-drop's behavior, this way when
debugging a preferred content expression with it, the files matched will
still reflect the expression. So added a note to the --want-drop documentation,
to make clear it may not behave identically to git-annex drop --auto.

While it would be possible to introspect the preferred content
expression to see if it matches on filenames, and only look up the
associated files when it does, it's generally fairly rare for 2 files to
have the same content, and the database lookup is already avoided when
there's only 1 file, so I did not implement that further optimisation.

Note that there are still some situations where the associated files
database does not get locked files recorded in it, which will prevent
this fix from working.

Sponsored-by: Dartmouth College's Datalad project
2021-05-24 14:07:05 -04:00
Joey Hess
c1b5028211
update 2021-05-24 11:59:01 -04:00
Ilya_Shlyakhter
bcedcef97f Added a comment: defining preferred content state 2021-05-23 20:39:23 +00:00
Atemu
3eb6a3b05f Added a comment 2021-05-22 17:31:01 +00:00
Lukey
be6bf5ba35 Added a comment 2021-05-22 17:19:19 +00:00
Atemu
8daca82623 Added a comment 2021-05-22 17:02:07 +00:00
Atemu
21fba1cdb8 Added a comment 2021-05-22 10:20:35 +00:00
Atemu
0b89436b47 Added a comment 2021-05-22 09:55:31 +00:00
Joey Hess
b81f5532c6
comment 2021-05-21 16:44:44 -04:00
Joey Hess
df0b75cdc4
complications 2021-05-21 14:18:38 -04:00
Joey Hess
1d9bad51d2
plan for these 2021-05-21 13:50:26 -04:00
Joey Hess
f39b7c3663
comment 2021-05-21 12:39:35 -04:00
Joey Hess
414dc39a12
comment 2021-05-21 11:31:38 -04:00
Joey Hess
9dbbecc8f4
Merge branch 'master' of ssh://git-annex.branchable.com 2021-05-21 11:28:17 -04:00
Joey Hess
5393c0ae58
reopen per comment 2021-05-21 11:27:13 -04:00
Atemu
e9e3cc015e Added a comment 2021-05-19 16:54:19 +00:00
Joey Hess
84366fa2d0
fix by improving docs 2021-05-19 11:13:53 -04:00
Atemu
48314f625f Added a comment 2021-05-18 16:23:09 +00:00
Atemu
4a76ba8761 Forgot the assistant needed for repro 2021-05-18 16:16:56 +00:00
Atemu
828a5922df Added a comment 2021-05-18 09:13:32 +00:00
Atemu
b4b6977cab Added a comment 2021-05-16 11:37:25 +00:00
Atemu
944b132103 2021-05-16 11:05:15 +00:00
Atemu
54db5df937 Added a comment 2021-05-16 10:27:47 +00:00
Joey Hess
947d2a10bc
assistant: Fix a crash on startup by avoiding using forkProcess
ghc 8.8.4 seems to have changed something that broke code that has been
successfully using forkProcess since 2012. Likely a change to GC internals.

Since forkProcess has never had clear documentation about how to
use it safely, avoid using it at all. Instead, when git-annex needs to
daemonize itself, re-run the git-annex command, in a new process group
and session.

This commit was sponsored by Luke Shumaker on Patreon.
2021-05-12 15:08:03 -04:00
Joey Hess
ba7598dbab
comment 2021-05-12 13:39:15 -04:00
Joey Hess
7e2fda5307
comment 2021-05-12 11:37:36 -04:00
Joey Hess
afdc201d1c
comment 2021-05-12 11:24:55 -04:00
Atemu
9e8e747654 Added a comment 2021-05-12 14:17:06 +00:00
Lukey
20af8b311a 2021-05-11 11:22:31 +00:00
Lukey
27b98f6f0d Added a comment 2021-05-11 10:28:12 +00:00
Lukey
add38774d1 Added a comment 2021-05-11 09:21:38 +00:00
Lukey
61a3a7e0c3 Added a comment 2021-05-11 08:50:36 +00:00
Lukey
810fe88d5a Added a comment 2021-05-11 08:41:42 +00:00
Lukey
06e167291d Added a comment 2021-05-11 07:37:08 +00:00
Joey Hess
72a8bbce12
Revert "smudge: check for known annexed inodes before checking annex.largefiles"
This reverts commit 424bef6b6f.

This commit caused other buggy behavior unfortunately.
2021-05-10 12:20:13 -04:00
Joey Hess
c88fdd91f9
comment and close 2021-05-10 11:04:50 -04:00
Joey Hess
0ab9d0dfad
comment 2021-05-10 10:37:28 -04:00
Atemu
f0b553a25a 2021-05-10 10:53:12 +00:00
Atemu
3dc9833d53 2021-05-10 10:26:45 +00:00
Joey Hess
e53bd0c6c0
user error, not a bug 2021-05-09 20:58:35 -04:00
Joey Hess
a8e8ad95a2
bug report 2021-05-09 20:55:07 -04:00
kyle
5a5ef1c869 Added a comment: thanks 2021-05-07 18:07:24 +00:00
Joey Hess
921753ac44
reinject: Error out when run on a file that is not annexed
rather than silently skipping it
2021-05-07 13:31:03 -04:00
Joey Hess
6b980c1514
comment 2021-05-07 13:13:48 -04:00
Joey Hess
eaea173bc2
applied patch 2021-05-07 11:11:10 -04:00
kyle
cc36fd261e reinject: silent failure with absolute path to pointer file 2021-05-06 19:26:52 +00:00
kyle
06e996efad patch: fromkey: create directory for pointer files too 2021-05-06 15:23:07 +00:00
pat
da5598da21 2021-05-05 19:06:19 +00:00
pat
5bb85d76d8 2021-05-05 02:51:47 +00:00
kyle
8f0ddf0925 git-commit pathspec change due to 424bef6b6 2021-05-04 21:43:41 +00:00
Joey Hess
f2876804ca
close 2021-05-03 12:24:06 -04:00
Joey Hess
1be7be6976
Merge branch 'master' of ssh://git-annex.branchable.com 2021-05-03 12:12:07 -04:00
ijc@c69abafeb65fa2e784811fc549e9976a5cf4b903
d9da6d6505 Added a comment 2021-05-03 15:45:14 +00:00
Joey Hess
4588668a12
fromkey unlocked files support
fromkey: Create an unlocked file when used in an adjusted branch where the
file should be unlocked, or when configured by annex.addunlocked.

There is some overlap with code in Annex.Ingest, however it's not quite the
same because ingesting has a temp file with the content, where here the
content, if any, is in the annex object file. So it eg, makes sense for
Annex.Ingest to copy the execute mode of the content file, but it does not make
sense for fromkey to do that.

Also changed in passing to stage the file in git directly, rather than
using git add. One consequence of that is that if the file is gitignored,
it will still get added, rather than the old behavior:

The following paths are ignored by one of your .gitignore files:
ignored
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
git-annex: user error (xargs ["-0","git","--git-dir=.git","--work-tree=.","--literal-pathspecs","add","--"] exited 123)

That old behavior was a surprise to me, and so I consider it a bug, and doubt
anyone would have relied on it.

Note that, when on an --hide-missing branch, it is possible to fromkey a key
that is not present (needs --force). The annex link or pointer file still gets
written in this case. It doesn't seem to make any sense not to write it,
because then fromkey would not do anything useful in this case, and this way
the file can be committed and synced to master, and the branch re-adjusted to
hide the new missing file.

This commit was sponsored by Noam Kremen on Patreon.
2021-05-03 11:26:18 -04:00
Lukey
c9db4b2a47 2021-05-03 13:01:54 +00:00
Lukey
046f872ab1 Added a comment 2021-05-03 12:12:18 +00:00
Lukey
0e4f453b90 Added a comment 2021-05-03 10:26:35 +00:00
Lukey
dc6dd1e401 Added a comment 2021-05-02 18:46:34 +00:00
ijc@c69abafeb65fa2e784811fc549e9976a5cf4b903
b2c706634e Added a comment 2021-05-02 17:54:56 +00:00
datamanager
1fb59a63a3 Added a comment: I think I am having the same issue 2021-04-28 01:19:46 +00:00
Joey Hess
63af1bae8d
Merge branch 'master' of ssh://git-annex.branchable.com 2021-04-27 18:12:19 -04:00
Joey Hess
4ea03c7b82
close
test case ran for over an hour successfully
2021-04-27 18:11:29 -04:00
Joey Hess
0f73b6d03a
Avoid more than 1 gpg password prompt at the same time
Which could happen occasionally before when concurrency is enabled.
While not much of a problem when it did happen, better to avoid it. Also,
since it seems likely the gpg-agent sometimes fails in such a situation,
this makes it not happen when running a single git-annex command with
concurrency enabled.

This commit was sponsored by Jake Vosloo on Patreon.
2021-04-27 16:36:44 -04:00
Joey Hess
42cacb4099
reproduced, some analysis of a gpg bug
This commit was sponsored by Graham Spencer on Patreon.
2021-04-27 16:31:37 -04:00
pat
46bcb29b3c Added a comment 2021-04-27 18:34:30 +00:00
Joey Hess
a166d2520b
check mincopies is satisfied even when numcopies is known to be satisfied
I had been assuming that numcopies would be a larger or at most equal to
mincopies, so no need to check both. But users get confused and use configs
that don't really make sense, so make sure to handle mincopies being larger
than numcopies.

Also add something to the mincopies man page to discourage this
misconfiguration.

This commit was sponsored by Denis Dzyubenko on Patreon.
2021-04-27 13:37:18 -04:00
Joey Hess
f58fb5a610
comment 2021-04-27 12:24:36 -04:00
Joey Hess
d3e49b210a
git-annex-config: Allow setting annex.securehashesonly
Which has otherwise been supported since 2019, but was missing from the
list of allowed repo-global configs.

Reordered the list to match the order in the git-annex-config man page, to
make them easy to cross-compare.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2021-04-26 13:50:37 -04:00
Joey Hess
28f5f7515c
response and close 2021-04-26 13:34:00 -04:00
ntraut9@6c7c5e5bfddb591c28ab8222f1de9cb56840a69e
5f13b26e63 Added a comment 2021-04-26 16:40:15 +00:00
ntraut9@6c7c5e5bfddb591c28ab8222f1de9cb56840a69e
75bd8462c5 Added a comment 2021-04-26 16:01:02 +00:00
https://launchpad.net/~r0lf
5738756254 Added a comment 2021-04-26 13:05:15 +00:00
https://launchpad.net/~r0lf
369de4d20e removed 2021-04-26 13:03:46 +00:00
https://launchpad.net/~r0lf
4f24df2150 Added a comment 2021-04-26 13:03:20 +00:00
https://launchpad.net/~r0lf
08a8dc25d6 Added a comment 2021-04-26 12:22:43 +00:00
https://launchpad.net/~r0lf
becf1dcfe6 2021-04-26 11:58:13 +00:00
felix.hagemann@b76e9ea0928cf33dacffc37ec3dbecf33171a8a5
df77e3d56b Added a comment: Still happening 2021-04-25 16:20:05 +00:00
Lukey
ac3e1c5972 Added a comment 2021-04-25 11:53:29 +00:00
ijc@c69abafeb65fa2e784811fc549e9976a5cf4b903
414d3325ea 2021-04-25 10:15:28 +00:00
Ilya_Shlyakhter
4688c7bc18 Added a comment: sparse checkouts to hide non-present files 2021-04-24 22:00:14 +00:00
https://launchpad.net/~r0lf
1b19140488 Added a comment: try to find a better solution 2021-04-24 11:03:28 +00:00
https://launchpad.net/~r0lf
facc70580d removed 2021-04-24 10:41:15 +00:00
https://launchpad.net/~r0lf
cd053a2d47 Added a comment: try to find a better solution 2021-04-24 10:40:18 +00:00
https://launchpad.net/~r0lf
41a42c5f0e removed 2021-04-24 10:39:21 +00:00
https://launchpad.net/~r0lf
4f8ae886d2 Added a comment 2021-04-24 10:38:37 +00:00
https://launchpad.net/~r0lf
43177539e7 2021-04-24 10:17:46 +00:00
Joey Hess
da0a696c96
Revert "reorder another test"
This reverts commit 3e63f00f63.
2021-04-23 01:01:29 -04:00
Joey Hess
bb4f2af602
windows needs to die 2021-04-23 00:38:18 -04:00
Joey Hess
e623b0fd87
close old bug 2021-04-23 00:25:22 -04:00
Joey Hess
3e63f00f63
reorder another test
continuing to try to narrow down cause of failure on windows
2021-04-22 10:03:35 -04:00
Joey Hess
653b719472
fix --all to include not yet committed files from the journal
Fix bug caused by recent optimisations that could make git-annex not see
recently recorded status information when configured with
annex.alwayscommit=false.

This does mean that --all can end up processing the same key more than once,
but before the optimisations that introduced this bug, it used to also behave
that way. So I didn't try to fix that; it's an edge case and anyway git-annex
behaves well when run on the same key repeatedly.

I am not too happy with the use of a MVar to buffer the list of files in the
journal. I guess it doesn't defeat lazy streaming of the list, if that
list is actually generated lazily, and anyway the size of the journal is
normally capped and small, so if configs are changed to make it huge and
this code path fire, git-annex using enough memory to buffer it all is not a
large problem.
2021-04-21 15:40:32 -04:00