From 49aad120b92ccaaa496a8b6c3af5c14cda3604fe Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Tue, 31 Dec 2013 16:39:11 -0400
Subject: [PATCH] Windows: Fix bug in direct mode merge code that could cause
 files in subdirectories to go missing.

---
 Git/DiffTree.hs                                          | 2 +-
 debian/changelog                                         | 2 ++
 ...ws_with___34__conflictor_directory_missing__34__.mdwn | 9 +++++++++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Git/DiffTree.hs b/Git/DiffTree.hs
index e7787caee5..c82cf78cd0 100644
--- a/Git/DiffTree.hs
+++ b/Git/DiffTree.hs
@@ -87,7 +87,7 @@ parseDiffTree l = go l []
 		, srcsha = fromMaybe (error "bad srcsha") $ extractSha ssha
 		, dstsha = fromMaybe (error "bad dstsha") $ extractSha dsha
 		, status = s
-		, file = asTopFilePath $ Git.Filename.decode f
+		, file = asTopFilePath $ fromInternalGitPath $ Git.Filename.decode f
 		}
 	  where
 		readmode = fst . Prelude.head . readOct
diff --git a/debian/changelog b/debian/changelog
index b767d86b07..ff1e9a09f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 git-annex (5.20131231) UNRELEASED; urgency=medium
 
   * external special remote protocol: Added GETUUID.
+  * Windows: Fix bug in direct mode merge code that could cause files
+    in subdirectories to go missing.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 31 Dec 2013 13:41:18 -0400
 
diff --git a/doc/bugs/Test_test__95__mixed__95__conflict__95__resolution_fails_on_Windows_with___34__conflictor_directory_missing__34__.mdwn b/doc/bugs/Test_test__95__mixed__95__conflict__95__resolution_fails_on_Windows_with___34__conflictor_directory_missing__34__.mdwn
index 0aa24a91ee..8dd74acc38 100644
--- a/doc/bugs/Test_test__95__mixed__95__conflict__95__resolution_fails_on_Windows_with___34__conflictor_directory_missing__34__.mdwn
+++ b/doc/bugs/Test_test__95__mixed__95__conflict__95__resolution_fails_on_Windows_with___34__conflictor_directory_missing__34__.mdwn
@@ -1164,3 +1164,12 @@ git annex sync
 cd ..
 dir repo r1 r2
 """]]
+
+> Yet another wonderful case of \\ vs / confusion. [[fixed|done]].
+> 
+> That sucked, but I am rather stunned that the rest of the test
+> suite passes for you. That's a lot better that it's ever done on windows
+> before. Sadly I don't have as much luck on XP, still 9 failing tests
+> there.
+> 
+> --[[Joey]]