vim-pandoc / vim-markdownfootnotes

Insert Extended Markdown Footnotes in Vim
36 stars 12 forks source link

Fix git repository corruption #5

Closed alerque closed 5 years ago

alerque commented 5 years ago

This repository has had a long standing issue with an invalid object in a commit. If git option for fsckObjects is set to true, the repository cannot be cloned:

❯ git clone git@github.com:vim-pandoc/vim-markdownfootnotes.git
Cloning into 'vim-markdownfootnotes'...
remote: Enumerating objects: 61, done.
error: object 03bd5b16bcd2add179d28dfb7252384770082880: badTimezone: invalid author/committer line - bad time zone
fatal: fsck error in packed object
fatal: index-pack failed

For years I've worked around this by temporarily disabling this setting in my user's git-config, cloning the repository, then turning the setting back on. In my bootstrap scripts I pass extra arguments to git for this project in particular that none of my other clones require.

Unfortunately since this was not caught and fixed by running git fsck early, fixing it is hard. Or at least awkward. There are actually two objects that need fixing:

❯ git fsck
Checking object directories: 100% (256/256), done.
error in commit 03bd5b16bcd2add179d28dfb7252384770082880: badTimezone: invalid author/committer line - bad time zone
error in commit 7d48d84e93060e1b5aa05fdcdc782690e7d3801e: badTimezone: invalid author/committer line - bad time zone
Checking objects: 100% (61/61), done.

These are of course the initial 2 commits in this repository. Fixing them means rebasing all the other commits. This will mean everybody's clones will also need rebasing.

I would suggest that this is worth doing, and doing sooner rather than later. However since it is a bit of a disruptive change I will hold off actually doing it until there is some consensus that this is okay.

Alternatives to rebasing this would be to rename this repository as a "legacy" repo and open a new one that is not a fork of this one and post the clean branch there. I don't support this option, but it's the only other way I can think of to deal with the problem.

Lastly doing noting and just letting all future cloners deal with this in their own way is an option. Again I don't support this because it's so disruptive to anybody that has integrity checks turned on, but it is an option.

fmoralesc commented 5 years ago

These are of course the initial 2 commits in this repository. Fixing them means rebasing all the other commits. This will mean everybodies clones will also need rebasing.

I would suggest creating a commit to add a warning (maybe to the README) that this will be done within, let's say, a couple of weeks, and then just do it.

alerque commented 5 years ago

Sounds fair to me. See this commit for the warning I added.

fmoralesc commented 5 years ago

Perfect ;)

(I had no idea about the setting for integrity checking, btw, TIL)

On Mon, Apr 1, 2019, 1:33 PM Caleb Maclennan notifications@github.com wrote:

Sounds fair to me. See this commit https://github.com/vim-pandoc/vim-markdownfootnotes/commit/4ec778c116ee16ce5dc38f13a98d85d7e9206773 for the warning I added.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vim-pandoc/vim-markdownfootnotes/issues/5#issuecomment-478542911, or mute the thread https://github.com/notifications/unsubscribe-auth/AANhGWxxq_sBmObeYUEwsklLUiYdLnGQks5vce6EgaJpZM4cVOWB .

alerque commented 5 years ago

The entire repository was rebased to correct the two invalid commits. See the README for details on how to update clones.