jazzband / django-taggit

Simple tagging for django
https://django-taggit.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.33k stars 622 forks source link

cannot clone this repo #909

Open agowa opened 2 months ago

agowa commented 2 months ago

Hi,

when trying to clone this (and only this) repository using git clone https://github.com/jazzband/django-taggit.git I get this error:

Cloning into 'django-taggit'...
remote: Enumerating objects: 5165, done.
remote: Counting objects: 100% (1232/1232), done.
remote: Compressing objects: 100% (441/441), done.
error: object c0725b93cd0bfdc1038f45b631273af16a160a6d: zeroPaddedFilemode: contains zero-padded file modes
fatal: fsck error in packed object
fatal: fetch-pack: invalid index-pack output
rtpg commented 2 months ago

Hey, I don't know what's going on there but searching around it seems like you can turn off the fsck checks? See this discussion

Not clear to me what object this is, though I see the errors when calling git fsck locally (well, the warnings....). Maybe a shallow clone (--depth=1) might work?

agowa commented 2 months ago

I opened this issue to let you know so that you can fix the repository. Even though I can work around the issue doesn't mean everyone can (or should have to). Also it breaks a lot of scripts and I do not know if GUI tools will be able to clone the repo at all...

Also from my error message it is object c0725b93cd0bfdc1038f45b631273af16a160a6d

You can look here https://git-scm.com/book/en/v2/Git-Internals-Git-Objects for information on how to work with this object hash.

Edit: Btw, the workaround is: git clone --config transfer.fsckobjects=false --config receive.fsckobjects=false --config fetch.fsckobjects=false https://github.com/jazzband/django-taggit.git

Edit 2: Identifying the object and referencing commit:

$ git cat-file -t c0725b93cd0bfdc1038f45b631273af16a160a6d
tree
$ git cat-file -p c0725b93cd0bfdc1038f45b631273af16a160a6d
100644 blob 4d99efbad3a823c78d52630b00ec68e91048975c    .gitignore
100644 blob 45e1ffc8d8c9576a76799b411d5c585f1a7b1e5a    AUTHORS.txt
100644 blob 1231bbea4bb396e359889b55eea36cd245a13da1    LICENSE.txt
100644 blob 09a015af1a8eee1e535b90cdc235d9d0808274e9    README.txt
040000 tree d972493a8aa4bc9a2a16935e8f3f459dba92b1a9    docs
100755 blob 52eac7f2de8876e8d9359de1a129a809db126b07    runtests.py
100644 blob 7d65dc3165290a5058108bc09a163f0f132a4d23    setup.py
040000 tree 45b881bb867549343beaff6558885d93382f8802    taggit
$ git log --pretty=raw | grep -B 1 c0725b93cd0bfdc1038f45b631273af16a160a6d
commit 54ce3c1b54b7f4bfaa50ec4936665306144d9ff6
tree c0725b93cd0bfdc1038f45b631273af16a160a6d
$ git show 54ce3c1b54b7f4bfaa50ec4936665306144d9ff6
commit 54ce3c1b54b7f4bfaa50ec4936665306144d9ff6
Author: Alex Gaynor <alex.gaynor@gmail.com>
Date:   2010-06-03 15:47:45 -0700

    Added a link to the mailinglist.

diff --git a/README.txt b/README.txt
index e74303e2b632..09a015af1a8e 100644
--- a/README.txt
+++ b/README.txt
@@ -30,4 +30,6 @@ Tags will show up for you automatically in forms and the admin.

 ``django-taggit`` requires Django 1.1 or greater.

-For more info checkout out the documentation.
+For more info checkout out the documentation.  And for questions about usage or
+development you can contact the
+`mailinglist <http://groups.google.com/group/django-taggit>`_.
\ No newline at end of file
rtpg commented 2 months ago

@agowa of course. Would you know what a fix is? Some of the threads seem to imply I would have to rewrite every SHA (since 2010 in that case), which seems a bit agressive but.... maybe doable given we don't have that much activity on the repo.

agowa commented 2 months ago

Sadly that is also the only solution I know of...