Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cog commit fails #278

Closed
q0w opened this issue Apr 4, 2023 · 7 comments
Closed

cog commit fails #278

q0w opened this issue Apr 4, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@q0w
Copy link

q0w commented Apr 4, 2023

Describe the bug
I get

Error: fatal error
cause: invalid data in index - calculated checksum does not match expected; class=Index (10)

when using any cog feat/chore/ commands

To Reproduce

  1. cog init test
  2. cd test
  3. git checkout -b test-branch
  4. touch a
  5. git add a
  6. cog commit feat "Add a"

Expected behavior
cog commit feat succeeds

Additional context
Add any other context about the problem here.
os: Arch Linux
cog: 5.3.1
git: 2.40.0

@q0w q0w added the bug Something isn't working label Apr 4, 2023
@oknozor
Copy link
Collaborator

oknozor commented May 11, 2023

Unable to reproduce with the following:
os: Arch Linux
cog: 5.3.1
git: 2.40.1

Can you update git and reinstall cocogitto and try again? libgit2 bindings are often broken in cocogitto between git updates.

@q0w
Copy link
Author

q0w commented May 11, 2023

Tried with git 2.40.1 and recompiled cog 5.3.1, still failed...

@oknozor
Copy link
Collaborator

oknozor commented May 11, 2023

can you post your gitconfig here ?

@q0w
Copy link
Author

q0w commented May 11, 2023

[includeIf "gitdir:~/pr/hub/"]
    path = ~/.config/git/github.conf
[alias]
	ci = commit
	br = branch
	co = checkout
	st = status
    sts = status -s
	unstage = reset HEAD --
	last = log -1 HEAD
	lol = log --oneline
[color]
    ui = true
[core]
    autocrlf = input
    #pager = delta
[interactive]
    diffFilter = delta --color-only
[delta]
    navigate = true
    light = false
[merge]
    conflictstyle = diff3
[diff]
    colorMoved = default
[filter "lfs"]
	required = true
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
[pull]
	ff = only
[fetch]
    prune = true
[feature]
	manyFiles = 1
[init]
	defaultBranch = main

@q0w
Copy link
Author

q0w commented May 11, 2023

I tried in /tmp folder with default git config

[core]
	bare = false
	repositoryformatversion = 0
	filemode = true
	logallrefupdates = true
[user]
	name = tt
	email = t@t.com

Same error

@oknozor
Copy link
Collaborator

oknozor commented May 23, 2023

Seems this is a libgit2 issue libgit2/libgit2#6531

Could you try disabling index.skipHash explicitly ?

@q0w
Copy link
Author

q0w commented May 23, 2023

It works, thx

@oknozor oknozor closed this as completed May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants