summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-18 16:47:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-18 16:47:20 -0400
commit75ad0f22d84603fa609acb5a62f4cc4dcd86ee72 (patch)
treec1c3c78cbfdbda2e2fbf70f97dd053afecf85ebf /doc
parent69841b67c9dfc58d33735b6e15d81099b5f502e7 (diff)
analysis
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/fsck_output.mdwn32
1 files changed, 22 insertions, 10 deletions
diff --git a/doc/bugs/fsck_output.mdwn b/doc/bugs/fsck_output.mdwn
index 81fecceb3..413336b31 100644
--- a/doc/bugs/fsck_output.mdwn
+++ b/doc/bugs/fsck_output.mdwn
@@ -1,16 +1,28 @@
When you check several files and the fsck fails, you get confusing output:
<pre>
-fsck test1 (checksum...)
- Only 1 of 2 trustworthy copies of test1 exist.
- Back it up with git-annex copy.
-
-failed
-fsck test2 (checksum...)
- Only 1 of 2 trustworthy copies of test2 exist.
- Back it up with git-annex copy.
-
-failed
+O fsck test1 (checksum...)
+E Only 1 of 2 trustworthy copies of test1 exist.
+E Back it up with git-annex copy.
+O
+O failed
+O fsck test2 (checksum...)
+E Only 1 of 2 trustworthy copies of test2 exist.
+E Back it up with git-annex copy.
+O
+O failed
</pre>
The newline is in the wrong place and confuses the user. It should be printed _after_ "failed".
+
+> This is a consequence of part of the output being printed to stderr, and
+> part to stdout. I've marked the lines above with E and O.
+>
+> Normally a "failed" is preceeded by a message output to stdout desribing
+> the problem; such a message will not be "\n" terminated, so a newline
+> is always displayed before "failed". In this case, since the message
+> is sent to stderr, it is newline terminated.
+>
+> Fixing this properly would involve storing state, or rethinking
+> when git-annex displays newlines (and I rather like its behavior
+> otherwise). --[[Joey]]