Assistant, repair: Filter out git fsck lines about duplicate file entries in tree objects.
This commit is contained in:
parent
2610103a48
commit
dd0dff9dc4
3 changed files with 24 additions and 0 deletions
|
@ -9,6 +9,8 @@ git-annex (6.20160809) UNRELEASED; urgency=medium
|
||||||
* Make --json and --quiet suppress automatic init messages, and any
|
* Make --json and --quiet suppress automatic init messages, and any
|
||||||
other messages that might be output before a command starts.
|
other messages that might be output before a command starts.
|
||||||
Fixes a reversion introduced in version 5.20150727.
|
Fixes a reversion introduced in version 5.20150727.
|
||||||
|
* Assistant, repair: Filter out git fsck lines about duplicate file
|
||||||
|
entries in tree objects.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Mon, 05 Sep 2016 11:51:49 -0400
|
-- Joey Hess <id@joeyh.name> Mon, 05 Sep 2016 11:51:49 -0400
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,8 @@ findShas :: Bool -> String -> [Sha]
|
||||||
findShas supportsNoDangling = catMaybes . map extractSha . concat . map words . filter wanted . lines
|
findShas supportsNoDangling = catMaybes . map extractSha . concat . map words . filter wanted . lines
|
||||||
where
|
where
|
||||||
wanted l
|
wanted l
|
||||||
|
-- Skip lines like "error in tree <sha>: duplicateEntries: contains duplicate file entries"
|
||||||
|
| "duplicateEntries" `isPrefixOf` l = False
|
||||||
| supportsNoDangling = True
|
| supportsNoDangling = True
|
||||||
| otherwise = not ("dangling " `isPrefixOf` l)
|
| otherwise = not ("dangling " `isPrefixOf` l)
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
"""]]
|
Loading…
Reference in a new issue