From 3a788c8d0bce1baf0bf4c98eb454705111faf9c6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 7 Jan 2025 13:00:32 -0400 Subject: [PATCH] todo from forum post --- ..._4d5a3369f020e7df3231491b680602d3._comment | 20 ++++++++++++++++++ ...nt_remote_to_use_for_write_operations.mdwn | 21 +++++++++++++++++++ ..._084e824d6fdace591409bda8a71ed411._comment | 10 +++++++++ 3 files changed, 51 insertions(+) create mode 100644 doc/forum/Automatic_fallback_to_special_remote_with_sameas/comment_1_4d5a3369f020e7df3231491b680602d3._comment create mode 100644 doc/todo/config_different_remote_to_use_for_write_operations.mdwn create mode 100644 doc/todo/copy__47__move_support_for_pushinsteadOf_/comment_10_084e824d6fdace591409bda8a71ed411._comment diff --git a/doc/forum/Automatic_fallback_to_special_remote_with_sameas/comment_1_4d5a3369f020e7df3231491b680602d3._comment b/doc/forum/Automatic_fallback_to_special_remote_with_sameas/comment_1_4d5a3369f020e7df3231491b680602d3._comment new file mode 100644 index 0000000000..73f6fe210d --- /dev/null +++ b/doc/forum/Automatic_fallback_to_special_remote_with_sameas/comment_1_4d5a3369f020e7df3231491b680602d3._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2025-01-07T16:28:03Z" + content=""" +Interesting idea. Even without --sameas, it's possible to have 2 remotes +that connect to the same repository in different ways, with one being +readonly and the other supporting write as well. So I don't think this is +really specific to --sameas. + +git-annex also has limited knowledge about whether a given special remote +is readonly or not. That would make any kind of automated fallback unlikely +to work well. + +I think there would need to be some config option to enable this. +Otherwise, the user might be surprised if git-annex used a remote that they +didn't want it to use for whatever reason. + +I've opened a todo, [[todo/config_different_remote_to_use_for_write_operations]]. +"""]] diff --git a/doc/todo/config_different_remote_to_use_for_write_operations.mdwn b/doc/todo/config_different_remote_to_use_for_write_operations.mdwn new file mode 100644 index 0000000000..b2d6a4b849 --- /dev/null +++ b/doc/todo/config_different_remote_to_use_for_write_operations.mdwn @@ -0,0 +1,21 @@ +Sometimes the same repository can be accessed via two remotes. One remote +might be readonly, but fast (or not needing a password) while the other one +supports writing. The idea is to have a config setting that makes git-annex +use the latter remote for write operations when the user tells it to +operate on the former remote. + +This is somewhat similar to `remote..annexUrl`, but that is for +different urls that access the same type of remote, eg http and ssh access +to a git repository. + +This would also support --sameas remotes where a data store can be +accessed via two different types of special remotes. + +The config could be something like `remote..annexWrite`. + +Implementation would need to somehow handle cases where a command can both +read and write. Eg, `git-annex sync --content foo` with +remote.foo.annexWrite=bar should use foo for reads, but bar for writes. +So the implementation can't just replace the remote at parameter parse +time. Instead, it seems it would need to modify the Remote object for foo, +making write actions call to the Remote object for bar. diff --git a/doc/todo/copy__47__move_support_for_pushinsteadOf_/comment_10_084e824d6fdace591409bda8a71ed411._comment b/doc/todo/copy__47__move_support_for_pushinsteadOf_/comment_10_084e824d6fdace591409bda8a71ed411._comment new file mode 100644 index 0000000000..cc4666e7d4 --- /dev/null +++ b/doc/todo/copy__47__move_support_for_pushinsteadOf_/comment_10_084e824d6fdace591409bda8a71ed411._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 10""" + date="2025-01-07T16:57:04Z" + content=""" +Note that I've opened a related todo, +[[config_different_remote_to_use_for_write_operations]] +which might be a better approach to the `pushInsteadOf` +type of thing. +"""]]