Commit graph

10978 commits

Author SHA1 Message Date
Joey Hess
fccb51ac09
comment 2021-07-19 10:29:12 -04:00
anarcat
6d4baa4943 Added a comment: same problem on debian bullseye 2021-07-18 02:02:43 +00:00
Atemu
cf708a8871 Added a comment 2021-07-16 22:47:44 +00:00
alt
a4f31f583c Added a comment 2021-07-16 12:37:47 +00:00
jgsuess@732b8c62c50d8595d7b1d58eea11e5019c2308b1
cc36d6e538 2021-07-16 00:32:49 +00:00
Joey Hess
019b91f2a9
fix name 2021-07-15 12:56:44 -04:00
Joey Hess
c63fca74e9
fix syntax 2021-07-15 12:53:03 -04:00
Joey Hess
fd9ea6e1da
forum posts tagged bugreport get moved to the bug list and can be closed 2021-07-15 12:50:08 -04:00
Joey Hess
c952c485c8
Fix retrieval of content from borg repos accessed over ssh
It was making the borgrepo path absolute.. even when it was a ssh
repository.

Made BorgRepo a newtype, to guard against accidentially treating it like a
FilePath.

Sponsored-by: Graham Spencer on Patreon
2021-07-15 12:39:24 -04:00
alt
24041617a4 2021-07-15 07:19:33 +00:00
Joey Hess
274d2380c7
better key matching with a regexp
Handles keys that are substrings of other keys, as well as pointer files
that contain a newline after the key.

Note that -S does not match regexp, while -G does by default. Docs are
not clear, determined experimentally. The only other difference in
changing to -G is that if a file used to contain the key and changed
in some way, while still containing the key, -G will match and -S would
not. So eg, annex links that git annex fix rewrites will match, and
files that change lock status will match. Which is an improvement anyway.

Sponsored-by: Jochen Bartl on Patreon
2021-07-14 16:31:17 -04:00
Joey Hess
8c0ac094ed
minor bug in new whereused 2021-07-14 16:04:54 -04:00
Joey Hess
ca8f39295f
close not a bug 2021-07-13 14:00:19 -04:00
Joey Hess
facf7d1d2e
followup 2021-07-13 13:04:56 -04:00
Joey Hess
8885bd3c5b
addistant: honor annex.delayadd for non-large files
assistant: When adding non-large files to git, honor annex.delayadd
configuration.

Also, don't add non-large files to git when they are still
being written to. This came for free, since the changes to non-large
files get queued up with the ones to large files, and run through the lsof
check.

Sponsored-by: Luke Shumaker on Patreon
2021-07-13 12:17:00 -04:00
Joey Hess
2018cb4a97
comment 2021-07-12 16:00:59 -04:00
yarikoptic
d26c28c5f3 Added a comment 2021-07-12 17:44:58 +00:00
Joey Hess
a6767ca81f
close bug
and mention another aspect of the reversion in changelog
2021-07-12 10:45:57 -04:00
Joey Hess
5faf84c3a7
close as dup 2021-07-12 10:32:19 -04:00
Joey Hess
b2ba8c8aa4
Merge branch 'master' of ssh://git-annex.branchable.com 2021-07-12 10:24:59 -04:00
Joey Hess
0ea263a036
update 2021-07-12 10:24:42 -04:00
yarikoptic
0bb668dcbe Added a comment 2021-07-12 14:17:52 +00:00
Joey Hess
6a581f8b8b
fix init reversion when core.sharedRepository = group
init: Fix misbehavior when core.sharedRepository = group that caused it to
enter an adjusted branch. (Reversion in version 8.20210630)

Commit 4b1b9d7a83 made init call
freezeContent in case there was a hook that could prevent writing in
situations where perms don't. But with the above git config, freezeContent
does not prevent write at all. So init needs to do what freezeContent does
with a non-shared git config.

Or init could check for that config, and skip the probing, since it
won't actually be preventing write to any files. But that would make init
too aware if details of Annex.Perms, and also would break if the git config
were changed after init.

Sponsored-by: Dartmouth College's Datalad project
2021-07-12 10:15:49 -04:00
Joey Hess
215aee105d
commet 2021-07-12 09:57:48 -04:00
Joey Hess
cd37ecb319
followup 2021-07-12 09:45:37 -04:00
Joey Hess
b885007f0e
--debug output goes to stderr again, not stdout
Reversion in version 8.20210428

Sponsored-by: Dartmouth College's Datalad project
2021-07-12 09:40:38 -04:00
yarikoptic
ff5a2e815c initial coarse report on the change in behavior in recent release 2021-07-08 01:42:32 +00:00
yarikoptic
fe1faa17d3 2021-07-07 22:32:08 +00:00
yarikoptic
abe08e3e49 initial report on stdout 2021-07-07 21:57:11 +00:00
Joey Hess
ec809de4b0
comment 2021-07-05 13:19:53 -04:00
Joey Hess
b9db859221
addurl: Avoid crashing when used on beegfs.
Sponsored-by: Dartmouth College's DANDI project
2021-07-05 13:02:40 -04:00
yarikoptic
4c191b2f0f Added a comment 2021-07-04 03:27:20 +00:00
yarikoptic
c381d60f64 allocate to dandi project 2021-07-03 13:44:53 +00:00
Joey Hess
5f0cc72303
comment 2021-07-02 10:42:54 -04:00
yarikoptic
f8f6d692b7 beegfs tests fails 2021-07-01 23:44:25 +00:00
Joey Hess
898a677bce
fix build on windows
Sponsored-by: Dartmouth College's Datalad project
2021-07-01 12:52:33 -04:00
Joey Hess
d9124bb8ce
tag because this is affecting datalad
https://github.com/datalad/datalad/issues/5750
2021-07-01 12:49:32 -04:00
Joey Hess
51335e9aad
comments 2021-07-01 12:45:03 -04:00
Joey Hess
d2c48404a8
assistant: Avoid unncessary git repository repair
In a situation where git fsck gets confused about a commit that is made
while it's running.

Sponsored-by: Graham Spencer on Patreon
2021-06-30 18:00:16 -04:00
Joey Hess
ee2e7c28a6
update 2021-06-30 17:20:15 -04:00
Joey Hess
0ffcfbdca6
bug 2021-06-30 16:44:30 -04:00
Joey Hess
73ccf34763
closing 2021-06-30 11:47:39 -04:00
jwodder
d296fb9693 2021-06-30 13:16:19 +00:00
falsifian
0a9a9c44e7 Added a comment 2021-06-30 00:09:23 +00:00
Atemu
99266d7875 Added a comment 2021-06-29 22:57:39 +00:00
yarikoptic
fe32661cf5 Added a comment 2021-06-29 17:27:35 +00:00
Joey Hess
199391befe
make repair interruption safe
Fixed bug that interrupting git-annex repair (or assistant) while it was
fixing repository corruption would lose objects that were contained in pack
files.

Unpack all pack files and move objects into place *before* deleting the
pack files. The old approach moved the pack files to a temp directory
before unpacking them, which was not interruption safe.

Sponsored-By: Jochen Bartl on Patreon
2021-06-29 13:14:28 -04:00
Joey Hess
a492553eca
some analysis 2021-06-28 15:00:21 -04:00
Joey Hess
26b0895187
close 2021-06-28 13:14:19 -04:00
Joey Hess
34b958144d
close 2021-06-28 13:11:13 -04:00
Joey Hess
d7d9363677
comment 2021-06-28 12:54:41 -04:00
Joey Hess
9cb5ed2446
avoid using cp --reflink=auto on windows
Sponsored-by: Dartmouth College's Datalad project
2021-06-28 12:51:40 -04:00
Joey Hess
0966bd2de4
comment 2021-06-25 13:33:27 -04:00
Joey Hess
df2001aa88
Improve display of errors when transfers fail
Transfers from or to a local git repo could fail without a reason being
given, if the content failed to verify, or if the object file's stat
changed while it was being copied. Now display messages in these cases.

Sponsored-by: Jack Hill on Patreon
2021-06-25 13:17:04 -04:00
Joey Hess
0fe550af75
fix windows build 2021-06-22 09:46:06 -04:00
jwodder
4b93e933db 2021-06-22 13:21:17 +00:00
Joey Hess
a6a6217322
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 2020.

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-2020 --pretty=oneline -- "$f")" -a -z "$(git log --since=01-01-2020 --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-2020 --pretty=oneline -- "$f")" -a -z "$(git log --since=01-01-2020 --pretty=oneline -- "$d")" ]; then git rm -- "./$f" ; git rm -rf "./$d"; fi; fi; done
2021-06-21 13:10:13 -04:00
falsifian
95f685f2ca Added a comment 2021-06-19 23:48:21 +00:00
falsifian
a73624b161 Added a comment 2021-06-19 23:41:25 +00:00
yarikoptic
538780ebaf Added a comment 2021-06-16 21:32:58 +00:00
Ilya_Shlyakhter
afb8c5f078 Added a comment: thanks 2021-06-16 19:54:02 +00:00
yarikoptic
9dfda0899a removed 2021-06-15 15:38:47 +00:00
yarikoptic
35371af3da Added a comment 2021-06-15 15:38:28 +00:00
yarikoptic
5ac6583621 Added a comment 2021-06-15 15:38:16 +00:00
Joey Hess
3af4c9a29a
fix exponential blowup when adding lots of identical files
This was an old problem when the files were being added unlocked,
so the changelog mentions that being fixed. However, recently it's also
affected locked files.

The fix for locked files is kind of stupidly simple. moveAnnex already
handles populating unlocked files, and only does it when the object file
was not already present. So remove the redundant populateUnlockedFiles
call. (That call was added all the way back in
cfaac52b88, and has always been
unncessary.)

Sponsored-by: Dartmouth College's Datalad project
2021-06-15 09:45:55 -04:00
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
Joey Hess
b470673e50
wip 2021-04-21 13:46:39 -04:00
Joey Hess
56478e99ac
bug report 2021-04-21 13:24:32 -04:00
Joey Hess
39d94919cd
reorder tests debugging windows failure
This order will work just as well, so no need to revert this change
later.
2021-04-21 13:01:41 -04:00
Joey Hess
430c5a15f5
update 2021-04-21 12:18:04 -04:00
Joey Hess
85d75b8a18
comment 2021-04-21 12:15:42 -04:00
Joey Hess
752c389849
comment 2021-04-20 11:57:10 -04:00
Joey Hess
fee6504388
fix reversion in recent CoW changes
File handle accidentially left open is both a FD leak and causes the
haskell RTS to reject opening it again with "file is locked".
2021-04-20 11:41:43 -04:00
https://launchpad.net/~r0lf
fa738b8757 2021-04-20 13:49:58 +00:00
https://launchpad.net/~r0lf
617c574c17 2021-04-20 13:46:07 +00:00
Ilya_Shlyakhter
38b9cf7747 Added a comment 2021-04-19 15:38:38 +00:00
yarikoptic
b92a7b1a2f initial report for test fails on windows 2021-04-19 13:43:18 +00:00
pat
e3de27dcc0 2021-04-19 00:09:16 +00:00
Ilya_Shlyakhter
a9bf898e2c removed 2021-04-18 22:03:26 +00:00
Ilya_Shlyakhter
a9eac5c91a Added a comment: semantics of preferred content expressions 2021-04-18 22:03:02 +00:00
pat
081fb751b9 2021-04-18 01:12:07 +00:00
pat
4ae46a6cc7 removed 2021-04-18 00:40:44 +00:00
pat
6bd49887e6 rename forum/Drop_doesn__39__t_respect_mincopies.mdwn to bugs/Drop_doesn__39__t_respect_mincopies.mdwn 2021-04-18 00:39:11 +00:00
Ilya_Shlyakhter
5c15deab0e Added a comment 2021-04-17 22:54:45 +00:00
Ilya_Shlyakhter
a4ebd33074 Added a comment 2021-04-17 22:54:34 +00:00
Ilya_Shlyakhter
0a4614b653 Added a comment: updating the keys database incrementally 2021-04-17 22:23:45 +00:00
Joey Hess
f6933c95cf
comment 2021-04-16 13:54:50 -04:00
yarikoptic
75bd75def2 reporting fresh test fails 2021-04-15 13:04:18 +00:00
Joey Hess
e1a9b79fa6
fix hardcoded origin name in checkAdjustedClone
init: Fix a crash when the repo's was cloned from a repo that had an
adjusted branch checked out, and the origin remote is not named "origin".

The only other hardcoding of the name of origin is in:

- Upgrade.V2, which can be ignored probably
- Annex.Branch, which doesn't fail if it has some other name, but just
  doesn't set up the git-annex branch with quite as linear a history in
  that case.
2021-04-14 18:53:27 -04:00
kyle
4c3d8241ae crippledfilesystem override not needed 2021-04-14 21:26:32 +00:00
kyle
c489b471d5 bug: init crash with remote name other than "origin" 2021-04-14 20:44:23 +00:00
Joey Hess
8e7dc958d2
forget: Preserve currently exported trees
Avoiding problems with exporttree remotes in some unusual circumstances.

This commit was sponsored by Brett Eisenberg on Patreon.
2021-04-13 15:00:23 -04:00
Joey Hess
a58e955293
bug report 2021-04-13 13:31:51 -04:00
Joey Hess
805d325a8d
diffdriver: Support unlocked files 2021-04-08 14:32:09 -04:00
yarikoptic
e1ffa3e10a note on the order 2021-04-08 17:47:22 +00:00
yarikoptic
8f0a3799d0 initial report on diff driver behavior on unlocked files 2021-04-08 17:44:39 +00:00
https://launchpad.net/~r0lf
10c04ed3b1 Added a comment: still an issue in Ubuntu Focal 2021-04-05 01:28:49 +00:00
https://launchpad.net/~r0lf
507b0fa6ea removed 2021-04-05 01:22:24 +00:00
https://launchpad.net/~r0lf
ed30ba4397 Added a comment: still an issue in focal 2021-04-05 01:20:30 +00:00
Joey Hess
370e71aa73
improve man page wording 2021-04-01 12:58:06 -04:00
Joey Hess
8868a3a4c7
Fix build with persistent-2.12.0.1
persistent stopped using askLogFunc, and the thing to use is askLoggerIO
from monad-logger. Bumped the dep to the first version that contained that.

Note that the i386ancient build uses a newer monad-logger than 0.3.10,
so the new versioned dep should not break it, and presumably nothing else
either.

This commit was sponsored by Noam Kremen on Patreon.
2021-04-01 12:21:02 -04:00
nrg@bd619d1ebf16e6324c546adea8be8fe1cc2b4325
3b1088a865 2021-03-31 14:43:28 +00:00
Ilya_Shlyakhter
57cbad31dd Added a comment 2021-03-30 19:17:08 +00:00
Joey Hess
24c576bfa7
Merge branch 'master' of ssh://git-annex.branchable.com 2021-03-30 12:58:34 -04:00
Lukey
01c00717f8 Added a comment 2021-03-30 16:51:53 +00:00
Lukey
6efe5d2931 removed 2021-03-30 16:50:35 +00:00
Lukey
557d718ee3 Added a comment 2021-03-30 16:49:05 +00:00
Joey Hess
4459e04117
comment 2021-03-30 12:48:43 -04:00
Ilya_Shlyakhter
075e209ce2 added bug report re: git-annex-sync succeeding without fetching all files 2021-03-30 15:00:56 +00:00
Joey Hess
91b8121c8d
close 2021-03-29 13:08:22 -04:00
Joey Hess
4611813ef1
Fix bug importing from a special remote into a subdirectory more than one level deep
Which generated unusual git trees that could confuse git merge,
since they incorrectly had 2 subtrees with the same name.

Root of the bug was a) not testing that at all! but also
b) confusing graftdirs, which contains eg "foo/bar" with
non-recursively read trees, which would contain eg "bar"
when reading a subtree of "foo".

It's worth noting that Annex.Import uses graftTree, but it really
shouldn't have needed to. Eg, when importing into foo/bar from a remote,
it's enough to generate a tree of foo/bar/x, foo/bar/y, and does not
include other files that are at the top of the master branch. It uses
graftTree, so it does include the other files, as well as the foo/bar
tree. git merge will do the same thing for both trees. With that said,
switching it away from graftTree would result in another import
generating a new commit that seems to delete files that were there in a
previous commit, so it probably has to keep using graftTree since it
used it before.

This commit was sponsored by Kevin Mueller on Patreon.
2021-03-26 16:04:36 -04:00
Joey Hess
1a8f984634
initial analysis 2021-03-26 14:27:48 -04:00
Joey Hess
f085ae4937
borg: Support importing files that are hard linked in the borg backup
Note that a key with no size field that is hard linked will
result in listImportableContents reporting a file size of 0,
rather than the actual size of the file. One result is that
the progress meter when getting the file will seem to get stuck
at 100%. Another is that the remote's preferred content expression,
if it tries to match against file size, will treat it as an empty file.
I don't see a way to improve the latter behavior, and the former behavior
is a minor enough problem.

This commit was sponsored by Jake Vosloo on Patreon.
2021-03-26 13:29:34 -04:00
Joey Hess
31eb5fddf3
borg: Fix a bug that prevented importing keys of type URL and WORM
Keys stored on the filesystem are mangled by keyFile to avoid problem
chars. So, that mangling has to be reversed when parsing files from a
borg backup back to a key.

The directory special remote also so mangles them. Some other special
remotes do not; eg S3 just serializes the key -- but S3 object names are
not limited to filesystem valid filenames anyway, so a S3 server must
not map them directly to files in any case. It seems unlikely that a
borg backup of some such special remote will get broken by this change.

This commit was sponsored by Graham Spencer on Patreon.
2021-03-26 12:07:00 -04:00
Joey Hess
537f9d9a11
Improved display of errors when accessing a git http remote fails.
New error message:

  Remote foo not usable by git-annex; setting annex-ignore

  http://localhost/foo/config download failed: Configuration of annex.security.allowed-ip-addresses does not allow accessing address ::1

If git config parse fails, or the git config file is not available at the url,
a better error message for that is also shown.

This commit was sponsored by Mark Reidenbach on Patreon.
2021-03-24 14:19:32 -04:00
git-annex@6f13b739194f758abc0b86556b7ce966c1bf3c00
14b846e9fa Added a comment: borg hardlinks 2021-03-24 10:29:16 +00:00
git-annex@6f13b739194f758abc0b86556b7ce966c1bf3c00
d4a3465f8b Added a comment: / vs. % in key 2021-03-24 10:07:30 +00:00
git-annex@6f13b739194f758abc0b86556b7ce966c1bf3c00
cc9d6889e2 2021-03-24 09:44:49 +00:00
Joey Hess
e09560eea2
open a bug based on comment thread 2021-03-23 11:50:07 -04:00
Joey Hess
637229c593
fix fsck --from --all to not fall over trying to check required content
fsck: When --from is used in combination with --all or similar options, do
not verify required content, which can't be checked properly when operating
on keys.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2021-03-22 15:08:07 -04:00
Joey Hess
5545e78a1e
Make --debug also enable debugging in child git-annex processes
Especially necessary with stalldetection using child processes for
transfers.

This commit was sponsored by Jack Hill on Patreon.
2021-03-22 14:25:28 -04:00
Joey Hess
1ddaa6b541
comment 2021-03-22 13:52:11 -04:00
Lukey
25cf5e39df Added a comment 2021-03-22 17:19:37 +00:00
Joey Hess
5d75cbcdcf
webdav: deal with buggy webdav servers in renameExport
box.com already had a special case, since its renaming was known buggy.
In its case, renaming to the temp file succeeds, but then renaming the temp
file to final destination fails.

Then this 4shared server has buggy handling of renames across directories.
While already worked around with for the temp files when storing exports
now being in the same directory as the final filename, that also affected
renameExport when the file moves between directories.

I'm not entirely clear what happens on the 4shared server when it fails
this way. It kind of looks like it may rename the file to destination and
then still fail.

To handle both, when rename fails, delete both the source and the
destination, and fall back to uploading the content again. In the box.com
case, the temp file is the source, and deleting it makes sure the temp file
gets cleaned up. In the 4shared case, the file may have been renamed to the
destination and so cleaning that up avoids any interference with the
re-upload to the destination.
2021-03-22 13:08:18 -04:00
Joey Hess
f175d4cc90
rmurl: remove all forms of an url, no matter what the downloader is set to
* rmurl: When youtube-dl was used for an url, it no longer needs to be
  prefixed with "yt:" in order to be removed.
* rmurl: If an url is both used by the web and also claimed by another
  special remote, fix a bug that caused the url to to not be removed.

The youtube-dl change is a consequence of how the bug fix is implemented.
But I also think it's the right thing to do. Consider that, before,
git-annex addurl $url followed by git-annex rmurl $url would not remove the
url in the case where youtube-dl was used. That was surprising behavior.

In the unlikely case where a special remote claims an url, and it's been
added using OtherDownloader, but it was also added already as a web url,
it seems better for rmurl to remove both than to arbitrarily remove only one.

And in the case the bug report was filed for, when an url was added as a
web url, but a special remote now claims it, that should not prevent rmurl
removing the web url.

Calling setUrlMissing lets other callers of it behave differently.
Probably the calls to it in eg, Remote.External and Remote.BitTorrent are
fine, since they don't mangle the url and just remove what was provided,
and the OtherDownloader form of a bittorrent url, respectively.
I suspect unregisterurl needs to have a similar change made to rmurl, for
similar reasons.
2021-03-22 12:09:15 -04:00
Joey Hess
77d3d4350d
forgot to close this 2021-03-22 11:31:00 -04:00
Joey Hess
ee49bdd410
comment 2021-03-22 10:20:58 -04:00
Joey Hess
5dedaa3efa
close 2021-03-22 10:17:41 -04:00
gerta
4176634d8d Added a comment 2021-03-21 11:56:27 +00:00
Lukey
5a8b9a57a8 Added a comment 2021-03-20 18:28:51 +00:00
Lukey
2021c31be7 Added a comment 2021-03-20 17:33:32 +00:00
gerta
f695a8e128 Bug: Importing into nested directory overwrites files? 2021-03-20 07:29:12 +00:00
Ilya_Shlyakhter
a76f16cd8d added bug report about fsck failing on dead keys missing from require-everything repos 2021-03-18 18:58:27 +00:00
jwrauch
81c51fa538 2021-03-17 18:59:04 +00:00
mih
1886fa420f Added a comment 2021-03-17 17:03:35 +00:00
Joey Hess
b0bf620b2b
comment 2021-03-17 11:29:57 -04:00
yarikoptic
3ae0552b64 Added a comment 2021-03-17 14:56:20 +00:00
Joey Hess
f9e73e23f2
comment 2021-03-17 10:22:38 -04:00
Joey Hess
8c9ab9752b
comment 2021-03-17 09:44:31 -04:00
Joey Hess
db95b94251
Merge branch 'master' of ssh://git-annex.branchable.com 2021-03-17 09:42:27 -04:00
Joey Hess
0e44c252c8
avoid getting creds from environment during autoenable
When autoenabling special remotes of type S3, weddav, or glacier, do not
take login credentials from environment variables, as the user may not be
expecting the autoenable to happen, and may have those set for other
purposes.
2021-03-17 09:41:12 -04:00
mih
f1bff235e6 Added a comment: Works! 2021-03-17 08:20:10 +00:00
Joey Hess
34a49661d4
comment 2021-03-16 15:12:33 -04:00
Joey Hess
69dd214d59
comment 2021-03-16 14:26:41 -04:00
Joey Hess
3337f7c272
fix exporting when the file is in the top of the repo
takeDirectory "foo" is ".", and that will confuse webdav, so only
use that code path when there is a subdirectory.
2021-03-16 14:17:29 -04:00
yarikoptic
4a2d148599 fixed formatting 2021-03-16 17:43:16 +00:00
yarikoptic
ff95449e79 reporting on the negative effect of AWS_ variables for access to public S3 bucket 2021-03-16 17:38:29 +00:00
yarikoptic
681f9e1a0c 2021-03-15 22:50:04 +00:00
0xloem@0bd8a79a57e4f0dcade8fc81d162c37eae4d6730
f9a5a2ec05 2021-03-15 06:45:09 +00:00
mih
4bcab9efbc Added a comment: 4shared-specific issue 2021-03-13 16:26:14 +00:00
mih
a760909a0d Added a comment: Confirm fix 2021-03-13 16:23:36 +00:00
mih
2cbf8226d5 Added a comment: Progress report 2021-03-13 16:19:19 +00:00
mih
55241b7bdf Added a comment: Thx! 2021-03-13 16:05:52 +00:00
Joey Hess
4f49c29d20
webdav: store temp file in same collection as the final export location
This may work better in some webdav server that gets confused at
cross-collection renamed. I don't know, let's find out.

The only real downside of doing this is that the temp files are not all
in the top-level collection, in case an interrupted run leaves one
behind. But that does not seem especially significant.
2021-03-12 14:52:24 -04:00
Joey Hess
6481991208
export --json: Fill in the file field
Like import was using ActionItemWorkTreeFile, it's ok to use it for export,
even though it might not correspond with a file in the work tree.
And renamed it to ActionItemTreeFile to make that clearer.

Note that when an export has to rename files, it still uses
ActionItemOther, so file will still be null in that case, but as no file is
being transferred, that seems ok.
2021-03-12 14:11:31 -04:00
Joey Hess
f87c63d998
Merge branch 'master' of ssh://git-annex.branchable.com 2021-03-12 13:33:48 -04:00
Joey Hess
1cb154f457
avoid importing deleting submodule
import: When the previously exported tree contained a submodule,
preserve it in the imported tree so it does not get deleted.

The export exclude log, which was used for non-preferred content,
now also includes the submodules. Since the log format is git ls-tree
output, this does not break backwards compatibility.
2021-03-12 13:31:21 -04:00
mih
6396da95e9 2021-03-12 17:13:29 +00:00
Joey Hess
f2a425bd92
export: When a submodule is in the tree to be exported, skip it. 2021-03-12 12:29:18 -04:00
Joey Hess
f6a6148baf
comment 2021-03-12 12:02:06 -04:00
mih
d934a4f4f8 2021-03-12 12:24:46 +00:00
mih
58413168d4 2021-03-12 11:00:53 +00:00
mih
58db7bb16d 2021-03-12 09:33:24 +00:00
Joey Hess
1d7fa63149
Added support for git-remote-gcrypt's rsync URIs
Which access a remote using rsync over ssh, and which git pushes to much
more efficiently than ssh urls.

There was some old partial support for rsync URIs from 2013, but it seemed
incomplete, and did not use rsync over ssh. Weird.

I'm not sure if there's any remaining benefit to using the non-rsync url
forms with gcrypt, now that this is implemented? Updated docs to encourage
using the rsync urls.

This commit was sponsored by Svenne Krap on Patreon.
2021-03-09 15:58:09 -04:00
Joey Hess
15891441f1
close 2021-03-09 14:00:11 -04:00
Joey Hess
1facddbfae
close long-fixed bug 2021-03-09 13:58:22 -04:00
Joey Hess
e07eabbf7f
Fix support for local gcrypt repositories with a space in their URI
Git.Remote.parseRemoteLocation had a hack to handle URIs that contained
characters like spaces, which is something git unfortunately allows
despite not being a valid URI. However, that hack looked for "//" to
guess something was an URI, and these gcrypt URIs, being to a local
path, don't contain that. So instead escape all illegal characters and
check if the resulting thing is an URI.

And that was already done by Git.Construct.fromUrl, so
internally the gcrypt URI with a space looks like "gcrypt::foo%20bar"
and that needs to be de-escaped when converting back from URI to local
repo path.

This change might also allow a few other almost-valid URIs to be handled
as URIs by git-annex. None that contain "//" will change, and any
behavior change should result in git-annex doing closer to a right thing
than it did before, probably.

This commit was sponsored by Noam Kremen on Patreon.
2021-03-09 12:49:51 -04:00
Joey Hess
d3578f3b66
close as dup 2021-03-09 11:48:41 -04:00
tomdhunt
3639ce1a99 2021-03-08 19:07:19 +00:00
tomdhunt
55f7eae066 2021-03-08 18:40:10 +00:00
Joey Hess
deac6f12b5
forgot to add this comment earlier 2021-03-05 12:40:39 -04:00
kyle
324f2c06c5 Added a comment: thanks 2021-03-02 20:51:53 +00:00
Joey Hess
a14001785e
fix --branch combined with --unlocked or --locked
Since it's using git ls-tree anyway, can just look at the file modes to see
if they're unlocked or are symlinks.
2021-03-02 13:47:27 -04:00
Joey Hess
25e4ab7e81
Prevent combinations of options such as --all with --include
Previously such nonsensical combinations always treated the matching option
as if it didn't match.

For now, made find --branch refuse matching options that need a
filename, because one is not provided to them in a way they'll use.
There's an open bug report to support it, but making it error out is
better than the old behavior of not finding what it was asked to.

Also, made --mimetype combined with eg --all work, by looking at the
object file when operating on keys.
2021-03-01 16:25:23 -04:00
Joey Hess
7a089f05b2
move comment to correct bug 2021-03-01 15:24:21 -04:00
Joey Hess
0482424fad
analysis 2021-03-01 13:36:18 -04:00
arelius@a7e47ae13cb3452464261e3a99bfe6d2c25895fd
c802c0685e Added a comment 2021-02-25 21:46:22 +00:00
kyle
6a98e69f2f 2021-02-24 22:37:06 +00:00
Joey Hess
61c3797dd5
comment and close not a bug 2021-02-24 13:31:19 -04:00
Joey Hess
0c90ccc40c
retitle 2021-02-24 13:16:03 -04:00
Joey Hess
0f09185683
comment 2021-02-24 13:15:58 -04:00
m15
c98b3cde6c 2021-02-24 10:44:02 +00:00
arelius@a7e47ae13cb3452464261e3a99bfe6d2c25895fd
7bf0f95f38 2021-02-24 04:52:39 +00:00
arelius@a7e47ae13cb3452464261e3a99bfe6d2c25895fd
def4ac2f90 Added a comment 2021-02-24 04:32:08 +00:00
arelius@a7e47ae13cb3452464261e3a99bfe6d2c25895fd
c3ab606dd6 2021-02-24 04:30:59 +00:00
Atemu
5e5829a8d4 2021-02-23 15:16:50 +00:00
Joey Hess
530e96b80e
fix unannex data overwrite bug
unannex, uninit: When an annexed file is modified, don't overwrite the
modified version with an older version from the annex

This commit was sponsored by Mark Reidenbach on Patreon.
2021-02-22 13:35:00 -04:00
Joey Hess
224bc7579b
bug report 2021-02-22 13:03:22 -04:00
Joey Hess
dd97017246
Merge branch 'master' of ssh://git-annex.branchable.com 2021-02-22 12:40:06 -04:00
Joey Hess
3ba349eec3
comment 2021-02-22 12:38:34 -04:00
EvanDeaubl
abb70e83dd Added a comment: One possible workaround 2021-02-22 16:23:41 +00:00
zsolt1
4381ad636e Added a comment 2021-02-21 18:11:36 +00:00
Lukey
4f63f0d162 Added a comment 2021-02-20 21:35:10 +00:00
zsolt1
0f68eed33c Added a comment: reproduce 2021-02-20 19:06:45 +00:00
zsolt1
c71f005889 2021-02-20 19:02:26 +00:00
Joey Hess
48310f2d55
windows build fix from jwodder 2021-02-15 13:35:01 -04:00
falsifian
4407ade4c3 Added a comment 2021-02-12 03:52:39 +00:00
jwodder
80ec124fb0 2021-02-11 16:06:00 +00:00
jwodder
69f2fb7a23 2021-02-11 16:04:20 +00:00
Joey Hess
f36a0c1b13
deal with cabal unpack not preserving execute bit 2021-02-08 14:32:24 -04:00
Joey Hess
3a66cd715f
avoid making absolute git remote path relative
When a git remote is configured with an absolute path, use that path,
rather than making it relative. If it's configured with a relative path,
use that.

Git.Construct.fromPath changed to preserve the path as-is,
rather than making it absolute. And Annex.new changed to not
convert the path to relative. Instead, Git.CurrentRepo.get
generates a relative path.

A few things that used fromAbsPath unncessarily were changed in passing to
use fromPath instead. I'm seeing fromAbsPath as a security check,
while before it was being used in some cases when the path was
known absolute already. It may be that fromAbsPath is not really needed,
but only git-annex-shell uses it now, and I'm not 100% sure that there's
not some input that would cause a relative path to be used, opening a
security hole, without the security check. So left it as-is.

Test suite passes and strace shows the configured remote url is used
unchanged in the path into it. I can't be 100% sure there's not some code
somewhere that takes an absolute path to the repo and converts it to
relative and uses it, but it seems pretty unlikely that the code paths used
for a git remote would call such code. One place I know of is gitAnnexLink,
but I'm pretty sure that git remotes never deal with annex symlinks. If
that did get called, it generates a path relative to cwd, which would have
been wrong before this change as well, when operating on a remote.
2021-02-08 13:18:01 -04:00