summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-17 12:28:08 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-17 12:32:43 -0400
commitd345e7220e33a744765ed6f5caf8be5014712671 (patch)
treeb2b0e9f5821c47553238b8add4ffc0e130d902dd
parent2e22df59273ddb39ea8f5545e8ac4830a4a31b7c (diff)
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
-rw-r--r--CHANGELOG4
-rw-r--r--CmdLine/GitAnnexShell.hs2
-rw-r--r--doc/bugs/sync_with_clone_protocol_error.mdwn2
3 files changed, 7 insertions, 1 deletions
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 <id@joeyh.name> 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]]