From d345e7220e33a744765ed6f5caf8be5014712671 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 17 Mar 2017 12:28:08 -0400 Subject: git-annex-shell: run all commands with noMessages Fix bug when used with a recently cloned repository, where "merging" messages were included in the output of configlist (and perhaps other commands) and caused a "Failed to get annex.uuid configuration" error. This does not seem to have been a reversion. I saw this with configlist, but it seems possible for other commands to be effected, and it might not always happen only after a fresh clone. Eg, if a foo/git-annex branch is pushed to the remote, the next git-annex-shell will auto-merge it and display the message. Decided to run all git-annex-shell commands with noMessages, even ones that don't currently use stdout for structured communication. Better to keep open the possibility for using stdout in the future. This commit was supported by the NSF-funded DataLad project --- CHANGELOG | 4 ++++ CmdLine/GitAnnexShell.hs | 2 +- doc/bugs/sync_with_clone_protocol_error.mdwn | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 443adb64d..281c59d7f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,10 @@ git-annex (6.20170301.2) UNRELEASED; urgency=medium directory, feed, and http-types. * Windows: Fix bug in shell script shebang lookup code that caused a "delayed read on closed handle" error. + * git-annex-shell: Fix bug when used with a recently cloned repository, + where "merging" messages were included in the output of configlist + (and perhaps other commands) and caused a "Failed to get annex.uuid + configuration" error. -- Joey Hess Thu, 02 Mar 2017 12:51:40 -0400 diff --git a/CmdLine/GitAnnexShell.hs b/CmdLine/GitAnnexShell.hs index 70c86ec2f..154bfeb38 100644 --- a/CmdLine/GitAnnexShell.hs +++ b/CmdLine/GitAnnexShell.hs @@ -48,7 +48,7 @@ cmds_notreadonly = ] cmds :: [Command] -cmds = map adddirparam $ cmds_readonly ++ cmds_notreadonly +cmds = map (adddirparam . noMessages) (cmds_readonly ++ cmds_notreadonly) where adddirparam c = c { cmdparamdesc = "DIRECTORY " ++ cmdparamdesc c } diff --git a/doc/bugs/sync_with_clone_protocol_error.mdwn b/doc/bugs/sync_with_clone_protocol_error.mdwn index 47b61483c..2ae0cab42 100644 --- a/doc/bugs/sync_with_clone_protocol_error.mdwn +++ b/doc/bugs/sync_with_clone_protocol_error.mdwn @@ -11,3 +11,5 @@ Next git-annex sync clam worked ok and got the UUID. clam has git-annex 6.20170101 installed. --[[Joey]] + +> [[fixed|done]] --[[Joey]] -- cgit v1.2.3