From a2e6d99debd572c2538b2b3182072afd38d78f44 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 Nov 2024 15:55:32 -0400 Subject: [PATCH] show remote name when failing to help debug strange git behavior on some daily builds --- CmdLine/GitRemoteAnnex.hs | 2 +- ..._a49f83b0444f119fa04386c9fb3c9566._comment | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 doc/bugs/tests_started_to_fail_recently/comment_6_a49f83b0444f119fa04386c9fb3c9566._comment diff --git a/CmdLine/GitRemoteAnnex.hs b/CmdLine/GitRemoteAnnex.hs index 0b5505c52c..ef1801dd94 100644 --- a/CmdLine/GitRemoteAnnex.hs +++ b/CmdLine/GitRemoteAnnex.hs @@ -85,7 +85,7 @@ run (remotename:url:[]) = do case parseSpecialRemoteNameUrl remotename u of Right src -> checkallowed src >>= run' u Left e -> giveup e -run (_remotename:[]) = giveup "remote url not configured" +run (remotename:[]) = giveup $ "remote url not configured for " ++ remotename run _ = giveup "expected remote name and url parameters" run' :: String -> SpecialRemoteConfig -> Annex () diff --git a/doc/bugs/tests_started_to_fail_recently/comment_6_a49f83b0444f119fa04386c9fb3c9566._comment b/doc/bugs/tests_started_to_fail_recently/comment_6_a49f83b0444f119fa04386c9fb3c9566._comment new file mode 100644 index 0000000000..30d5b99428 --- /dev/null +++ b/doc/bugs/tests_started_to_fail_recently/comment_6_a49f83b0444f119fa04386c9fb3c9566._comment @@ -0,0 +1,33 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 6""" + date="2024-11-21T19:36:58Z" + content=""" +And here's why it's failing still on OSX and that 1 ubuntu "custom-config1" run: + + git clone from special remote (after git push with output: Full remote url: annex::89ddefa4-a04c-11ef-87b5-e880882a4f98?encryption=none&type=directory + git-annex: remote url not configured + Push failed (Failed to upload GITBUNDLE-s3832--89ddefa4-a04c-11ef-87b5-e880882a4f98-b73a51289d659d73054ee531b45825da3061213d32d47aeb998f4abeb591a88d) + warning: helper reported unexpected status of push + warning: helper reported unexpected status of push + Everything up-to-date + +Fascinating. It seems that git-remote-annex has been run twice. The first time +seemed to do something successfully, since it reported the "Full remote url". +Probably that first run is git using it to see what refs are on the remote. + +The second time, git ran git-remote-annex with only 1 argument, rather than the +expected 2. Why would git do that? And only in these few situations? + +According to gitremote-helpers: + + Additionally, when a configured remote has remote..vcs set to , Git explicitly invokes git remote- + with as the first argument. If set, the second argument is remote..url; otherwise, the second argument is omitted. + +But that does not apply. The docs don't seem to give any other reason why +the second argument would be omitted. Although the docs do say it's optional. + +I've improved git-remote-annex output in this situation, so it will show +wha the first parameter is. That might help understand out what git is trying to +do here. +"""]] -- 2.30.2