avoid surprising "not found" error when copying to a http remote
git-annex copy --to a http remote will of course fail, as that's not supported. But git-annex copy first checks if the content is already present in the remote, and that threw a "not found". Looks to me like other remotes that use Url.checkBoth in their checkPresent do just return false when it fails. And Url.checkBoth does display errors when unusual errors occur. So I'm pretty sure removing this error message is ok. Sponsored-by: Jarkko Kniivilä on Patreon
This commit is contained in:
parent
645a66a084
commit
04247fb4d0
2 changed files with 39 additions and 4 deletions
|
@ -407,10 +407,9 @@ inAnnex' repo rmt st@(State connpool duc _ _ _) key
|
|||
where
|
||||
checkhttp = do
|
||||
gc <- Annex.getGitConfig
|
||||
ifM (Url.withUrlOptionsPromptingCreds $ \uo -> anyM (\u -> Url.checkBoth u (fromKey keySize key) uo) (keyUrls gc repo rmt key))
|
||||
( return True
|
||||
, giveup "not found"
|
||||
)
|
||||
Url.withUrlOptionsPromptingCreds $ \uo ->
|
||||
anyM (\u -> Url.checkBoth u (fromKey keySize key) uo)
|
||||
(keyUrls gc repo rmt key)
|
||||
checkremote = P2PHelper.checkpresent (Ssh.runProto rmt connpool (cantCheck rmt)) key
|
||||
checklocal = ifM duc
|
||||
( guardUsable repo (cantCheck repo) $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue