Commit graph

46718 commits

Author SHA1 Message Date
Atemu
2d6b31713a Added a comment 2025-01-26 02:54:18 +00:00
Atemu
3ad4096686 Added a comment 2025-01-26 02:36:51 +00:00
Joey Hess
c64731f16a
more OsPath conversion 2025-01-25 11:56:35 -04:00
Joey Hess
5bca78b813
OsPath conversion
Decent win in exportDirectories, since it operates on ShortByteString
end to end now without needing conversion. That made it worth
implementing an OsPath specific code path there.

And ExportLocation already being a ShortByteString is an good example of why
it's a good thing that OsPath uses that!

Sponsored-by: k0ld on Patreon
2025-01-25 11:53:47 -04:00
Joey Hess
0cfeea5baf
Merge branch 'master' into ospath 2025-01-25 10:57:13 -04:00
Joey Hess
635749c104
Merge branch 'master' of ssh://git-annex.branchable.com 2025-01-25 10:57:07 -04:00
Joey Hess
c058c903c8
windows build fix 2025-01-25 10:56:54 -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
jnkl
9d122a8ff5 2025-01-25 12:00:20 +00:00
jnkl
07a726e0fe Added a comment 2025-01-25 11:49:29 +00:00
Joey Hess
51a6cd1ee6
Merge branch 'master' into ospath 2025-01-24 16:33:36 -04:00
Joey Hess
3474aca3fc
another windows build fix 2025-01-24 16:33:26 -04:00
Joey Hess
f3539efc16
more OsPath conversion
Sponsored-by: Leon Schuermann
2025-01-24 16:31:14 -04:00
Joey Hess
ee0964e61b
Merge branch 'master' into ospath 2025-01-24 15:13:37 -04:00
Joey Hess
f16604d2c8
more windows and osx build fixes 2025-01-24 15:13:20 -04:00
Joey Hess
aa0f3f31da
more OsPath conversion
Sponsored-by: Eve
2025-01-24 15:02:29 -04:00
Joey Hess
dd01406018
Merge branch 'master' into ospath 2025-01-24 13:46:34 -04:00
Joey Hess
4ba1057836
more windows and osx build fixes 2025-01-24 13:46:13 -04:00
Joey Hess
c412c59ecd
more OsPath conversion
About 1/10th done with this I think.
2025-01-24 13:40:44 -04:00
Joey Hess
8021d22955
Merge branch 'master' into ospath 2025-01-24 12:02:35 -04:00
Joey Hess
639d19dbd1
Merge branch 'master' of ssh://git-annex.branchable.com 2025-01-24 11:39:43 -04:00
Joey Hess
f0b9b46cb2
windows and osx build fixes for recent ByteString conversion work 2025-01-24 11:39:33 -04:00
Joey Hess
f0c206cea6
avoid build warning on windows 2025-01-24 11:33:50 -04:00
Joey Hess
21731b7d3a
remove a few unused imports on windows 2025-01-24 11:32:26 -04:00
beryllium@5bc3c32eb8156390f96e363e4ba38976567425ec
f1b64f0415 Added a comment 2025-01-24 08:04:27 +00:00
yarikoptic
103ec0123f Added a comment 2025-01-23 21:33:26 +00:00
Joey Hess
ea775baccd
more OsPath conversion
Git.Types now uses it, as does TopFilePath, making for plenty of new
compile errors needing fixing.

Sponsored-by: Brock Spratlen
2025-01-23 16:15:00 -04:00
yarikoptic
e8f984598a complaining about dead 2025-01-23 16:12:18 +00:00
yarikoptic
f0b5fce5ab Added a comment 2025-01-23 15:53:39 +00:00
Joey Hess
12660314f1
continue conversion
Add Utility.OsString, with a special case for length.
2025-01-23 11:46:35 -04:00
Joey Hess
c3c8870752
add System.FilePath to this conversion
It seems to make sense to convert both System.Directory and
System.FilePath uses to OsPath in one go. This will generally look like
replacing RawFilePath with OsPath in type signatures, and will be driven
by the now absolutely massive pile of compile errors.

Got a few modules building in this new regime.

Sponsored-by: Jack Hill
2025-01-23 11:07:29 -04:00
Joey Hess
c1ecb80716
update 2025-01-23 10:27:18 -04:00
Joey Hess
05bdce328d
start converting from System.Directory to System.OsPath
This is the start of a long road, got the first few files to compile
after this large change.

Sponsored-by: mycroft
2025-01-23 10:25:20 -04:00
Joey Hess
d46504e51e
response 2025-01-22 16:48:51 -04:00
Joey Hess
f41054b108
Merge branch 'master' of ssh://git-annex.branchable.com 2025-01-22 16:42:50 -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
d3de3c28eb
fix reversion
af3b9cbd36 lost takeFileName, breaking the
test suite
2025-01-22 16:28:54 -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
de1af273e0
fix reversion
In 793ddecd4b, writeSshConfig was made to
writeFile a ByteString, which lost the newline conversion on Windows.

Added linesFile to fix it. This will also be useful for other writeFile
conversions.
2025-01-22 15:32:21 -04:00
Joey Hess
7a94ba1bf2
convert from readFileStrict
In cases where it reads lines, which needs newline conversion on
windows.
2025-01-22 15:23:33 -04:00
Joey Hess
60d0dc9c76
convert from readFileStrict
More of these still to convert, but need to be careful of newline
translation.
2025-01-22 14:49:31 -04:00
Joey Hess
c5fe457e01
fix reversion
793ddecd4b made installWrapper not do
newline conversion on windows.
2025-01-22 14:42:27 -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
af3b9cbd36
simplify replaceFile using relatedTemplate
Now that truncateFilePath and relatedTemplate have both been optimised,
may as well use them in replaceFile, rather than the custom hack it
used.

Removed the windows-specific ifdef as well, because on Windows long
filepaths no longer really a problem, since ghc and git-annex use UNC
converted paths.

replaceFile no longer checks fileNameLengthLimit. That took a syscall,
and since we have an existing file, we know filenames of its length are
supported by the filesystem. Assuming that the withOtherTmp directory is
on the same filesystem as the file replaceFile is being called on, which
I believe it is.

Sponsored-by: Leon Schuermann
2025-01-22 13:25:06 -04:00
Joey Hess
f17ec601c4
optimize truncateFilePath
Often the filepath will be all ascii, or mostly so, and this
optimisation makes a file that has an ascii suffix of sufficient length
be roundtrip converted between String and ByteString only once, rather
than once per character.

Sponsored-by: Graham Spencer
2025-01-22 13:09:15 -04:00
Joey Hess
6211e2af4a
optimize relatedTemplate 2025-01-22 11:51:23 -04:00
Joey Hess
99a4ad708e
break out templateAddedLength 2025-01-22 11:43:45 -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
jnkl
7d215db99e rename forum/reupload_existing_files_to_bare_repo.mdwn to forum/reuploads_existing_files_to_bare_repo.mdwn 2025-01-22 07:28:13 +00:00