From db1f42f93da8749282e58194eb57dc3e7cb03484 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 Nov 2012 13:50:20 -0400 Subject: fix newline stripping --- .../comment_4_a81f06191bc03a7aad5929af99f0634e._comment | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/bugs/using_old_remote_format_generates_irritating_output/comment_4_a81f06191bc03a7aad5929af99f0634e._comment b/doc/bugs/using_old_remote_format_generates_irritating_output/comment_4_a81f06191bc03a7aad5929af99f0634e._comment index e47a32d3e..9ea804767 100644 --- a/doc/bugs/using_old_remote_format_generates_irritating_output/comment_4_a81f06191bc03a7aad5929af99f0634e._comment +++ b/doc/bugs/using_old_remote_format_generates_irritating_output/comment_4_a81f06191bc03a7aad5929af99f0634e._comment @@ -13,8 +13,9 @@ There's probably a 1:1 mapping between this special md5 encoding an a regular md
 import Locations
 import Types.Key
+import Utility.Misc
 
-main = interact $ \s -> case file2key s of
+main = interact $ \s -> case file2key $ firstLine s of
         Nothing -> \"bad key\"
         Just k -> hashDirMixed k ++ \" \" ++ hashDirLower k ++ \"\n\"
 
@@ -22,6 +23,6 @@ main = interact $ \s -> case file2key s of
 joey@gnu:~/src/git-annex>ghc --make convert.hs
 joey@gnu:~/src/git-annex>echo WORM--foo | ./ convert
-gw/Vx/ 91d/46e/
+jq/8w/ 2b1/ba3/
 
"""]] -- cgit v1.2.3