git-annex.git
3 years agocomment
Joey Hess [Mon, 24 Apr 2023 20:05:35 +0000 (16:05 -0400)]
comment

3 years agoAdded a comment
yarikoptic [Mon, 24 Apr 2023 19:23:22 +0000 (19:23 +0000)]
Added a comment

3 years agocomment
Joey Hess [Mon, 24 Apr 2023 15:53:14 +0000 (11:53 -0400)]
comment

3 years ago(no commit message)
nobodyinperson [Mon, 24 Apr 2023 15:07:28 +0000 (15:07 +0000)]

3 years ago(no commit message)
aurtzy [Mon, 24 Apr 2023 03:25:41 +0000 (03:25 +0000)]

3 years ago(no commit message)
aurtzy [Mon, 24 Apr 2023 03:16:12 +0000 (03:16 +0000)]

3 years agoinitial report on bad escaping
yarikoptic [Sat, 22 Apr 2023 05:06:01 +0000 (05:06 +0000)]
initial report on bad escaping

3 years agoclose
Joey Hess [Fri, 21 Apr 2023 16:34:20 +0000 (12:34 -0400)]
close

3 years agoAdded a comment
adina.wagner@2a4cac6443aada2bd2a329b8a33f4a7b87cc8eff [Fri, 21 Apr 2023 07:08:35 +0000 (07:08 +0000)]
Added a comment

3 years agoidea
Joey Hess [Thu, 20 Apr 2023 18:21:22 +0000 (14:21 -0400)]
idea

3 years agoanalysis and followup
Joey Hess [Thu, 20 Apr 2023 18:11:04 +0000 (14:11 -0400)]
analysis and followup

3 years ago(no commit message)
DavidD [Thu, 20 Apr 2023 16:08:21 +0000 (16:08 +0000)]

3 years ago(no commit message)
DavidD [Thu, 20 Apr 2023 15:43:30 +0000 (15:43 +0000)]

3 years ago(no commit message)
DavidD [Thu, 20 Apr 2023 15:37:46 +0000 (15:37 +0000)]

3 years agoHonor --force option when operating on a local git remote
Joey Hess [Wed, 19 Apr 2023 16:53:58 +0000 (12:53 -0400)]
Honor --force option when operating on a local git remote

Propagate Annex.force into the remote's Annex state.

Fixes this problem:

joey@darkstar:~/tmp/xxxx>git-annex copy mmm --to origin --force
copy mmm (to origin...)
  not enough free space, need 908.72 MB more (use --force to override this check or adjust annex.diskreserve)

  failed to send content to remote
failed

Does beg the question if anything else should be propagated.
Some things like Annex.forcenumcopies certianly not; using --numcopies
overrides the number of copies the current repo wants, not all of them.

Sponsored-by: Graham Spencer on Patreon
3 years agoimprove error message when commitDb' fails due to disk full or IO error
Joey Hess [Wed, 19 Apr 2023 16:43:30 +0000 (12:43 -0400)]
improve error message when commitDb' fails due to disk full or IO error

There's still a 60 second delay in this situation because it retries,
in case the failure was due to something recoverable like another
process.

Sponsored-by: unqueued on Patreon
3 years agocatch chdir exception in --autostop
Joey Hess [Wed, 19 Apr 2023 16:42:02 +0000 (12:42 -0400)]
catch chdir exception in --autostop

assistant --autostop: Avoid crashing when ~/.config/git-annex/autostart
lists a directory that it cannot chdir to.

Sponsored-by: k0ld on Patreon
3 years agoresponse
Joey Hess [Wed, 19 Apr 2023 16:26:20 +0000 (12:26 -0400)]
response

3 years agocomment and improve docs
Joey Hess [Wed, 19 Apr 2023 16:20:26 +0000 (12:20 -0400)]
comment and improve docs

3 years agoAdded a comment: Sync to remote master?
dud225@35a1ee469f82f3a7eb1f2dce4ad453f5e47bdfd3 [Wed, 19 Apr 2023 08:40:41 +0000 (08:40 +0000)]
Added a comment: Sync to remote master?

3 years ago(no commit message)
kirrik96@419b50c9fb455c2f172184be932c5df3635a3cf4 [Tue, 18 Apr 2023 21:12:21 +0000 (21:12 +0000)]

3 years agoconfigremote
Joey Hess [Tue, 18 Apr 2023 19:30:49 +0000 (15:30 -0400)]
configremote

New command, currently limited to changing autoenable= setting of a special remote.

It will probably never be used for more than that given the limitations on
it.

Sponsored-by: Brock Spratlen on Patreon
3 years agosupport enableremote of git repo changing eg autoenable=
Joey Hess [Tue, 18 Apr 2023 18:00:02 +0000 (14:00 -0400)]
support enableremote of git repo changing eg autoenable=

enableremote: Support enableremote of a git remote (that was previously set
up with initremote) when additional parameters such as autoenable= are
passed.

The enableremote special case for regular git repos is intended to handle
ones that don't have a UUID probed, and the user wants git-annex to
re-probe. So, that special case is still needed. But, in that special
case, the user is not passing any extra parameters. So, when there are
parameters, instead run the special remote setup code. That requires there
to be a uuid known already, and it allows changing things like autoenable=

Remote.Git.enableRemote changed to be a no-op if a git remote with the name
already exists. Which it generally will in this case.

Sponsored-by: Jack Hill on Patreon
3 years agocomment
Joey Hess [Tue, 18 Apr 2023 17:09:24 +0000 (13:09 -0400)]
comment

3 years ago(no commit message)
nobodyinperson [Tue, 18 Apr 2023 07:55:46 +0000 (07:55 +0000)]

3 years agoAdded a comment: Confirm
mih [Tue, 18 Apr 2023 07:54:46 +0000 (07:54 +0000)]
Added a comment: Confirm

3 years agocomment
Joey Hess [Mon, 17 Apr 2023 18:09:06 +0000 (14:09 -0400)]
comment

3 years agoresponse
Joey Hess [Mon, 17 Apr 2023 18:03:02 +0000 (14:03 -0400)]
response

3 years agocomment
Joey Hess [Mon, 17 Apr 2023 17:48:23 +0000 (13:48 -0400)]
comment

3 years agoresponse
Joey Hess [Mon, 17 Apr 2023 17:39:34 +0000 (13:39 -0400)]
response

3 years agoalready fixed
Joey Hess [Mon, 17 Apr 2023 17:35:23 +0000 (13:35 -0400)]
already fixed

3 years agoresponse
Joey Hess [Mon, 17 Apr 2023 17:32:50 +0000 (13:32 -0400)]
response

3 years agoAdded a comment
DavidD [Mon, 17 Apr 2023 15:27:49 +0000 (15:27 +0000)]
Added a comment

3 years agoAdded a comment
yarikoptic [Mon, 17 Apr 2023 13:01:03 +0000 (13:01 +0000)]
Added a comment

3 years agoAdded a comment: Groups comprised of archive drives of various size
dud225@35a1ee469f82f3a7eb1f2dce4ad453f5e47bdfd3 [Mon, 17 Apr 2023 10:12:58 +0000 (10:12 +0000)]
Added a comment: Groups comprised of archive drives of various size

3 years agoAdded a comment: Too old?
nobodyinperson [Mon, 17 Apr 2023 01:43:36 +0000 (01:43 +0000)]
Added a comment: Too old?

3 years agogit annex forget bug
adpce [Sun, 16 Apr 2023 19:58:22 +0000 (19:58 +0000)]
git annex forget bug

3 years agoAdded a comment
nobodyinperson [Sun, 16 Apr 2023 17:49:51 +0000 (17:49 +0000)]
Added a comment

3 years agoAdded a comment
DavidD [Sat, 15 Apr 2023 22:16:11 +0000 (22:16 +0000)]
Added a comment

3 years ago(no commit message)
dirtminer@d11db62478fa082f843be60f2c5a6e1dcf5b3566 [Sat, 15 Apr 2023 01:04:46 +0000 (01:04 +0000)]

3 years agoInitial report
mih [Fri, 14 Apr 2023 06:55:18 +0000 (06:55 +0000)]
Initial report

3 years agofix windows build
Joey Hess [Wed, 12 Apr 2023 23:33:19 +0000 (19:33 -0400)]
fix windows build

3 years agoadd ScopedTypeVariables
Joey Hess [Wed, 12 Apr 2023 23:19:22 +0000 (19:19 -0400)]
add ScopedTypeVariables

3 years agorename Git.Filename to Git.Quote
Joey Hess [Wed, 12 Apr 2023 21:18:29 +0000 (17:18 -0400)]
rename Git.Filename to Git.Quote

3 years agoclose ancient moreinfo bug
Joey Hess [Wed, 12 Apr 2023 21:18:05 +0000 (17:18 -0400)]
close ancient moreinfo bug

3 years agoavoid displaying ExitCode exceptions
Joey Hess [Wed, 12 Apr 2023 21:04:57 +0000 (17:04 -0400)]
avoid displaying ExitCode exceptions

Don't need to be sanitized and displaying them messes up actually
exiting with the right exit code! And broke the test suite.

Sponsored-by: Brett Eisenberg on Patreon
3 years agoremove unused imports
Joey Hess [Wed, 12 Apr 2023 20:48:18 +0000 (16:48 -0400)]
remove unused imports

3 years agowhereused: Fix display of branch:file when run in a subdirectory
Joey Hess [Wed, 12 Apr 2023 19:18:04 +0000 (15:18 -0400)]
whereused: Fix display of branch:file when run in a subdirectory

The file needs to be relative to the top of the repository
in that case, but it was relative to the subdir.

Sponsored-by: Luke Shumaker on Patreon
3 years agoimprove display of relative path to file
Joey Hess [Wed, 12 Apr 2023 19:11:44 +0000 (15:11 -0400)]
improve display of relative path to file

When in a subdirectory, and the file is too, it used to display eg
../subdir/thefile and now will display thefile.

3 years agodevblog
Joey Hess [Wed, 12 Apr 2023 19:03:01 +0000 (15:03 -0400)]
devblog

3 years agofix build
Joey Hess [Wed, 12 Apr 2023 18:31:56 +0000 (14:31 -0400)]
fix build

3 years agosanitize control characters in main thread fatal exceptions
Joey Hess [Wed, 12 Apr 2023 18:21:53 +0000 (14:21 -0400)]
sanitize control characters in main thread fatal exceptions

Sponsored-by: Noam Kremen on Patreon
3 years agofix build
Joey Hess [Wed, 12 Apr 2023 18:18:29 +0000 (14:18 -0400)]
fix build

3 years agosafe output to terminal for calckey inprogress and lookupkey
Joey Hess [Wed, 12 Apr 2023 18:03:44 +0000 (14:03 -0400)]
safe output to terminal for calckey inprogress and lookupkey

These are quite low-level, but still there is no point in displaying
escape sequences that have been embedded in a key to the terminal.

I think these are the only remaining commands that didn't use safe
output, except for cases where git-annex is speaking a protocol to
itself.

Sponsored-by: Kevin Mueller on Patreon
3 years agofix mojibake reversion in display of utf8
Joey Hess [Wed, 12 Apr 2023 17:48:21 +0000 (13:48 -0400)]
fix mojibake reversion in display of utf8

When displaying a ByteString like "💕", safeOutput operates on
individual bytes like "\240\159\146\149" and isControl '\146' = True,
so it got truncated to just "\240".

So, only treat the low control characters, and DEL, as control
characters.

Also split Utility.Terminal out of Utility.SafeOutput. The latter needs
win32, but Utility.SafeOutput is used by Control.Exception, which is
used by Setup.

Sponsored-by: Nicholas Golder-Manning on Patreon
3 years agoinit: Avoid autoenabling special remotes that have control characters in their names
Joey Hess [Wed, 12 Apr 2023 16:33:17 +0000 (12:33 -0400)]
init: Avoid autoenabling special remotes that have control characters in their names

I'm on the fence about this. Notice that pulling from a git remote can
pull branches that have escape sequences in their names. Git will
display those as-is. Arguably git should try harder to avoid that.

But, names of remotes are usually up to the local user, and autoenable
changes that, and so it makes sense that git chooses to display control
characters in names of remotes, and so autoenable needs to guard against
it.

Sponsored-by: Graham Spencer on Patreon
3 years agoallow tab in controlCharacterInFilePath
Joey Hess [Wed, 12 Apr 2023 16:31:16 +0000 (12:31 -0400)]
allow tab in controlCharacterInFilePath

Seems unlikely to have a tab in a path, but it's not a control character
that needs to be prevented either.

Left \n \r \v and \a as other non-threatening control characters
that are still obnoxious to have in a filepath because of how it causes
issues with display and/or with shell scripting.

3 years agofix reversion in warning newline
Joey Hess [Wed, 12 Apr 2023 16:29:56 +0000 (12:29 -0400)]
fix reversion in warning newline

indent removes any trailing newline, so put the trailing newline after
calling indent.

Sponsored-by: unqueued on Patreon
3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 11 Apr 2023 20:31:42 +0000 (16:31 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agoupdate
Joey Hess [Tue, 11 Apr 2023 20:31:31 +0000 (16:31 -0400)]
update

3 years agonewline and tab are safe control characters
Joey Hess [Tue, 11 Apr 2023 19:38:47 +0000 (15:38 -0400)]
newline and tab are safe control characters

Oops, let's let git-annex display those! Lol

3 years agoIsString StringContainingQuotedPath optimisation
Joey Hess [Tue, 11 Apr 2023 19:29:04 +0000 (15:29 -0400)]
IsString StringContainingQuotedPath optimisation

This causes an encodeBS thunk, and the first evaluation of the string
forces it. From then on, further uses operate on a ByteString. This
avoids converting repeatedly.

3 years agofind, findkeys, examinekey: escape output to terminal when --format is not used
Joey Hess [Tue, 11 Apr 2023 18:57:09 +0000 (14:57 -0400)]
find, findkeys, examinekey: escape output to terminal when --format is not used

Note that filenames are not quoted, only escaped. This is to match the
output of --format with escaping.

Sponsored-by: Lawrence Brogan on Patreon
3 years agofilter out control characters and quote filenames
Joey Hess [Tue, 11 Apr 2023 18:27:22 +0000 (14:27 -0400)]
filter out control characters and quote filenames

Searched for uses of putStr and hPutStr and changed appropriate ones to filter
out control characters and quote filenames.

This notably does not make find and findkeys quote filenames in their default
output. Because they should only do that when stdout is non a pipe.

A few commands like calckey and lookupkey seem too low-level to make sense to filter
output, so skipped those.

Also when relaying output from other commands that is not progress output,
have git-annex filter out control characters.

Sponsored-by: k0ld on Patreon
3 years agoAdded a comment
xloem [Tue, 11 Apr 2023 18:07:04 +0000 (18:07 +0000)]
Added a comment

3 years agomention control characters
Joey Hess [Tue, 11 Apr 2023 18:06:46 +0000 (14:06 -0400)]
mention control characters

3 years agoAdded a comment
xloem [Tue, 11 Apr 2023 18:03:26 +0000 (18:03 +0000)]
Added a comment

3 years agoclean up cabal.project.local~*
Joey Hess [Tue, 11 Apr 2023 17:18:31 +0000 (13:18 -0400)]
clean up cabal.project.local~*

Make whenever cabal configure is run with new cabal, and I don't need
100 copies of that to be backed up.

3 years agofilter out control characters in all other Messages
Joey Hess [Mon, 10 Apr 2023 21:03:41 +0000 (17:03 -0400)]
filter out control characters in all other Messages

This does, as a side effect, make long notes in json output not
be indented. The indentation is only needed to offset them
underneath the display of the file they apply to, so that's ok.

Sponsored-by: Brock Spratlen on Patreon
3 years agoeliminate showStart showStartOther
Joey Hess [Mon, 10 Apr 2023 20:07:54 +0000 (16:07 -0400)]
eliminate showStart showStartOther

These were not handling control characters and are redundant.

Sponsored-by: Jack Hill on Patreon
3 years agofilter out control characters in warning messages
Joey Hess [Mon, 10 Apr 2023 18:47:32 +0000 (14:47 -0400)]
filter out control characters in warning messages

Converted warning and similar to use StringContainingQuotedPath. Most
warnings are static strings, some do refer to filepaths that need to be
quoted, and others don't need quoting.

Note that, since quote filters out control characters of even
UnquotedString, this makes all warnings safe, even when an attacker
sneaks in a control character in some other way.

When json is being output, no quoting is done, since json gets its own
quoting.

This does, as a side effect, make warning messages in json output not
be indented. The indentation is only needed to offset warning messages
underneath the display of the file they apply to, so that's ok.

Sponsored-by: Brett Eisenberg on Patreon
3 years agouse safeOutput when quoting UnquotedString
Joey Hess [Mon, 10 Apr 2023 18:43:17 +0000 (14:43 -0400)]
use safeOutput when quoting UnquotedString

UnquotedString does not need to be quoted, but still it's possible
it contains something attacker-controlled, which could have an
escape sequence or control character in it. This is a convenient
place to filter out such things, since quoting alrready handles
those in filenames.

Sponsored-by: Luke Shumaker on Patreon
3 years agofilter out control characters in error messages
Joey Hess [Mon, 10 Apr 2023 17:38:14 +0000 (13:38 -0400)]
filter out control characters in error messages

giveup changed to filter out control characters. (It is too low level to
make it use StringContainingQuotedPath.)

error still does not, but it should only be used for internal errors,
where the message is not attacker-controlled.

Changed a lot of existing error to giveup when it is not strictly an
internal error.

Of course, other exceptions can still be thrown, either by code in
git-annex, or a library, that include some attacker-controlled value.
This does not guard against those.

Sponsored-by: Noam Kremen on Patreon
3 years agogit style filename quoting for giveup
Joey Hess [Mon, 10 Apr 2023 16:56:45 +0000 (12:56 -0400)]
git style filename quoting for giveup

When the filenames are part of the git repository or other files that
might have attacker-controlled names, quote them in error messages.

This is fairly complete, although I didn't do the one in
Utility.DirWatcher.INotify.hs because that doesn't have access to
Git.Filename or Annex.

But it's also quite possible I missed some. And also while scanning for
these, I found giveup used with other things that could be attacker
controlled to contain control characters (eg Keys). So, I'm thinking
it would also be good for giveup to just filter out control characters.
This commit is then not the only line of defence, but just good
formatting when git-annex displays a filename in an error message.

Sponsored-by: Kevin Mueller on Patreon
3 years agoaddurl --preserve-filename: reject control characters
Joey Hess [Mon, 10 Apr 2023 16:13:26 +0000 (12:13 -0400)]
addurl --preserve-filename: reject control characters

As well as escape sequences, control characters seem unlikely to be desired when
doing addurl, and likely to trip someone up. So disallow them as well.

I did consider going the other way and allowing filenames with control characters
and escape sequences, since git-annex is in the process of escaping display
of all filenames. Might still be a better idea?

Also display the illegal filename git quoted when it rejects it.

Sponsored-by: Nicholas Golder-Manning on Patreon
3 years agoavoid unncessary nested lists for combineing StringContainingQuotedPath
Joey Hess [Sun, 9 Apr 2023 16:53:13 +0000 (12:53 -0400)]
avoid unncessary nested lists for combineing StringContainingQuotedPath

3 years agogit style quoting for ActionItemOther
Joey Hess [Sat, 8 Apr 2023 19:48:32 +0000 (15:48 -0400)]
git style quoting for ActionItemOther

Added StringContainingQuotedPath, which is used for ActionItemOther.

In the process, checked every ActionItemOther for those containing
filenames, and made them use quoting.

Sponsored-by: Graham Spencer on Patreon
3 years agogit style filename quoting controlled by core.quotePath
Joey Hess [Sat, 8 Apr 2023 18:20:02 +0000 (14:20 -0400)]
git style filename quoting controlled by core.quotePath

This is by no means complete, but escaping filenames in actionItemDesc does
cover most commands.

Note that for ActionItemBranchFilePath, the value is branch:file, and I
choose to only quote the file part (if necessary). I considered quoting the
whole thing. But, branch names cannot contain control characters, and while
they can contain unicode, git coes not quote unicode when displaying branch
names. So, it would be surprising for git-annex to quote unicode in a
branch name.

The find command is the most obvious command that still needs to be
dealt with. There are probably other places that filenames also get
displayed, eg embedded in error messages.

Some other commands use ActionItemOther with a filename, I think that
ActionItemOther should either be pre-sanitized, or should explicitly not
be used for filenames, so that needs more work.

When --json is used, unicode does not get escaped, but control
characters were already escaped in json.

(Key escaping may turn out to be needed, but I'm ignoring that for now.)

Sponsored-by: unqueued on Patreon
3 years agoclean up
Joey Hess [Fri, 7 Apr 2023 21:20:58 +0000 (17:20 -0400)]
clean up

3 years agofull emulation of git filename escaping
Joey Hess [Fri, 7 Apr 2023 21:12:55 +0000 (17:12 -0400)]
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
3 years agoconvert encode_c to ByteString
Joey Hess [Fri, 7 Apr 2023 20:47:26 +0000 (16:47 -0400)]
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
3 years agodecode_c converted to ByteString
Joey Hess [Fri, 7 Apr 2023 18:44:19 +0000 (14:44 -0400)]
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
3 years agoadd news item for git-annex 10.20230407
Joey Hess [Fri, 7 Apr 2023 17:37:18 +0000 (13:37 -0400)]
add news item for git-annex 10.20230407

3 years agoreleasing package git-annex version 10.20230407
Joey Hess [Fri, 7 Apr 2023 17:37:03 +0000 (13:37 -0400)]
releasing package git-annex version 10.20230407

3 years agoexpand
Joey Hess [Fri, 7 Apr 2023 17:13:16 +0000 (13:13 -0400)]
expand

3 years agoresponse
Joey Hess [Fri, 7 Apr 2023 17:00:56 +0000 (13:00 -0400)]
response

3 years agoresponse
Joey Hess [Fri, 7 Apr 2023 16:52:43 +0000 (12:52 -0400)]
response

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 7 Apr 2023 16:42:09 +0000 (12:42 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years ago(no commit message)
jwodder [Fri, 7 Apr 2023 15:19:04 +0000 (15:19 +0000)]

3 years agoAdded a comment: Status of the import/export protocol implementation
mih [Fri, 7 Apr 2023 09:17:22 +0000 (09:17 +0000)]
Added a comment: Status of the import/export protocol implementation

3 years agotodo
Joey Hess [Wed, 5 Apr 2023 23:37:21 +0000 (19:37 -0400)]
todo

3 years agorestore old registerurl location tracking behavior
Joey Hess [Wed, 5 Apr 2023 20:59:44 +0000 (16:59 -0400)]
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
451171b7c1eaccfd0f39d4ec1d64c6964613f55a, 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
3 years agohm
Joey Hess [Wed, 5 Apr 2023 20:36:18 +0000 (16:36 -0400)]
hm

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 5 Apr 2023 19:56:31 +0000 (15:56 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agoregisterurl, unregisterurl: Added --remote option
Joey Hess [Wed, 5 Apr 2023 19:46:51 +0000 (15:46 -0400)]
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
3 years agoAdded a comment
yarikoptic [Wed, 5 Apr 2023 19:36:41 +0000 (19:36 +0000)]
Added a comment

3 years agocomments
Joey Hess [Wed, 5 Apr 2023 19:00:39 +0000 (15:00 -0400)]
comments

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 5 Apr 2023 15:04:55 +0000 (11:04 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agoupdate
Joey Hess [Wed, 5 Apr 2023 15:04:35 +0000 (11:04 -0400)]
update

3 years agoAdded a comment
jkniiv [Wed, 5 Apr 2023 09:42:12 +0000 (09:42 +0000)]
Added a comment