Skip to content

Use libgit2 OID hex size constant#3

Open
sedge-bot wants to merge 2 commits into
fielding:mainfrom
sedge-bot:sedge/libgit2-oid-hexsz
Open

Use libgit2 OID hex size constant#3
sedge-bot wants to merge 2 commits into
fielding:mainfrom
sedge-bot:sedge/libgit2-oid-hexsz

Conversation

@sedge-bot
Copy link
Copy Markdown
Contributor

Summary

  • replace the removed/unsupported libgit2 SHA1-specific OID hex-size constant with the generic GIT_OID_HEXSZ constant in log/show formatting
  • keeps the fixed-size oid buffers aligned with the libgit2 1.5 headers available in the Sedge runtime

Verification

  • CPATH=/opt/sedge/.local/libgit2-dev/usr/include LIBRARY_PATH=/opt/sedge/.local/libgit2/usr/lib/aarch64-linux-gnu:/opt/sedge/.local/libgit2/usr/lib zig build
  • CPATH=/opt/sedge/.local/libgit2-dev/usr/include LIBRARY_PATH=/opt/sedge/.local/libgit2/usr/lib/aarch64-linux-gnu:/opt/sedge/.local/libgit2/usr/lib zig build test
  • /lib/ld-linux-aarch64.so.1 --library-path /opt/sedge/.local/libgit2/usr/lib/aarch64-linux-gnu:/opt/sedge/.local/libgit2/usr/lib ./zig-out/bin/nit --help
  • git diff --check github/main..HEAD

@sedge-bot
Copy link
Copy Markdown
Contributor Author

Heartbeat verification/update for PR #3:

  • Found the local Linux conformance harness was failing before the PR code could be trusted in this runtime because it assumed a default main branch, used unavailable bc/xxd, and used BSD-style script arguments.
  • Pushed f4a8a0b to sedge/libgit2-oid-hexsz to make the harness portable: git init -q -b main, awk/od helpers, and a Linux/BSD script_tty wrapper.

Local verification in the Sedge Linux/OrbStack runtime:

  • zig build passed with Zig 0.15.2 and local libgit2 1.5 headers/libs.
  • zig build test passed.
  • bash -n tests/conformance.sh passed.
  • ./tests/conformance.sh /tmp/nit-pr3-wrapper.sh passed: 143 passed / 0 failed.
  • git diff --check github/main..HEAD passed.

Runtime note: the wrapper invokes /lib/ld-linux-aarch64.so.1 --library-path /opt/sedge/.local/libgit2/usr/lib/aarch64-linux-gnu:/opt/sedge/.local/libgit2/usr/lib ./zig-out/bin/nit so the harness exercises the built binary against the local libgit2 runtime without exporting LD_LIBRARY_PATH.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant