inkarkat / vim-mark

Highlight several words in different colors simultaneously.
http://www.vim.org/scripts/script.php?script_id=2666
266 stars 32 forks source link

Corupted git repository & git fsck needed ? #4

Closed Kris2k closed 6 years ago

Kris2k commented 6 years ago

Hi I think some commit are corupted during git clone git@github.com:inkarkat/vim-mark.git when in .gitconfig

[transfer]
    fsckobjects = true
[fetch]
    fsckobjects = true
[receive]
    fsckObjects = true

I got error

error: object 62aa8276d8f3dac379b70c673baead4e11dbc1ec: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed

Without those settings I am able to clone repository but git fsck is needed

#-> git fsck
Checking object directories: 100% (256/256), done.
error in commit 62aa8276d8f3dac379b70c673baead4e11dbc1ec: badTimezone: invalid author/committer line - bad time zone
error in commit 0dad50d4b4fbf4fa12911e133dde2989cb482ea9: badTimezone: invalid author/committer line - bad time zone
error in commit 5cc4fb24c1f138a385e9a900854d2c7adda04dfc: badTimezone: invalid author/committer line - bad time zone
error in commit fc87ef1374b417f68c5c513c5baa3adc01e07078: badTimezone: invalid author/committer line - bad time zone
error in commit 0ab4b7e435dfc19c005e52844248afaeb941c361: badTimezone: invalid author/committer line - bad time zone
error in commit 30664f3a8ff17a3bc813167d7f714a007340035e: badTimezone: invalid author/committer line - bad time zone
Checking objects: 100% (975/975), done
Kris2k commented 6 years ago

For reference you can check https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743227 or https://groups.google.com/forum/#!topic/binary-transparency/f-BI4o8HZW0

inkarkat commented 6 years ago

a bit of history

The Mark plugin originally was created by another developer (up to version 1.1.8), outside of Git. There's a http://vim-scripts.org/ mirror that reads the released plugin versions from http://www.vim.org/ and commits them into a GitHub repository (for easier consumption with plugin managers). When I took over development, this also was done outside of Git. When I (recently) moved the plugin code to Git, I based my changes on that vimscripts fork (you'll notice that this repo is forked from vim-scripts/Mark).

analysis

Those invalid author/committer line - bad time zone commits are from the original vimscripts.org import. I don't think it's actual corruption of data, just some metadata that isn't in the format that Git expects.

Thank you for alerting me to the issue; it's a very interesting aspect of Git that I wasn't aware of so far (and I agree that it's a good practice to enable those fsck settings). However, I don't think there's much I can do to fix this, other that somehow rewriting the entire history, which probably has worse consequences than having to live with these very old invalid commits. I hope you agree.