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

--object-format=sha256 support #1475

Open
cblp opened this issue Aug 6, 2022 · 1 comment
Open

--object-format=sha256 support #1475

cblp opened this issue Aug 6, 2022 · 1 comment

Comments

@cblp
Copy link

cblp commented Aug 6, 2022

When I git init --object-format=sha256 I receive

Traceback (most recent call last):
  ...
  File "/usr/local/lib/python3.9/site-packages/git/repo/fun.py", line 163, in name_to_object
    raise BadName(name)
gitdb.exc.BadName: Ref 'HEAD' did not resolve to an object

because the hash size is longer

@Byron
Copy link
Member

Byron commented Aug 7, 2022

Indeed, the custom rev-parsing doesn't know this format, but could certainly learn about it. I don't know where else there would be breakage though and don't expect supporting Sha256 properly would be easy.

In the mean time, the only workaround I see is to use git directly, maybe using the repo wrapper e.g. repo.git.rev_parse(…).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants