diff --git a/CHANGELOG b/CHANGELOG index 8d9abccf83..7139aaf599 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,8 @@ git-annex (6.20160809) UNRELEASED; urgency=medium * Make --json and --quiet suppress automatic init messages, and any other messages that might be output before a command starts. Fixes a reversion introduced in version 5.20150727. + * Assistant, repair: Filter out git fsck lines about duplicate file + entries in tree objects. -- Joey Hess Mon, 05 Sep 2016 11:51:49 -0400 diff --git a/Git/Fsck.hs b/Git/Fsck.hs index f3e6db9f92..f85023dc1c 100644 --- a/Git/Fsck.hs +++ b/Git/Fsck.hs @@ -104,6 +104,8 @@ findShas :: Bool -> String -> [Sha] findShas supportsNoDangling = catMaybes . map extractSha . concat . map words . filter wanted . lines where wanted l + -- Skip lines like "error in tree : duplicateEntries: contains duplicate file entries" + | "duplicateEntries" `isPrefixOf` l = False | supportsNoDangling = True | otherwise = not ("dangling " `isPrefixOf` l) diff --git a/doc/forum/how_to_disaster_recovery/comment_5_9b9403a80c5b0a1a441dfb94feece37d._comment b/doc/forum/how_to_disaster_recovery/comment_5_9b9403a80c5b0a1a441dfb94feece37d._comment new file mode 100644 index 0000000000..52f1d1e454 --- /dev/null +++ b/doc/forum/how_to_disaster_recovery/comment_5_9b9403a80c5b0a1a441dfb94feece37d._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2016-09-05T20:02:39Z" + content=""" +Very interesting git fsck output! + +It seems like your git repository has somehow gotten a tree object in it +which contains two files with the same name. + +While git's data structures allow this, it's pretty nonsensical, and it's +not something that would normally ever happen. It would be interesting to +take a look and see what commits use those tree objects, and where those +strange trees came from. + +git-annex in turn is seeing that tree object's sha in the fsck output and +assumes fsck means that the data for that object is broken or missing. +So, I suppose what I'll do is make it skip over lines containing +`duplicateEntries`, and then it won't try to repair this repository. +"""]]