Commit graph

4969 commits

Author SHA1 Message Date
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
yarikoptic
4e04d35ad5 initial report on encfs and per-repository ssh caching 2025-01-05 01:35:01 +00:00
yarikoptic
c47ba6e516 initial report on encfs and per-repository ssh caching 2025-01-05 00:59:40 +00:00
yarikoptic
ccecde3662 initial report on encfs and per-repository ssh caching 2025-01-05 00:56:51 +00:00
Joey Hess
ecc8162203
VURL verifyKeyContent True when there are no recorded equivkeys
Avoid verification error when addurl --verifiable is used with an url
claimed by a special remote other than the web.
2025-01-03 17:24:30 -04:00
Joey Hess
0815c82bb1
log: Support --key, as well as --branch and --unused
--all remains a special case, since it is more efficient and displays in a
nicer order.

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
2025-01-03 15:45:42 -04:00
Joey Hess
2fe36b35a2
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 2024.

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-2024 --pretty=oneline -- "$f")" -a -z "$(git log --since=01-01-2024 --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-2024 --pretty=oneline -- "$f")" -a -z "$(git log --since=01-01-2024 --pretty=oneline -- "$d")" ]; then git rm -- "./$f" ; git rm -rf "./$d"; fi; fi; done
2025-01-01 13:09:36 -04:00
lell
4a92f1a7f5 2024-12-20 09:29:28 +00:00
lell
fbca737651 2024-12-20 09:29:10 +00:00
psxvoid
7969188bb2 Added a comment: update 4: union is correct 2024-12-20 07:27:43 +00:00
psxvoid
6fd9e7686d Added a comment: update 3: strange union behavior 2024-12-20 07:12:59 +00:00
psxvoid
6ead6e360d Added a comment: update: unset directory is cool feature, but not always work 2024-12-20 06:52:57 +00:00
psxvoid
4c54253132 Added a comment: unset directory is cool feature, but not always work 2024-12-19 17:49:52 +00:00
Joey Hess
d431762c48
close since --include works 2024-12-18 19:44:25 -04:00
Joey Hess
c035ff7c27
comments 2024-12-18 15:20:44 -04:00
Joey Hess
6d34a0b19d
fix comment display 2024-12-18 12:00:44 -04:00
Doable8234
fd41b4c53e Added a comment 2024-12-16 08:24:32 +00:00