Each hash implementation should define git_hash_global_init#5026
Conversation
This means the forward declaration isn't necessary. The forward declaration can cause compilation errors as it conflicts with the `GIT_INLINE` declaration (the signatures are different).
|
This seems reasonable. But if you're using anything but SHA1DC then that's a Big Red Flag. |
Oh, I see. The only implementation that wouldn't throw a warning is the win32 implementation since it's the only one that's not OK. Seems reasonable enough. |
Yep, that's correct. Looks like the x86 mingw build is failing due to what looks like a network error. I don't think the failure is related to this change. |
|
Cool. Thanks! |
|
Yeah, this has also been part of #4438 👍 So thanks for this, less stuff to review in the other PR ;) |
|
This commit makes compiling libgit2 with VS2017 15.9.10 fail:
|
|
@csware I can't reproduce this, I'm building with VS 2017 (15.9.5) with no problem. |
|
@csware Oh, I see. You must be building with the Win32 SHA1 provider. First, I would encourage you not to do that. As Linus mentioned, Git doesn't use SHA1, it uses SHA1DC. We haven't removed the other options because it doesn't make sense given the impending move to SHA256. Regardless, I'll push up a fix. |
This means the forward declaration isn't necessary. The forward
declaration can cause compilation errors as it conflicts with the
GIT_INLINEdeclaration (the signatures are different)./cc @rafeca