sync, push: Avoid trying to send individual files to special remotes configured with...
authorJoey Hess <joeyh@joeyh.name>
Tue, 26 Dec 2023 19:56:39 +0000 (15:56 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 26 Dec 2023 19:56:58 +0000 (15:56 -0400)
That will always fail. It already skipped doing this when exporttree=yes.

CHANGELOG
Command/Sync.hs
doc/forum/Don__39__t_copy_files_to_exporttree__61__no_remote/comment_5_e9ea995c99785dd6dffba91ef0fceb02._comment [new file with mode: 0644]

index 426f0351144b2f3c7b3df23904c7f1dcbc350934..936d00b61ac2bdbf3f638a1daaa908e8b37d9c47 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,6 +23,8 @@ git-annex (10.20231130) UNRELEASED; urgency=medium
   * sync: Fix locking problems during merge when annex.pidlock is set.
   * Avoid a problem with temp file names ending in "." on certian
     filesystems that have problems with such filenames.
+  * sync, push: Avoid trying to send individual files to special remotes
+    configured with importtree=yes exporttree=no, which would always fail.
 
  -- Joey Hess <id@joeyh.name>  Thu, 30 Nov 2023 14:48:12 -0400
 
index d4bbafef279234cb4776fa70c6685cba5439ee4f..260740d5b50dae576113ba817c0279f2dc972f4e 100644 (file)
@@ -955,7 +955,7 @@ syncFile o ebloom rs af k = do
        wantput r
                | pushOption o == False && operationMode o /= SatisfyMode = return False
                | Remote.readonly r || remoteAnnexReadOnly (Remote.gitconfig r) = return False
-               | isExport r = return False
+               | isExport r || isImport r = return False
                | isThirdPartyPopulated r = return False
                | otherwise = wantGetBy True (Just k) af (Remote.uuid r)
        handleput lack inhere
diff --git a/doc/forum/Don__39__t_copy_files_to_exporttree__61__no_remote/comment_5_e9ea995c99785dd6dffba91ef0fceb02._comment b/doc/forum/Don__39__t_copy_files_to_exporttree__61__no_remote/comment_5_e9ea995c99785dd6dffba91ef0fceb02._comment
new file mode 100644 (file)
index 0000000..dfbd568
--- /dev/null
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 5"""
+ date="2023-12-26T19:44:23Z"
+ content="""
+I reproduced it with the current version and a remote set up with:
+
+       git-annex initremote test type=directory directory=../d encryption=none exporttree=no importtree=yes
+       git config remote.directory.annex-tracking-branch master
+
+Fixed for tomorrow's release.
+"""]]