Commit graph

43118 commits

Author SHA1 Message Date
Joey Hess
81bc57322f
clean up 2023-04-07 17:20:58 -04:00
Joey Hess
c5b017e55b
full emulation of git filename escaping
Not yet used, but the plan is to make git-annex use this when displaying
filenames similar to how git does.

Sponsored-by: Lawrence Brogan on Patreon
2023-04-07 17:17:31 -04:00
Joey Hess
d9b6be7782
convert encode_c to ByteString
This turns out to be possible after all, because the old one decomposed
a unicode Char to multiple Word8s and encoded those. It should be faster
in some places, particularly in Git.Filename.encodeAlways.

The old version encoded all unicode by default as well as ascii control
characters and also '"'. The new one only encodes ascii control
characters by default.

That old behavior was visible in Utility.Format.format, which did escape
'"' when used in eg git-annex find --format='${escaped_file}\n'
So made sure to keep that working the same. Although the man page only
says it will escape "unusual" characters, so it might be able to be
changed.

Git.Filename.encodeAlways also needs to escape '"' ; that was the
original reason that was escaped.

Types.Transferrer I judge is ok to not escape '"', because the escaped
value is sent in a line-based protocol, which is decoded at the other
end by decode_c. So old git-annex and new will be fine whether that is
escaped or not, the result will be the same.

Note that when asked to escape a double quote, it is escaped to \"
rather than to \042. That's the same behavior as git has. It's
perhaps somehow more of a special case than it needs to be.

Sponsored-by: k0ld on Patreon
2023-04-07 17:10:49 -04:00
Joey Hess
371d4f8183
decode_c converted to ByteString
This speeds up a few things, notably CmdLine.Seek using Git.Filename
which uses decode_c and this avoids a conversion to String and back,
and probably the ByteString implementation of decode_c is also faster
for simple cases at least than the string version.

encode_c cannot be converted to ByteString (or if it did, it would have
to convert right back to String in order to handle unicode).

Sponsored-by: Brock Spratlen on Patreon
2023-04-07 14:44:19 -04:00
Joey Hess
f0b1034f8f
add news item for git-annex 10.20230407 2023-04-07 13:37:18 -04:00
Joey Hess
9c242af171
releasing package git-annex version 10.20230407 2023-04-07 13:37:03 -04:00
Joey Hess
218cb6ab56
expand 2023-04-07 13:13:16 -04:00
Joey Hess
e6a4782b0c
response 2023-04-07 13:00:56 -04:00
Joey Hess
b4e5f2b8a4
response 2023-04-07 12:52:43 -04:00
Joey Hess
868eb44562
Merge branch 'master' of ssh://git-annex.branchable.com 2023-04-07 12:42:09 -04:00
jwodder
b8afb79ada 2023-04-07 15:19:04 +00:00
mih
c83a783f45 Added a comment: Status of the import/export protocol implementation 2023-04-07 09:17:22 +00:00
Joey Hess
c417336fbb
todo 2023-04-05 19:37:21 -04:00
Joey Hess
98a3ba0ea5
restore old registerurl location tracking behavior
registerurl: When an url is claimed by a special remote other than the web,
update location tracking for that special remote.

registerurl's behavior was changed in commit
451171b7c1, apparently accidentially to not
update location tracking except for the web.

This makes registerurl followed by unregisterurl not be a no-op, when the
url happens to be claimed by a remote other than the web. It is a noop when
the url is unclaimed except by the web. I don't like the inconsistency,
and wish that registerurl and unregisterurl never updated location
tracking, which would be more in keeping with them being plumbing.

But there is the fact that it used to behave this way, and also it was
inconsistent that it updated location tracking for the web but not for
other remotes, unlike addurl. And there's an argument that the user might
not know what remote to expect to claim an url, so would be considerably in
the dark when using registerurl. (Although they have to know what content
gets downloaded, since they specify a key..)

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-04-05 17:06:44 -04:00
Joey Hess
26a094ac1a
hm 2023-04-05 16:36:18 -04:00
Joey Hess
eecd02fd3d
Merge branch 'master' of ssh://git-annex.branchable.com 2023-04-05 15:56:31 -04:00
Joey Hess
2b940f7725
registerurl, unregisterurl: Added --remote option
This serves two purposes. --remote=web bypasses other special remotes that
claim the url, same as addurl --raw. And, specifying some other remote
allows making sure that an url is claimed by the remote you expect,
which makes then using setpresentkey not be fragile.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-04-05 15:54:41 -04:00
yarikoptic
1751ddd759 Added a comment 2023-04-05 19:36:41 +00:00
Joey Hess
c39d72ac78
comments 2023-04-05 15:00:39 -04:00
Joey Hess
06c584a267
Merge branch 'master' of ssh://git-annex.branchable.com 2023-04-05 11:04:55 -04:00
Joey Hess
1780b657bc
update 2023-04-05 11:04:35 -04:00
jkniiv
247430a272 Added a comment 2023-04-05 09:42:12 +00:00
yarikoptic
e4c93a233e Added a comment 2023-04-05 01:03:38 +00:00
yarikoptic
25bdb45b72 Added a comment 2023-04-05 00:30:00 +00:00
yarikoptic
352a274f53 Added a comment 2023-04-04 20:15:59 +00:00
Joey Hess
ac0345aa42
improve comments 2023-04-04 15:23:39 -04:00
Joey Hess
d0e94b4302
fixed 2023-04-04 15:19:25 -04:00
Joey Hess
e3f5bd4ca6
Revert "override rather than setting user.name and user.email"
This reverts commit 66eb63dd82.

git-annex init is the only thing that uses ensureCommit. So overriding
there will make later commits to the git-annex branch or by git-annex sync
fail.

It's ugly that git-annex init sets user.name and user.email, but it only
does it on systems that are badly configured.
2023-04-04 15:15:02 -04:00
Joey Hess
e91bf784cd
Support user.useConfigOnly git config
When it's set and git cannot determine user.name or user.email, this will
result in git-annex init failing when committing to create the git-annex
branch. Other git-annex commands that commit can also fail.

Sponsored-by: Jack Hill on Patreon
2023-04-04 15:12:52 -04:00
Joey Hess
66eb63dd82
override rather than setting user.name and user.email
Avoid setting user.name and user.email in the git config when git is unable
to detect them.

git-annex has good reason to want to ensure git commit succeeds when eg
committing to the git-annex branch. But it's not playing nice to set these
values where other commands can see them.

Sponsored-by: Brett Eisenberg on Patreon
2023-04-04 14:56:44 -04:00
Joey Hess
68a0491f83
comment 2023-04-04 14:43:33 -04:00
Joey Hess
4e64af0010
comment 2023-04-04 14:31:25 -04:00
Joey Hess
31ffb0f216
probably fixed but I didn't actually reproduce it 2023-04-04 14:25:55 -04:00
Joey Hess
3eb51ee929
readFileStrict to avoid laziness bug
Fix laziness bug introduced in last release that breaks use of
--unlock-present and --hide-missing adjusted branches.

Since there is a writeFile of the same file immediately after readFile, it
may still have the file open for read (or may have happened to read it
already and closed it).

I was not able to reproduce the problem in brief testing, but this seems
obvious.

Sponsored-by: Luke Shumaker on Patreona
2023-04-04 14:25:01 -04:00
Joey Hess
e37b968383
comment 2023-04-04 14:09:02 -04:00
Joey Hess
bac1a990a6
comments 2023-04-04 13:52:23 -04:00
Joey Hess
c3eaecb244
comment 2023-04-04 13:34:32 -04:00
jkniiv
4a5b5bdd0d Added a comment: happens during sync too 2023-04-03 11:48:10 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
dfb5826be2 2023-04-03 09:05:45 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
f9d24e92a0 Added a comment 2023-04-01 11:09:49 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
170c5edb44 Added a comment 2023-04-01 11:06:26 +00:00
wolf480@8ad1ccdd08efc303a88f7e88c4e629be6637a44e
71e0ec2901 Added a comment 2023-04-01 07:23:18 +00:00
yarikoptic
45eaf8e484 reporting an annoying registerurl issue not registering a URL 2023-03-31 22:36:02 +00:00
yarikoptic
d9549d4744 initial todo for adding --remote to registerurl 2023-03-31 22:15:26 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
f74a3d1e59 Added a comment 2023-03-31 20:16:04 +00:00
Joey Hess
88ea10f606
Merge branch 'master' of ssh://git-annex.branchable.com 2023-03-31 15:16:28 -04:00
Joey Hess
cc36c8516a
Sped up sqlite inserts 2x when built with persistent 2.14.5.0
https://github.com/yesodweb/persistent/issues/1457

Sponsored-by: Dartmouth College's DANDI project
2023-03-31 14:38:25 -04:00
zhongruoyu@80ae9772857666624009364c29f07c70beed46ac
8119f22344 Added a comment 2023-03-31 18:32:29 +00:00
Joey Hess
a858099272
clarify 2023-03-31 14:18:50 -04:00
Joey Hess
8047df62cc
fix link 2023-03-31 14:18:36 -04:00