Commit graph

32155 commits

Author SHA1 Message Date
Joey Hess
c62fe5e9a8
avoid redundant prompt for http password in git-annex get that does autoinit
autoEnableSpecialRemotes runs a subprocess, and if the uuid for a git
remote has not been probed yet, that will do a http get that will prompt
for a password. And then the parent process will subsequently prompt
for a password when getting annexed files from the remote.

So the solution is for autoEnableSpecialRemotes to run remoteList before
the subprocess, which will probe for the uuid for the git remote in the
same process that will later be used to get annexed files.

But, Remote.Git imports Annex.Init, and Remote.List imports Remote.Git,
so Annex.Init cannot import Remote.List. Had to pass remoteList into
functions in Annex.Init to get around this dependency loop.
2022-09-09 14:43:43 -04:00
Joey Hess
9621beabc4
cache credentials in memory when doing http basic auth to a git remote
When accessing a git remote over http needs a git credential prompt for a
password, cache it for the lifetime of the git-annex process, rather than
repeatedly prompting.

The git-lfs special remote already caches the credential when discovering
the endpoint. And presumably commands like git pull do as well, since they
may download multiple urls from a remote.

The TMVar CredentialCache is read, so two concurrent calls to
getBasicAuthFromCredential will both prompt for a credential.
There would already be two concurrent password prompts in such a case,
and existing uses of `prompt` probably avoid it. Anyway, it's no worse
than before.
2022-09-09 14:20:32 -04:00
jgoerzen
7e6b2de2c5 2022-09-09 17:28:06 +00:00
yarikoptic
9811a02b67 Added a comment 2022-09-09 16:51:47 +00:00
Joey Hess
adb2f5cc00
comment 2022-09-09 12:39:28 -04:00
Joey Hess
28fc8d491f
comment 2022-09-09 12:30:46 -04:00
yarikoptic
22a311ef46 reporting flaky tests on ndoli 2022-09-08 15:01:50 +00:00
nick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9
2c4c56ea50 Added a comment: git-credential-netrc 2022-09-08 02:02:40 +00:00
nick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9
4f3a33d824 2022-09-08 01:10:06 +00:00
nick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9
d8c98399e1 Added a comment 2022-09-08 00:28:32 +00:00
nick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9
e1984e2c67 Added a comment 2022-09-07 23:22:40 +00:00
yarikoptic
f895adbb05 initial todo on multiple passwords entry for get 2022-09-06 21:02:01 +00:00
jgoerzen
d23318ae4f Added a comment 2022-09-05 23:57:01 +00:00
jgoerzen
aa4ba3fc7c Added a comment 2022-09-05 22:01:24 +00:00
jgoerzen
403dca7c42 Added a comment 2022-09-05 18:44:01 +00:00
Joey Hess
4a1908f12c
Merge branch 'master' of ssh://git-annex.branchable.com 2022-09-05 14:36:32 -04:00
Joey Hess
99a17e6185
comment 2022-09-05 14:35:24 -04:00
jgoerzen
764fa6e230 Added a comment 2022-09-05 18:29:31 +00:00
Joey Hess
bd7b760cf0
comment 2022-09-05 14:00:50 -04:00
Joey Hess
8a4cfd4f2d
use getSymbolicLinkStatus not getFileStatus to avoid crash on broken symlink
Fix crash importing from a directory special remote that contains a broken
symlink.

The crash was in listImportableContentsM but some other places in
Remote.Directory also seemed like they could have the same problem.

Also audited for other places that have such a problem. Not all calls
to getFileStatus are bad, in some cases it's better to crash on something
unexpected. For example, `git-annex import path` when the path is a broken
symlink should crash, the same as when it does not exist. Many of the
getFileStatus calls are like that, particularly when they involve
.git/annex/objects which should never have a broken symlink in it.

Fixed a few other possible cases of the problem.

Sponsored-by: Lawrence Brogan on Patreon
2022-09-05 13:46:32 -04:00
Joey Hess
600d3f7141
Merge branch 'master' of ssh://git-annex.branchable.com 2022-09-05 13:20:44 -04:00
Joey Hess
ff0490c7c6
fix build 2022-09-05 13:20:23 -04:00
Joey Hess
61b60f9e46
update 2022-09-05 10:44:45 -04:00
Lukey
7dd6e38945 Added a comment 2022-09-05 09:35:18 +00:00
Lukey
6e99fbc2e5 Added a comment 2022-09-05 09:07:05 +00:00
jgoerzen
fa01f0bab9 Added a comment 2022-09-05 01:14:53 +00:00
jgoerzen
661f452dfa Added a comment 2022-09-05 01:01:59 +00:00
jgoerzen
3159a28f88 2022-09-05 00:59:39 +00:00
jgoerzen
e7de6fffc1 2022-09-05 00:17:03 +00:00
jgoerzen
47a5853da8 Added a comment 2022-09-04 22:31:14 +00:00
jgoerzen
95e4021c09 2022-09-04 13:12:55 +00:00
tomdhunt
241b275f63 2022-09-04 04:39:20 +00:00
jgoerzen
5fe6803375 2022-09-04 01:16:18 +00:00
jgoerzen
a4e9e656c9 Added a comment 2022-09-03 23:26:28 +00:00
jgoerzen
342336aad4 Added a comment 2022-09-03 22:45:42 +00:00
Lukey
217cfd91df Added a comment 2022-09-03 21:32:29 +00:00
jgoerzen
fee2445df0 2022-09-03 20:37:25 +00:00
jgoerzen
b36afc1367 2022-09-03 17:38:23 +00:00
jgoerzen
7785835363 2022-09-03 17:33:49 +00:00
jgoerzen
254c204da2 Added a comment: mtree can help 2022-09-03 17:30:58 +00:00
jgoerzen
3723922e49 2022-09-03 17:29:06 +00:00
Joey Hess
be2c8113b9
add NNCP special remote! 2022-09-02 16:55:36 -04:00
jkniiv
15e9feb1e9 Added a comment: I don't think there is one 2022-09-02 02:04:29 +00:00
yarikoptic
4241c64a8d question about external drive filesystem 2022-09-01 20:50:21 +00:00
yarikoptic
84eda42abe Added a comment: howto importfeed youtube playlists (not entire channels) 2022-09-01 19:26:20 +00:00
yarikoptic
4fd4865493 FTBFS report 2022-08-31 14:47:35 +00:00
yarikoptic
55252d1d4f Added a comment 2022-08-30 19:38:49 +00:00
Joey Hess
b7ff67d176
update 2022-08-30 15:22:06 -04:00
Joey Hess
e1dd689630
Merge branch 'master' of ssh://git-annex.branchable.com 2022-08-30 15:20:46 -04:00
Joey Hess
a93163d6f7
optimise linker in linux standalone tarballs
Trick the linker into not doing unncessary work searching for optimised
libraries that are not present, by symlinking the directories where
optimised libs would be to the main lib dir.

This reduces the ENOENT of git-annex init by about 1/2. The linker always
finds the files where it looks first time now. I have not looked at what
the wall clock speedup might be, it's probably rather small.

If a x86-64-v5 comes to be, the list will need to be extended. And there
may be other directories used on some machines that I have missed. Not done
for arm64 yet, or any uncommon architectures.

Sponsored-by: Dartmouth College's Datalad project
2022-08-30 15:20:04 -04:00
Joey Hess
345e60a623
comment 2022-08-30 13:36:53 -04:00
Joey Hess
22f492bea8
comment 2022-08-30 12:50:42 -04:00
DavidD
98e20eb579 Added a comment 2022-08-29 21:19:56 +00:00
yarikoptic
04689aa74d Added a comment 2022-08-29 20:46:12 +00:00
Joey Hess
78440ca37d
move assistant and webapp build-depends into main build-depends
For some reason, cabal 3.4.1.0 builds w/o the assistant and webapp,
even when the flag is explicitly turned on. Moving the build-depends from
inside the if flag section to the main build-depends somehow fixes this.

Since the webapp build deps are thus always available, there is no reason
not to build the webapp when building the assistant. So, got rid of the
webapp build flag. Kept the assistant build flag for now, since building
without it does at least still speed up the build.

Sponsored-by: Brock Spratlen on Patreon
2022-08-29 15:23:49 -04:00
Joey Hess
b99b1c530d
Merge branch 'master' of ssh://git-annex.branchable.com 2022-08-29 14:50:04 -04:00
Joey Hess
faefab5e65
add bug and update comment 2022-08-29 14:49:44 -04:00
Ilya_Shlyakhter
8df2e2dbd8 added suggestion for git-annex-import to import symlinks 2022-08-29 18:45:35 +00:00
Joey Hess
248cf6b151
Merge branch 'master' of ssh://git-annex.branchable.com 2022-08-29 14:25:39 -04:00
Joey Hess
4c080a20ac
comment 2022-08-29 14:25:30 -04:00
Ilya_Shlyakhter
a1efed2a9c Added a comment: testremote cleanup 2022-08-29 18:09:24 +00:00
Joey Hess
d4fd966396
avoid dup check of guardSafeToUseRepo
Speeds up init slightly, and reduces the number of syscalls by the
dynamic linker.

Sponsored-by: Dartmouth College's Datalad project
2022-08-29 13:52:58 -04:00
Joey Hess
f184dca7de
comment 2022-08-29 13:38:42 -04:00
Joey Hess
f8524d6ecb
comment 2022-08-29 12:45:58 -04:00
Ilya_Shlyakhter
86e0e8fce1 Added a comment: testremote cleanup 2022-08-28 20:15:39 +00:00
Atemu
3cd2a075b9 Added a comment 2022-08-28 17:56:20 +00:00
hoegiflo@befdf51af27be5af346451fe32863dadb1d37ad5
a2ee27851b Added a comment 2022-08-27 21:00:49 +00:00
yarikoptic
ab8ffb406c initial report on libpcre lookups 2022-08-27 00:53:22 +00:00
Ilya_Shlyakhter
609a82c653 Added a comment: copying to S3: partsize/chunking 2022-08-25 17:45:49 +00:00
Atemu
090489832c Added a comment 2022-08-25 16:18:39 +00:00
yarikoptic
3ff0d9ac66 Added a comment 2022-08-24 19:27:00 +00:00
Joey Hess
5e45befa1b
comment 2022-08-24 15:17:43 -04:00
hoegiflo@befdf51af27be5af346451fe32863dadb1d37ad5
b47ea090ca 2022-08-24 18:43:15 +00:00
hoegiflo@befdf51af27be5af346451fe32863dadb1d37ad5
7c4b37a7b1 2022-08-24 18:41:37 +00:00
yarikoptic
9750dd5e21 Added a comment 2022-08-24 18:40:10 +00:00
yarikoptic
8e5b22af2f Added a comment 2022-08-24 18:35:25 +00:00
yarikoptic
26c152bae1 Added a comment 2022-08-24 18:32:53 +00:00
Joey Hess
33083a952a
comment 2022-08-24 13:28:43 -04:00
Joey Hess
ef037b9028
comment 2022-08-24 13:26:42 -04:00
Joey Hess
a124a53fa2
comment 2022-08-24 13:17:56 -04:00
Joey Hess
ea445260ba
comment 2022-08-24 13:13:45 -04:00
Joey Hess
55bf1c6896
comment 2022-08-24 13:05:15 -04:00
yarikoptic
cc64741410 Added a comment 2022-08-24 15:42:10 +00:00
yarikoptic
4344943d64 added "reproducer" 2022-08-24 15:25:33 +00:00
yarikoptic
749593af7d request add --batch to be able to handle directories 2022-08-24 15:12:19 +00:00
Ilya_Shlyakhter
ba5c8cba44 added suggestion to add clean-up after a testremote failure 2022-08-24 14:52:36 +00:00
Ilya_Shlyakhter
cfad39ccb4 added bug report about a cryptic error message when copying to S3 2022-08-24 14:47:16 +00:00
Ilya_Shlyakhter
274ef9db2a Added a comment: imports and symlinks 2022-08-22 20:40:42 +00:00
DavidD
cbc26acd45 Added a comment 2022-08-22 17:54:19 +00:00
Joey Hess
28921af543
remove old closed bugs and todo items to speed up wiki updates and reduce size
Remove closed bugs and todos that were last edited or commented before 2021.

Except for ones tagged projects/* since projects like datalad want to keep
around records of old deleted bugs longer.

Command line used:

    for f in $(grep -l '|done\]\]' -- ./*.mdwn); do if ! grep -q "projects/" "$f"; then d="$(echo "$f" | sed 's/.mdwn$//')"; if [ -z "$(git log --since=01-01-2021 --pretty=oneline -- "$f")" -a -z "$(git log --since=01-01-2021 --pretty=oneline -- "$d")" ]; then git rm -- "./$f" ; git rm -rf "./$d"; fi; fi; done
    for f in $(grep -l '\[\[done\]\]' -- ./*.mdwn); do if ! grep -q "projects/" "$f"; then d="$(echo "$f" | sed 's/.mdwn$//')"; if [ -z "$(git log --since=01-01-2021 --pretty=oneline -- "$f")" -a -z "$(git log --since=01-01-2021 --pretty=oneline -- "$d")" ]; then git rm -- "./$f" ; git rm -rf "./$d"; fi; fi; done
2022-08-22 12:27:10 -04:00
Joey Hess
a9db0a5055
add news item for git-annex 10.20220822 2022-08-22 12:08:24 -04:00
Joey Hess
c13b3aba98
add comment (and other old comment I forgot to add earlier) 2022-08-22 12:01:29 -04:00
Joey Hess
39cdf72bc7
commet 2022-08-22 11:53:18 -04:00
Joey Hess
3ce71cad8c
Merge branch 'master' of ssh://git-annex.branchable.com 2022-08-22 11:50:21 -04:00
Ilya_Shlyakhter
9ac72bff2e Added a comment: adding checksums to WORM keys 2022-08-21 21:20:03 +00:00
Ilya_Shlyakhter
fc334a036d Added a comment: addurl and authentication 2022-08-21 21:13:57 +00:00
Yaroslav Halchenko
0151976676
Typo fix unncessary -> unnecessary.
Detected while reading recent CHANGELOG entry but then decided to apply
to entire codebase and docs since why not?
2022-08-20 09:40:19 -04:00
Ilya_Shlyakhter
c25ade4d97 Added a comment: imports and symlinks 2022-08-19 20:19:50 +00:00
DavidD
3150addca6 Added a comment 2022-08-19 20:07:49 +00:00
DavidD
a6cec4c1f9 Added a comment 2022-08-19 19:42:55 +00:00
Joey Hess
f091eff476
Merge branch 'master' of ssh://git-annex.branchable.com 2022-08-19 13:45:19 -04:00
Joey Hess
ed39979ac8
import: Avoid following symbolic links inside directories being imported
Too big a footgun.

This does not prevent attackers who can write to the directory being
imported from racing the check. But they can cause anything to be imported
anyway, so would be limited to getting the legacy import to follow into a
directory they do not write to, and move files out of it into the annex.
(The directory special remote does not have that problem since it does not
move files.)

Sponsored-by: Jack Hill on Patreon
2022-08-19 13:31:16 -04:00
Ilya_Shlyakhter
39763ddee7 Added a comment: git-annex-import and symlinks 2022-08-19 17:18:37 +00:00
Joey Hess
4ca8e95773
comment 2022-08-19 13:06:38 -04:00
Joey Hess
bfe75f0517
comment 2022-08-19 12:58:29 -04:00
Joey Hess
e3250bcd78
comment 2022-08-19 12:56:51 -04:00
Joey Hess
94029995fa
fix git-annex add regression on deleted file
Fix a regression in 10.20220624 that caused git-annex add to crash when
there was an unstaged deletion.

Sponsored-by: Dartmouth College's Datalad project
2022-08-19 12:55:49 -04:00
Atemu
15c0cff2da Added a comment 2022-08-19 14:23:27 +00:00
skcin
fb57fd9b96 Added a comment: Option to not follow symlinks? 2022-08-18 15:32:43 +00:00
Atemu
d8eaa91f05 Added a comment 2022-08-18 11:27:12 +00:00
yarikoptic
c80ea222da added datalad project tag to the issue 2022-08-17 19:56:25 +00:00
yarikoptic
3368172a10 Added a comment 2022-08-17 19:55:45 +00:00
DavidD
b5fa75fcf6 Added a comment 2022-08-17 19:03:19 +00:00
yarikoptic
702f6fcb00 initial report on getSymbolicLinkStatus crashing upon file removal 2022-08-17 18:46:27 +00:00
Joey Hess
0d33a7a029
Merge branch 'master' of ssh://git-annex.branchable.com 2022-08-17 13:16:06 -04:00
Joey Hess
b801812660
init: probe if sqlite works
Help the user get annex.dbdir configured when their filesystem is not
one that sqlite works on.

The change in Database.Handle makes an error from sqlite not be ignored
besides being displayed, which it was before. I can't see any reason
git-annex would want to ignore these errors.

I chose to use the fsck database rather than the keys database because
opening the keys database populates it, and see commit
b3c4579c79.

The placement of the call to checkSqliteWorks inside checkInitializeAllowed
avoids annex.uuid getting set before it's called.

Sponsored-by: Dartmouth College's Datalad project
2022-08-17 13:12:26 -04:00
account+annex@806a7c5f67b75d530bced4ea294c77681ebdf766
ec3863e8d4 Added a comment 2022-08-17 16:59:17 +00:00
Joey Hess
fc2d10d2cd
fixed in v10 2022-08-17 12:40:43 -04:00
account+annex@806a7c5f67b75d530bced4ea294c77681ebdf766
c382375d49 2022-08-17 14:28:27 +00:00
Joey Hess
29d7741947
comment 2022-08-16 12:09:12 -04:00
oliv5
3414507cf3 Added a comment 2022-08-16 14:55:44 +00:00
Joey Hess
7286f408fa
close 2022-08-15 14:33:40 -04:00
Joey Hess
7fba5dee61
correct documentation, keyid= only works once
keyid+= can be used to add additional key ids later.

I wonder if this broke with changes to remote configs? But I think it's
always been a map, and so only one keyid can be stored and later ones
overwrite earlier ones.

Sponsored-by: Brett Eisenberg on Patreon
2022-08-15 14:25:13 -04:00
Joey Hess
195f870265
comment 2022-08-15 14:05:05 -04:00
Joey Hess
2fba8ded77
comment 2022-08-15 12:39:19 -04:00
Joey Hess
840bd50390
make it easier to use curl for unusual url schemes
Use curl when annex.security.allowed-url-schemes includes an url scheme not
supported by git-annex internally, as long as
annex.security.allowed-ip-addresses is configured to allow using curl.

Sponsored-by: Luke Shumaker on Patreon
2022-08-15 12:22:13 -04:00
Atemu
2fc9a0096f 2022-08-15 10:50:59 +00:00
DavidD
af60cd2050 2022-08-12 18:33:35 +00:00
Joey Hess
d07a1dbdee
comment about annex.dbdir on relevant bugs 2022-08-12 13:31:27 -04:00
Joey Hess
4cfe17a9e8
use a subdirectory of annex.dbdir
This allows annex.dbdir to be set globally or always set to the same
value when needed. Each repository uses a subdirectory of it.

Sponsored-by: Dartmouth College's Datalad project
2022-08-12 13:18:15 -04:00
Joey Hess
16e82f6cf9
comment 2022-08-12 13:10:54 -04:00
Joey Hess
428af29281
Merge branch 'dbdir' 2022-08-12 13:07:12 -04:00
Joey Hess
a335c1e46e
annex.dbdir fully working
Completes work started in e60766543f

I've verified that all the sqlite databases get stored in annex.dbdir
and are created successfully. If annex.dbdir does not exist, it will be
created; its parent directory must already exist though.

Sponsored-by: Dartmouth College's Datalad project
2022-08-12 13:06:58 -04:00
Joey Hess
b80ad3a2ad
comment 2022-08-11 17:16:35 -04:00
Joey Hess
e60766543f
add annex.dbdir (WIP)
WIP: This is mostly complete, but there is a problem: createDirectoryUnder
throws an error when annex.dbdir is set to outside the git repo.

annex.dbdir is a workaround for filesystems where sqlite does not work,
due to eg, the filesystem not properly supporting locking.

It's intended to be set before initializing the repository. Changing it
in an existing repository can be done, but would be the same as making a
new repository and moving all the annexed objects into it. While the
databases get recreated from the git-annex branch in that situation, any
information that is in the databases but not stored in the branch gets
lost. It may be that no information ever gets stored in the databases
that cannot be reconstructed from the branch, but I have not verified
that.

Sponsored-by: Dartmouth College's Datalad project
2022-08-11 16:58:53 -04:00
Joey Hess
425deaf615
comment 2022-08-11 13:59:37 -04:00
atrent
e3b6d203c1 2022-08-11 12:45:59 +00:00
Joey Hess
e9ffffbb8f
close 2022-08-10 12:29:29 -04:00
Atemu
434a1423c0 Added a comment 2022-08-10 12:35:28 +00:00
yarikoptic
bd3c68a57a Added a comment 2022-08-09 19:12:40 +00:00
yarikoptic
7cfab36e10 Added a comment 2022-08-09 18:02:32 +00:00
yarikoptic
dc10e9fdc2 Added a comment 2022-08-09 18:02:08 +00:00
Joey Hess
21cfd0ea98
fix reversion
3a513cfe73 caused a reversion in addurl.
The type of addSmall changed, but the void prevented the type checker
from helping notice this. Since it now returns a CommandPerform, the
cleanup action has to be run.

Sponsored-by: Dartmouth College's Datalad project
2022-08-09 13:49:30 -04:00
Joey Hess
eb2acf5fd7
comment 2022-08-09 13:26:47 -04:00
Joey Hess
4a68abace1
comment 2022-08-09 13:21:58 -04:00
Joey Hess
607c57d66b
comment 2022-08-09 13:06:48 -04:00
Joey Hess
4a5b50fae8
comment 2022-08-09 12:33:24 -04:00
yarikoptic
5595d0ef96 initial report on possible regression due to --dry-run 2022-08-09 13:37:39 +00:00
Atemu
50c4632740 Added a comment 2022-08-09 06:22:50 +00:00
Atemu
007d89f3e9 Added a comment 2022-08-09 06:14:05 +00:00