Hi, I have clone Mercurial repository from https://bitbucket.org/fbennett/citeproc-js using git 1.8.3.1 and git-remote-hg from https://github.com/felipec/git-remote-hg. When I did I run
$ git fsck
on the result and got this:
$ git fsck
Checking object directories: 100% (256/256), done.
warning in tree ad82bbbe50a28ff5e712c1a18986908168afbf10: contains '.git'
Checking objects: 100% (46524/46524), done.
$
Ignoring that most likely this is most likely a bug in
git-remote-hg, what can I do with such repo?
1) Is there a tool which would find all commits to which tree
ad82bbbe50a28ff5e712c1a18986908168afbf10 belongs?
2) I hoped that
$ git filter-branch --tree-filter \
'git rm --cached -q -f -r .git ||/bin/true' HEAD
might be the cure for my problems. However, it went through
and (even after git gc --prune=now) I still get the same
error in git fsck.
3) Another way of attack was to find by a weird combination git
log and git cat-file -p in crazily long pipe (which I cannot
reproduce right now) that the offending tree could be
somewhere in the commit
a65687ba0176848425c22ea21007deea0406e069
So I ammended the parent commit with the removal of
locale/.git subdirectory and marked the branch as
fixed_commit. Original bad commit which introduced
locale/.git I marked as branch bad_commit and run
$ git rebase --onto fixed_commit bad_commit master
Then I removed the bad_commit and fixed_commit branches and
run git gc --aggressive --prune=now
... git fsck still shows the same error (on the same object)
So, as a last resort I exported whole repository with git
fast-export to a file and imported to a new fresh directory
(with git init beforehand) via git fast-import && git
checkout -f (not sure, which it has to be there, but it
must). And ...
git fsck shows the same error.
(for those who would say, that I should just ignore the warning,
it apparently breaks my attempts to push to a remote git
repository).
Any ideas, what to do?
Best,
Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: [email protected]
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
Do not long for the night, when people vanish in their place.
Be careful, do not turn to evil; for you have preferred this to
affliction.
-- Job 36:20f (NASB)
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
pgpVR3lJbZltO.pgp
Description: PGP signature
