Search code examples
gitgit-lfs

Error "duplicate entry names" while migrating existing repository data to LFS using git-lfs-migrate


I got this error stack

...
[main] INFO git.lfs.migrate.Main -   processed: 230934/230934
[main] INFO git.lfs.migrate.Main -   Converting object with dependencies in single thread...
[main] INFO git.lfs.migrate.Main -   processed: 1/231174
[main] INFO git.lfs.migrate.Main -   processed: 229/231174
Exception in thread "main" org.eclipse.jgit.errors.CorruptObjectException: duplicate entry names
    at org.eclipse.jgit.lib.ObjectChecker.report(ObjectChecker.java:728)
    at org.eclipse.jgit.lib.ObjectChecker.checkTree(ObjectChecker.java:658)
    at org.eclipse.jgit.lib.ObjectChecker.checkTree(ObjectChecker.java:594)
    at git.lfs.migrate.GitConverter$4.convert(GitConverter.java:231)
    at git.lfs.migrate.Main.processSingleThread(Main.java:208)
    at git.lfs.migrate.Main.processRepository(Main.java:169)
    at git.lfs.migrate.Main.main(Main.java:84)

When executing this kind of query with git-lfs-migrate recommended by Git LFS Tutorial for migrating existing repository data to Git LFS

java -jar jar_path\git-lfs-migrate.jar -s source_path\.git -d dest_path\.git -t 8 "*.bin" "*.bmp" "*.db" "*.dll" "*.exe" "*.exp" "*.lib" "*.msi" "*.obj" "*.pdb" "*.pdf" "*.png" "*.psd" "*.rar" "*.whl" "*.zip"

Anyone know how to fix this or at least get more info on the "duplicate entry names" like filename in conflicts?


Solution

  • For the record. I don't know how, but I got 2 files with the same name in the same dir in my git history. The only difference was an encododed accent (see image below). Windows displayed only 1 file in explorer because they had the same name, but I could see the 2 different files in the file tree of Git Extensions. I fixed it in git history and everything work!