Commit graph

4952 commits

Author SHA1 Message Date
Joey Hess
a2fa2a8c5f
update 2025-02-19 16:03:34 -04:00
Joey Hess
2f11c65491
comments 2025-02-19 15:14:52 -04:00
Joey Hess
e8b00faea8
Merge branch 'master' into ospath 2025-02-14 16:28:43 -04:00
Joey Hess
e6e69f8f93
draft 2025-02-13 16:12:07 -04:00
Joey Hess
bf6446528d
comment 2025-02-13 13:51:21 -04:00
Joey Hess
2ff0adba0b
comment 2025-02-13 13:01:15 -04:00
Joey Hess
bab26da74b
Merge branch 'master' into ospath 2025-02-11 16:56:17 -04:00
Joey Hess
90eb1e2da6
update todo 2025-02-11 13:01:13 -04:00
thk
09d47726b7 Added a comment: iroh 2025-02-08 06:56:32 +00:00
Joey Hess
a03c609268
Merge branch 'master' into ospath 2025-01-30 15:07:17 -04:00
Joey Hess
c3e6cbb432
update 2025-01-30 15:06:37 -04:00
Joey Hess
94e177db9d
document a SNAFU 2025-01-29 19:04:13 -04:00
Joey Hess
cbb6df35aa
merge in doc changes from master 2025-01-29 18:57:25 -04:00
Joey Hess
76bff3e8d1
Merge branch 'master' into ospath 2025-01-29 14:29:34 -04:00
matrss
1e0a48fad0 Added a comment 2025-01-29 10:13:59 +00:00
matrss
acdefd77a6 Added a comment 2025-01-29 09:56:13 +00:00
Joey Hess
917c43f31f
Merge /home/joey/tmp/git-annex into ospath 2025-01-28 15:29:58 -04:00
Joey Hess
da9ca7475e
comment 2025-01-28 11:57:03 -04:00
Joey Hess
67034a02ea
update 2025-01-28 11:38:04 -04:00
Joey Hess
4f0e64b6de
update 2025-01-28 11:36:02 -04:00
Joey Hess
24d5dbe30b
comment 2025-01-28 11:12:02 -04:00
Joey Hess
6fb1dd6afa
comment 2025-01-28 10:28:35 -04:00
Joey Hess
0529f9a84a
Merge branch 'master' of ssh://git-annex.branchable.com 2025-01-27 12:23:13 -04:00
Joey Hess
754c0a001b
comment 2025-01-27 12:19:16 -04:00
matrss
7adf1f45fa Added a comment 2025-01-27 15:26:15 +00:00
Joey Hess
02c792b724
thoughts 2025-01-27 10:37:35 -04:00
Joey Hess
71206a8603
update comment 2025-01-27 10:25:55 -04:00
Joey Hess
b61d316c36
fix link 2025-01-27 09:35:33 -04:00
Joey Hess
f9d42c37c0
more OsPath conversion
Finally reached Annex code in this conversion.

Sponsored-by: Graham Spencer
2025-01-25 10:54:51 -04:00
Joey Hess
c1ecb80716
update 2025-01-23 10:27:18 -04:00
Joey Hess
77e9781ae2
parsePOSIXTime ByteString conversion
Some easy (though tiny) speed wins.

Sponsored-by: Luke T. Shumaker on Patreon
2025-01-22 16:42:09 -04:00
Joey Hess
6e27b0d4d1
convert from readFileStrict
This removes that function, using file-io readFile' instead.

Had to deal with newline conversion, which readFileStrict does on
Windows. In a few cases, that was pretty ugly to deal with.

Sponsored-by: Kevin Mueller
2025-01-22 16:20:36 -04:00
Joey Hess
9b79f0f43d
use file-io for readFile/writeFile/appendFile on ByteStrings
These are all straightforward, and easy small performance wins.

Sponsored-by: Nicholas Golder-Manning
2025-01-22 14:30:25 -04:00
Joey Hess
90cd3aad37
RawFilePath conversion for replaceFile
Sponsored-by: Joshua Antonishen
2025-01-22 13:37:26 -04:00
Joey Hess
793ddecd4b
use openTempFile from file-io
And follow-on changes.

Note that relatedTemplate was changed to operate on a RawFilePath, and
so when it counts the length, it is now the number of bytes, not the
number of code points. This will just make it truncate shorter strings
in some cases, the truncation is still unicode aware.

When not building with the OsPath flag, toOsPath . fromRawFilePath and
fromRawFilePath . fromOsPath do extra conversions back and forth between
String and ByteString. That overhead could be avoided, but that's the
non-optimised build mode, so didn't bother.

Sponsored-by: unqueued
2025-01-22 11:41:43 -04:00
Joey Hess
1faa3af9cd
add file-io to build-depends when building with OsPath flag
Partly converted code to use functions from it, though more remain
unconverted. Most of withFile and openFile now use it.
2025-01-21 14:26:04 -04:00
Joey Hess
1ceece3108
RawFilePath conversion of System.Directory
By using System.Directory.OsPath, which takes and returns OsString,
which is a ShortByteString. So, things like dirContents currently have the
overhead of copying that to a ByteString, but that should be less than
the overhead of using Strings which often in turn were converted to
RawFilePaths.

Added Utility.OsString and the OsString build flag. That flag is turned
on in the stack.yaml, and will be turned on automatically by cabal when
built with new enough libraries. The stack.yaml change is a bit ugly,
and that could be reverted for now if it causes any problems.

Note that Utility.OsString.toOsString on windows is avoiding only a
check of encoding that is documented as being unlikely to fail. I don't
think it can fail in git-annex; if it could, git-annex didn't contain
such an encoding check before, so at worst that should be a wash.
2025-01-20 19:17:33 -04:00
Joey Hess
8d80b07f5a
update 2025-01-20 14:20:35 -04:00
Joey Hess
fbdf640b09
update 2025-01-20 13:58:14 -04:00
Joey Hess
836f58cbc7
comment 2025-01-15 19:13:15 -04:00
Joey Hess
42d55bc57c
pre-init config and hook
Added annex.pre-init-command git config and pre-init-annex hook that is run
before git-annex repository initialization.

This can block initialization. Or it can preform pre-initialization
configuration or tweaking.

I left stdio connected while it's running, so it could also be used for
interactive prompting conceivably, although that would want to use /dev/tty
anyway probably in order to not pollute the stdout of a command when
automatic initialization is done.

Sponsored-by: Dartmouth College's OpenNeuro project
2025-01-13 14:22:49 -04:00
Joey Hess
9e95556d69
comment 2025-01-13 13:32:46 -04:00
Joey Hess
1e8c1dc64e
update 2025-01-13 13:26:36 -04:00
Joey Hess
f3e0216fb0
comment 2025-01-13 13:14:54 -04:00
Joey Hess
583e7ccb21
Merge branch 'master' of ssh://git-annex.branchable.com 2025-01-13 13:11:49 -04:00
Joey Hess
580c11cf19
todo
kind of a bug, but I'm not sure if it can be fixed
2025-01-13 13:04:38 -04:00
yarikoptic
7ada233ea6 Added a comment 2025-01-10 20:27:49 +00:00
Joey Hess
65c1fceef3
Merge branch 'master' of ssh://git-annex.branchable.com 2025-01-10 14:55:00 -04:00
Joey Hess
a73fa77417
added hooks corresponding to annex.*-command
* Added freezecontent-annex and thawcontent-annex hooks that
  correspond to the git configs annex.freezecontent and
  annex.thawcontent.
* Added secure-erase-annex hook that corresponds to the git config
  annex.secure-erase-command.
* Added commitmessage-annex hook that corresponds to the git config
  annex.commitmessage-command.
* Added http-headers-annex hook that corresponds to the git config
  annex.http-headers-command.
  that correspond to the post-update-annex and pre-commit-annex hooks.

The use case for these is eg, setting up a git repository that is run in a
container, where the easiest way to provide a script is by putting it in
.git/hooks/, rather than copying it into the container in a way that puts
it in PATH.

This is all the ones that make sense to add for annex.*-config git configs.
annex.youtube-dl-command is not a hook, it's telling git-annex what command
to run. So is annex.shared-sop-command. So omitted those.

May later also want to add hooks corresponding to
`remote.<name>.annex-cost-command` etc.

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
2025-01-10 14:54:42 -04:00
yarikoptic
60b11cb151 Added a comment: on the init hook 2025-01-10 17:33:15 +00:00