Commit graph

36157 commits

Author SHA1 Message Date
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
Joey Hess
f08cc8218b
optimisation
This was already optimised before, but profiling found that delEntry was
around 1.5% of the total runtime of git-annex whereis. It was being
called once per environment variable per file processed.

Fixed by better caching. Since withIndexFile is almost always run with
the same .git/annex/index file, it can cache the modified environment,
rather than re-modifying it each time called.

(cherry picked from commit 6535aea49a)
2019-12-04 14:30:22 -04:00
Joey Hess
6535aea49a
optimisation
This was already optimised before, but profiling found that delEntry was
around 1.5% of the total runtime of git-annex whereis. It was being
called once per environment variable per file processed.

Fixed by better caching. Since withIndexFile is almost always run with
the same .git/annex/index file, it can cache the modified environment,
rather than re-modifying it each time called.
2019-12-04 14:27:11 -04:00
Joey Hess
b88f89c1ef
get the most commonly used commands building again
A quick benchmark of whereis shows not much speed improvement, maybe a
few percent. Profiling it found a hotspot, adds to todo.
2019-12-04 13:45:18 -04:00
Ilya_Shlyakhter
a5fe4d0acf Added a comment 2019-12-02 16:58:25 +00:00
Ilya_Shlyakhter
ac7a4c0f2f Added a comment: dropping contents of old keys after migration 2019-12-02 16:48:48 +00:00
Joey Hess
650a631ef8
include all remotes back in 2019-12-02 12:26:33 -04:00
Joey Hess
1100e0d3c9
include upgrade code back in
Remaining things that need to be fixed up to get this branch into a
basically mergeable state: remotes, commands, and the assistant
2019-12-02 12:16:46 -04:00
Ilya_Shlyakhter
68883cd80f Added a comment 2019-12-02 16:02:47 +00:00
Joey Hess
f3047d7186
include git-annex-shell back in
Also pushed ConfigKey down into the Git modules, which is the bulk of
the changes.
2019-12-02 11:51:52 -04:00
Joey Hess
65b88a0b99
revert unncessary changes
part of the hacking in 067aabdd48
but did not need to be committed
2019-12-02 10:55:11 -04:00
Joey Hess
b69c5be9ed
Merge branch 'master' of ssh://git-annex.branchable.com 2019-12-02 10:53:57 -04:00
Joey Hess
b7fdee8409
remove spam 2019-12-02 10:53:21 -04:00
Joey Hess
c756006374
fix hacked up AutoMerge module to work again 2019-12-02 10:51:43 -04:00
atrent
5c26c6f91a Added a comment: P.P.S. i dropped all local copies 2019-12-02 08:03:01 +00:00
atrent
80fd7a1c2c Added a comment: P.S. they are all SHA256E 2019-12-02 07:29:06 +00:00
atrent
06268b048e Added a comment: can't find unused objects 2019-12-02 07:26:42 +00:00
nangal.vivek@08b8bc308cb03037792b7930fd839b9deec118df
54929389af Added a comment: not able to find git-annex on openSUSE using zypper 2019-12-01 17:04:53 +00:00
atrent
6d66e6a377 Added a comment: migrating... 2019-11-30 22:30:06 +00:00
remyabel@65018526f3b5d4c0d36e4b970aacc540e590bf23
7475a647f3 removed 2019-11-30 21:41:23 +00:00
Ilya_Shlyakhter
f8f3bd8eb4 Added a comment: hardlinking identical files in annex may break invariants 2019-11-30 21:36:38 +00:00
Ilya_Shlyakhter
78c2f2a973 Added a comment 2019-11-30 21:11:53 +00:00
atrent
955042a0bf Added a comment: no collisions 2019-11-30 20:37:00 +00:00
remyabel@65018526f3b5d4c0d36e4b970aacc540e590bf23
d4e5c8e677 2019-11-30 19:51:42 +00:00
Ilya_Shlyakhter
d4b700196b added a hyperlink to key_format 2019-11-30 17:00:58 +00:00
Ilya_Shlyakhter
e9ff2381bd Added a comment: same contents with different keys 2019-11-30 16:51:58 +00:00
atrent
d9b0481779 Added a comment: duplicate objects? 2019-11-30 14:04:17 +00:00
yarikoptic
dda81ca26f Added a comment 2019-11-29 18:09:45 +00:00
yarikoptic
dd33f68982 refiled under dandi project - use case is https://gin.g-node.org 2019-11-29 18:06:14 +00:00
yarikoptic
9b5240ce83 Added a comment: reference original bug report 2019-11-29 17:58:29 +00:00
ply
8a3c543b3b Added a comment 2019-11-28 11:18:50 +00:00
ply
822962fa5f 2019-11-28 11:10:51 +00:00
yarikoptic
01ee4995c5 Added a comment: related: shouldn't git annex try external remotes to download config? 2019-11-28 01:22:53 +00:00
yarikoptic
7752e73481 initial report on inability to use remotes with authentication cached by git 2019-11-28 01:01:49 +00:00
Joey Hess
d7833def66
use ByteString for git config
The parser and looking up config keys in the map should both be faster
due to using ByteString.

I had hoped this would speed up startup time, but any improvement to
that was too small to measure. Seems worth keeping though.

Note that the parser breaks up the ByteString, but a config map ends up
pointing to the config as read, which is retained in memory until every
value from it is no longer used. This can change memory usage
patterns marginally, but won't affect git-annex.
2019-11-27 17:40:09 -04:00
Joey Hess
37d0f73e66
reword comment 2019-11-27 16:38:18 -04:00
Ilya_Shlyakhter
7d3750682b git-annex-cat 2019-11-27 18:16:35 +00:00