Commit graph

41820 commits

Author SHA1 Message Date
Joey Hess
cb9cf30c48
move several readonly values to AnnexRead
This improves performance to a small extent in several places.

Sponsored-by: Tobias Ammann on Patreon
2022-06-28 15:40:19 -04:00
Joey Hess
4174ee33a4
avoid needing StarIsType extension
Got a deprecation warning suggesting this change. Data.Kind
is available since base-4.9.0.0 and git-annex depends on a newer base.
2022-06-28 15:17:41 -04:00
Joey Hess
f7c7a5ca7e
remove redundant patern match 2022-06-28 15:12:32 -04:00
Joey Hess
d2bc268317
lts-19.13 (ghc 9.0.2) 2022-06-28 14:49:33 -04:00
Joey Hess
655235319b
comment 2022-06-28 13:04:41 -04:00
Joey Hess
53a4de4968
close 2022-06-28 12:58:00 -04:00
Joey Hess
d78cb5e5cc
comment and retitle 2022-06-28 12:35:08 -04:00
Joey Hess
a9c531b867
Merge branch 'master' of ssh://git-annex.branchable.com 2022-06-28 12:28:57 -04:00
Joey Hess
a0a0ec51dd
comment 2022-06-28 12:27:48 -04:00
Joey Hess
a153480667
comments 2022-06-28 12:22:32 -04:00
contr-error
14c113fe0e add bug 2022-06-28 10:03:57 +00:00
Soxofaan
6a58fd3626 Added a comment: Same problem 2022-06-26 21:53:39 +00:00
Atemu
4517e9e41c Added a comment: Still useful 2022-06-25 16:36:38 +00:00
Atemu
5df133c457 2022-06-25 16:20:39 +00:00
Joey Hess
3e79e3a116
add news item for git-annex 10.20220624 2022-06-23 13:59:52 -04:00
Joey Hess
17e4081d4e
remove 2022-06-23 13:58:42 -04:00
Joey Hess
c1b9ea2759
The 23 never happened release.
It's 24 somewhere..
2022-06-23 13:55:54 -04:00
Joey Hess
d137bd4c29
fix typo
Recent commit got amended accidentially to include this typo. Argh. It
was fine, then I tweakd the commit message and accidentially staged this
breakage.
2022-06-23 13:54:34 -04:00
Joey Hess
2265d9dad7
add news item for git-annex 10.20220623 2022-06-23 13:36:06 -04:00
Joey Hess
57d088e9c2
fix release version 2022-06-23 13:35:14 -04:00
Joey Hess
a83d249d40
Merge branch 'master' of ssh://git-annex.branchable.com 2022-06-23 13:31:50 -04:00
Joey Hess
65e86ed167
add news item for git-annex 10.20220526 2022-06-23 13:31:44 -04:00
Joey Hess
86968a4047
releasing package git-annex version 10.20220526 2022-06-23 13:31:36 -04:00
Joey Hess
9562da790f
add rent optimisation inhibitor
As outlined in my blog post, I object to Microsoft training their Copilot
model on my code, and believe it likely violates my copyright.
https://joeyh.name/blog/entry/a_bitter_pill_for_Microsoft_Copilot/

While I never push git-annex to Github, other users choose to. And since
Microsoft is now selling access to Copilot to anyone, this situation is
escalating.
2022-06-23 13:13:54 -04:00
Joey Hess
9db1751802
add rent optimisation inhibitor
As outlined in my blog post, I object to Microsoft training their Copilot
model on my code, and believe it likely violates my copyright.
https://joeyh.name/blog/entry/a_bitter_pill_for_Microsoft_Copilot/

While I never push git-annex to Github, other users choose to. And since
Microsoft is now selling access to Copilot to anyone, this situation is
escalating.
2022-06-23 13:05:05 -04:00
Joey Hess
aad362e1c4
remove vendored library no longer used
http-manager-restricted is used for a while, but I forgot to delete this
file when making that change.
2022-06-23 12:35:26 -04:00
Joey Hess
debcf86029
use RawFilePath version of rename
Some small wins, almost certianly swamped by the system calls, but still
worthwhile progress on the RawFilePath conversion.

Sponsored-by: Erik Bjäreholt on Patreon
2022-06-22 16:47:34 -04:00
Joey Hess
d00e23cac9
RawFilePath optimisations 2022-06-22 16:20:08 -04:00
Joey Hess
224a57f9ed
RawFilePath optimisation 2022-06-22 16:11:03 -04:00
Joey Hess
95a04920cf
remove objectDir' 2022-06-22 16:08:49 -04:00
Joey Hess
f80ec74128
RawFilePath optimisation 2022-06-22 16:08:26 -04:00
Joey Hess
e5c418b99c
convert bug to todo 2022-06-22 14:23:46 -04:00
Joey Hess
b5f9923927
Merge branch 'master' of ssh://git-annex.branchable.com 2022-06-22 13:54:57 -04:00
Joey Hess
af1a45c69c
use replaceWorkTreeFile when fixing an annex symlink
This does not change any behavior, but it's useful for all worktree
changes to be made using this.

Sponsored-by: Graham Spencer on Patreon
2022-06-22 13:41:41 -04:00
Joey Hess
cfc65ee9fc
followup 2022-06-22 13:19:35 -04:00
Atemu
c6b1121088 Added a comment 2022-06-22 12:34:45 +00:00
Atemu
c5f86397cd Added a comment 2022-06-22 12:24:22 +00:00
Ryan
82dafbf189 2022-06-21 18:28:09 +00:00
arshitha
87751092fd removed 2022-06-17 11:13:27 +00:00
arshitha
8a78789802 Added a comment 2022-06-17 09:44:28 +00:00
Joey Hess
1ddaf7a27f
decided this is not a problem 2022-06-15 14:00:56 -04:00
Joey Hess
f259be7f39
fix overwrite race with small file that got large
When adding a small file, it does not get locked down, so can be modified
after git-annex checks that it's small. The use of queued git add made the
race window nice and wide too.

Fixed by checking if the file has changed, and by not using git add.
Instead, have to recapitulate git add's handling of things like symlinks
and executable files.

Sponsored-by: Jochen Bartl on Patreon
2022-06-14 16:38:56 -04:00
Joey Hess
56e095aaf4
Merge branch 'master' of ssh://git-annex.branchable.com 2022-06-14 14:56:16 -04:00
yarikoptic
60a02af856 Added a comment: hold it... ;) 2022-06-14 18:47:25 +00:00
Joey Hess
78a3d44ea0
get rid of racy addLink
The remaining callers all did not rely on it checking gitignore, so were
easy to convert.

They were susceptable to the same overwrite race as add and fix,
although less likely to have it and a narrower window than add's race.

Command.Rekey in passing got an unncessary call to removeFile deleted.
addSymlink handles deleting any existing worktree file.
2022-06-14 14:47:15 -04:00
Joey Hess
7ace804d8e
avoid writing same symlink twice in a row
Oddly, the second write did not cause it to lose the mtime inherited
from the file being added, although the mtime was not provided to that
write but only to the first. I don't quite know why that worked before!
2022-06-14 14:30:12 -04:00
Joey Hess
64c7f60f7a
fixed overwrite race with git-annex fix
Similar to git-annex add, git-annex fix queued git add, so if a file
got modified before git add ran, the wrong content would be staged,
perhaps a large file content.

Sponsored-by: Brock Spratlen on Patreon
2022-06-14 14:19:58 -04:00
Joey Hess
e47219bcb5
bug report 2022-06-14 14:13:48 -04:00
Joey Hess
5ef79125ad
fix overwrite race with git-annex add of annex symlink
In the unlikely case where git-annex add is run on an annex symlink that
is not already added, and while it's processing it, the annex symlink is
overwritten with something else, avoid git-annex overwriting that with
the symlink again.

Sponsored-by: Jack Hill on Patreon
2022-06-14 14:00:13 -04:00
Joey Hess
dd6dec4eb1
fix add overwrite race with git-annex add to annex
This is not a complete fix for all such races, only the one where a
large file gets changed while adding and gets added to git rather than
to the annex.

addLink needs to go away, any caller of it is probably subject to the
same kind of race. (Also, addLink itself fails to check gitignore when
symlinks are not supported.)

ingestAdd no longer checks gitignore. (It didn't check it consistently
before either, since there were cases where it did not run git add!)
When git-annex import calls it, it's already checked gitignore itself
earlier. When git-annex add calls it, it's usually on files found
by withFilesNotInGit, which handles checking ignores.

There was one other case, when git-annex add --batch calls it. In that
case, old git-annex behaved rather badly, it would seem to add the file,
but git add would later fail, leaving the file as an unstaged annex symlink.
That behavior has also been fixed.

Sponsored-by: Brett Eisenberg on Patreon
2022-06-14 13:37:19 -04:00