Commit graph

36093 commits

Author SHA1 Message Date
Joey Hess
83a3b1bec4
Merge branch 'master' of ssh://git-annex.branchable.com 2019-12-18 13:48:48 -04:00
Joey Hess
c745fa2852
Merge branch 'master' into bs 2019-12-18 13:47:27 -04:00
Joey Hess
75c40279c1
use conversion functions from filepath-bytestring
Behavior should be the same, but I'd hope to eventually get rid of
most of Utility.FileSystemEncoding and this is a first step.
2019-12-18 13:42:43 -04:00
Joey Hess
322c542b5c
fix ByteString conversion on windows
the encode' and decode' functions on Windows should not apply the
filesystem encoding, which does not work there. Instead, convert to and
from UTF-8.

Also, avoid exporting encodeW8 and decodeW8. Both use the filesystem
encoding, so won't work as expected on windows.
2019-12-18 13:32:56 -04:00
Joey Hess
0246ecbe94
update 2019-12-18 12:15:06 -04:00
Joey Hess
3d38ec9585
fix fileJournal
My ByteString rewrite oversimplified it, resulting in any _ in a journal
file turning into a / in the git-annex branch, which was often the wrong
filename, or sometimes (//) an invalid filename that git
refused to add.
2019-12-18 11:29:34 -04:00
mike@4e7a118bd37129091199ae0fb28184999c5f4725
448a69e6b8 Added a comment: repodata is outdated 2019-12-18 10:06:08 +00:00
spwhitton
53fdd34f79 add todo 2019-12-18 05:17:42 +00:00
https://christian.amsuess.com/chrysn
418890c5cb ask for --key on git-annex-inprogress 2019-12-17 09:21:52 +00:00
https://christian.amsuess.com/chrysn
1653957166 Added a comment: Would be useful 2019-12-17 09:08:09 +00:00
kyle
d0e52837bc 2019-12-13 19:08:09 +00:00
Joey Hess
3a14bc8220
bug report 2019-12-12 22:06:42 -05:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
b962471c21 Added a comment 2019-12-12 21:11:58 +00:00
Joey Hess
8ed171c69f
more info for debugging 2019-12-11 17:12:13 -04:00
Joey Hess
7a41f94e84
add test case for bug 2019-12-11 17:09:50 -04:00
Joey Hess
2e4de42d55
bug in this branch 2019-12-11 17:08:26 -04:00
Joey Hess
cee0d738fc
match also / path separator on windows 2019-12-11 17:08:08 -04:00
Joey Hess
4c0550222a
Merge branch 'master' of ssh://git-annex.branchable.com 2019-12-11 15:28:12 -04:00
Joey Hess
458d04e729
devblog 2019-12-11 15:27:38 -04:00
Joey Hess
c19211774f
use filepath-bytestring for annex object manipulations
git-annex find is now RawFilePath end to end, no string conversions.
So is git-annex get when it does not need to get anything.
So this is a major milestone on optimisation.

Benchmarks indicate around 30% speedup in both commands.

Probably many other performance improvements. All or nearly all places
where a file is statted use RawFilePath now.
2019-12-11 15:25:07 -04:00
Ilya_Shlyakhter
8b07ab553f Added a comment: annex-verify 2019-12-11 18:13:48 +00:00
yarikoptic
0c4bb02877 Added a comment 2019-12-10 22:01:13 +00:00
MichaelC
df7bf60998 Added a comment: Does android adb special remote support MTP? 2019-12-10 21:23:31 +00:00
michael.clifford.com@7ca464bc0ba25fd5f2922deb8f531668727a66fb
80b0c9b514 removed 2019-12-10 21:02:23 +00:00
michael.clifford.com@7ca464bc0ba25fd5f2922deb8f531668727a66fb
3c4053e455 Added a comment: android special remote via mtp supported? 2019-12-10 21:01:53 +00:00
yarikoptic
0ff33261f2 initial issue report on leaking error msgs 2019-12-10 14:28:17 +00:00
https://christian.amsuess.com/chrysn
e07fbf936a Added a comment: Key character set 2019-12-10 10:27:58 +00:00
Joey Hess
bdec7fed9c
convert TopFilePath to use RawFilePath
Adds a dependency on filepath-bytestring, an as yet unreleased fork of
filepath that operates on RawFilePath.

Git.Repo also changed to use RawFilePath for the path to the repo.

This does eliminate some RawFilePath -> FilePath -> RawFilePath
conversions. And filepath-bytestring's </> is probably faster.
But I don't expect a major performance improvement from this.
This is mostly groundwork for making Annex.Location use RawFilePath,
which will allow for a conversion-free pipleline.
2019-12-09 15:07:21 -04:00
Joey Hess
a7004375ec
avoid deprecation warning 2019-12-06 15:47:56 -04:00
Joey Hess
a0168cd9a2
use RawFilePath getSymbolicLinkStatus for speed 2019-12-06 15:42:54 -04:00
Joey Hess
db13b16013
Merge branch 'master' into bs 2019-12-06 15:13:51 -04:00
Joey Hess
3d936e4343
update re state of bs branch 2019-12-06 15:13:36 -04:00
Joey Hess
8051deb352
update re state of bs branch 2019-12-06 15:13:13 -04:00
Joey Hess
5f391179f1
use RawFilePath getFileStatus for speed
Only done on those calls to getFileStatus that had a RawFilePath, not a
FilePath. The others would probably be just as fast if converted to use
it with toRawFilePath, but I'm not 100% sure.

Note that genInodeCache' uses fromRawFilePath, but that value only gets
used on Windows, so on unix the thunk will never be evaluated.
2019-12-06 14:44:42 -04:00
Joey Hess
0e9d699ef3
use R.readSymbolicLink
This will be faster once gitAnnexLink is converted to a RawFilePath.
2019-12-06 14:20:18 -04:00
Joey Hess
360942ba12
RawFilePath will need to support Windows too
Of course, readSymbolicLink always fails on Windows, but now it's ready
for other things that don't fail there.
2019-12-06 14:17:48 -04:00
Joey Hess
f39f018ee0
fix git ls-tree parser
File mode is octal not decimal. This broke in the conversion to
attoparsec.

(I've submitted the content of Utility.Attoparsec to the attoparsec
developers.)

Test suite passes 100% now.
2019-12-06 14:05:48 -04:00
Joey Hess
4aaef14c61
fix another quickcheck property broken by NUL in Arbitrary String 2019-12-06 13:13:08 -04:00
Joey Hess
3ece4758c6
fix Arbitrary AssociatedFile
Empty filenames were already filtered out as not allowed. But before
the change to ByteString, a NUL could appear in an Arbitrary String,
and so Arbitrary AssociatedFile sometimes generated illegal filenames,
as NUL never appears in a filename. The change to ByteString meant the
String was run through toRawFilePath, which assumes a filename never
contains a NUL. That truncated the String at the NUL, which could
result in an AssociatedFile being generated with an empty filename.

The filtering of NUL added here is not really necessary, because
of the truncation, but it makes explicit that NUL is not allowed.
The real fix is that the suchThat now applies to the final
AssociatedFile, so will catch any empty ones however generated.

This raises the more general question of whether toRawFilePath might
truncate other strings that later get used as filenames. I think new
bugs probably won't be introduced by that. Before, a FilePath that got
read from somewhere (eg an attacker) and contained a NUL would perhaps
be printed out by git-annex, including the NUL, or written to disk
inside a file, or what have you. But as soon as that FilePath gets
passed to any IO action that treats it as a filename, it gets truncated
after the NUL. Eg, writeFile "foo\NULbar" "bar" writes to file "foo".
Now toRawFilePath will make the truncation happen earler, but at most
this will affect what gets printed out or is written to disk inside a
file; actually using the RawFilePath as a filename will not change from
using the FilePath as a filename.
2019-12-06 12:57:41 -04:00
Joey Hess
faf5415163
add back lost filtering of multibyte chars in prop_encode_decode_roundtrip
I had thought using ByteString would avoid the problem, but the
quickcheck property is still taking Arbitrary String input, so the use
of ByteString internally doesn't matter.
2019-12-06 12:14:55 -04:00
Joey Hess
4265344bc8
Merge branch 'master' of ssh://git-annex.branchable.com 2019-12-05 15:22:53 -04:00
Joey Hess
2960d840c6
devblog 2019-12-05 15:22:43 -04:00
Joey Hess
3266ad3ff7
everything is building again
However, the test suite fails some quickchecks, so this branch is not
yet in a mergeable state.
2019-12-05 15:10:23 -04:00
Joey Hess
c20f4704a7
all commands building except for assistant
also, changed ConfigValue to a newtype, and moved it into Git.Config.
2019-12-05 14:41:18 -04:00
Joey Hess
976b283ad5
update 2019-12-05 12:28:42 -04:00
Joey Hess
718fa83da6
mention optimisations 2019-12-05 11:46:55 -04:00
Joey Hess
c7a4411e71
Merge branch 'master' into bs 2019-12-05 11:41:30 -04:00
Joey Hess
3c7fd09ec8
get many more commands building again
about half are building now
2019-12-05 11:40:10 -04:00
jkrenzer
f7bdef6f0a Added a comment: Great work! Thank you! 2019-12-05 12:10:48 +00:00
Joey Hess
4ad04618c6
Merge branch 'master' of ssh://git-annex.branchable.com 2019-12-04 14:56:31 -04:00