{"id":16157069,"url":"https://github.com/charlesrocket/ghext","last_synced_at":"2026-03-08T00:31:27.533Z","repository":{"id":249784450,"uuid":"832505586","full_name":"charlesrocket/ghext","owner":"charlesrocket","description":"Compact git HEAD hash extractor","archived":false,"fork":false,"pushed_at":"2025-12-13T15:53:52.000Z","size":169,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-12-15T08:38:51.082Z","etag":null,"topics":["git","sha1","sha256"],"latest_commit_sha":null,"homepage":"https://charlesrocket.github.io/ghext/","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charlesrocket.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"charlesrocket","ko_fi":"charlesrocket","custom":"https://www.paypal.me/charlesrocket"}},"created_at":"2024-07-23T06:55:11.000Z","updated_at":"2025-12-13T15:53:54.000Z","dependencies_parsed_at":"2025-09-06T00:36:34.532Z","dependency_job_id":"9abb6f56-48a6-4f67-9b8e-81b7ddef3fad","html_url":"https://github.com/charlesrocket/ghext","commit_stats":null,"previous_names":["charlesrocket/libgitsk","charlesrocket/ghext"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/charlesrocket/ghext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesrocket%2Fghext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesrocket%2Fghext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesrocket%2Fghext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesrocket%2Fghext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charlesrocket","download_url":"https://codeload.github.com/charlesrocket/ghext/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesrocket%2Fghext/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30238852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:30:53.000Z","status":"ssl_error","status_checked_at":"2026-03-08T00:30:44.061Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","sha1","sha256"],"created_at":"2024-10-10T01:47:58.757Z","updated_at":"2026-03-08T00:31:27.502Z","avatar_url":"https://github.com/charlesrocket.png","language":"Zig","readme":"# `ghext`\n[![CI](https://github.com/charlesrocket/ghext/actions/workflows/ci.yml/badge.svg?branch=trunk)](https://github.com/charlesrocket/ghext/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/charlesrocket/ghext/branch/trunk/graph/badge.svg)](https://codecov.io/gh/charlesrocket/ghext)\n\nExtract the hashes of last commits from `git` repositories with `ghext`.\n\n## Installation\n\n`build.zig.zon`:\n```zig\n.ghext = .{\n    .url = \"https://github.com/charlesrocket/ghext/archive/refs/tags/0.7.3.tar.gz\",\n    .hash = \"ghext-0.7.3-dKaQNz1QAACVOGFjt6xRQR2hwo4u3Wa-hYXdl_hYSVn2\",\n},\n```\n\n## Usage\n\n\u003e [!NOTE]\n\u003e `git` binary is not required.\n\n[Example](https://github.com/charlesrocket/xtxf/blob/trunk/build.zig)\n\n### Build system\n\n`build.zig`:\n```zig\nconst Ghext = @import(\"ghext\").Ghext;\nconst build_options = b.addOptions();\n\nexe.root_module.addOptions(\"build_options\", build_options);\nbuild_options.addOption([]const u8, \"version\", version(b));\n\nfn version(b: *std.Build) []const u8 {\n    const semver = manifest.version;\n    var gxt = Ghext.init(std.heap.page_allocator) catch return semver;\n    const hash = gxt.hash(Ghext.HashLen.Short, Ghext.Worktree.Checked);\n    return b.fmt(\"{s} {s}\", .{ semver, hash });\n}\n\nconst manifest: struct {\n    const Dependency = struct {\n        url: []const u8,\n        hash: []const u8,\n        lazy: bool = false,\n    };\n\n    name: enum { APPNAME },\n    version: []const u8,\n    fingerprint: u64,\n    paths: []const []const u8,\n    minimum_zig_version: []const u8,\n    dependencies: struct {\n        ghext: Dependency,\n    },\n} = @import(\"build.zig.zon\");\n```\n\n`main.zig`:\n```zig\nconst build_options = @import(\"build_options\");\nconst VERSION = build_options.version;\n```\n\n## Documentation\n\n[API reference](https://charlesrocket.github.io/ghext/)\n","funding_links":["https://github.com/sponsors/charlesrocket","https://ko-fi.com/charlesrocket","https://www.paypal.me/charlesrocket"],"categories":["Fundamentals"],"sub_categories":["Utility"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesrocket%2Fghext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesrocket%2Fghext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesrocket%2Fghext/lists"}