Commit graph

4935 commits

Author SHA1 Message Date
matrss
acdefd77a6 Added a comment 2025-01-29 09:56:13 +00: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
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
yarikoptic
d625ccdce4 allocate this development to openneuro - we need to curate/process datasets from/for openneuro on discovery 2025-01-10 17:27:23 +00:00
Joey Hess
bd5d782c90
comment 2025-01-10 12:49:11 -04:00
yarikoptic
2a935fb05c Added a comment 2025-01-10 03:20:32 +00:00
Joey Hess
de62975065
comment 2025-01-09 14:23:51 -04:00
Joey Hess
4faf2b7bec
close 2025-01-07 16:06:00 -04:00
Joey Hess
5d2aaafa6c
git-remote-annex enableremote to support readonly webdav
* Allow enableremote of an existing webdav special remote that has
  read-only access.
* git-remote-annex: Use enableremote rather than initremote.
2025-01-07 15:57:38 -04:00
Joey Hess
dcc259f940
tag INM7
based on mih filing or commenting on things and/or on
git-remote-annex being used
2025-01-07 15:52:20 -04:00
Joey Hess
f763868f5e
comment 2025-01-07 14:39:06 -04:00
Joey Hess
97773051a4
comment 2025-01-07 14:28:24 -04:00
Joey Hess
8bc88945e9
Merge branch 'master' of ssh://git-annex.branchable.com 2025-01-07 13:21:49 -04:00
Joey Hess
3a788c8d0b
todo from forum post 2025-01-07 13:00:32 -04:00
yarikoptic
0a63c9c302 Added a comment 2025-01-07 16:09:31 +00:00
yarikoptic
6534a6da63 initial idea on git annex init hooks 2025-01-07 14:55:52 +00:00
Doable8234
23c8409353 Added a comment 2025-01-07 02:11:33 +00:00
yarikoptic
d55981d49f removed 2025-01-06 23:39:56 +00:00
yarikoptic
654827d746 Added a comment: may be %dotgit? 2025-01-06 23:38:55 +00:00
yarikoptic
e5f464efcc Added a comment: may be %dotgit? 2025-01-06 23:38:39 +00:00