{"id":23160653,"url":"https://github.com/disruptek/gittyup","last_synced_at":"2025-08-18T02:31:49.129Z","repository":{"id":42523599,"uuid":"230820184","full_name":"disruptek/gittyup","owner":"disruptek","description":"higher-level libgit2 bindings that build upon nimgit2","archived":false,"fork":false,"pushed_at":"2023-11-06T18:05:56.000Z","size":284,"stargazers_count":21,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T04:32:43.679Z","etag":null,"topics":["api","git","libgit2","library","nim","nimgit2","nimterop","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/disruptek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-12-30T00:28:24.000Z","updated_at":"2024-02-21T10:48:18.000Z","dependencies_parsed_at":"2023-11-07T01:19:32.370Z","dependency_job_id":null,"html_url":"https://github.com/disruptek/gittyup","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgittyup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgittyup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgittyup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disruptek%2Fgittyup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disruptek","download_url":"https://codeload.github.com/disruptek/gittyup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230193151,"owners_count":18187963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api","git","libgit2","library","nim","nimgit2","nimterop","wrapper"],"created_at":"2024-12-17T23:11:35.548Z","updated_at":"2024-12-17T23:11:36.470Z","avatar_url":"https://github.com/disruptek.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gittyup\n\n[![Test Matrix](https://github.com/disruptek/gittyup/workflows/CI/badge.svg)](https://github.com/disruptek/gittyup/actions?query=workflow%3ACI)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/disruptek/gittyup?style=flat)](https://github.com/disruptek/gittyup/releases/latest)\n![Minimum supported Nim version](https://img.shields.io/badge/nim-1.2.13%2B-informational?style=flat\u0026logo=nim)\n[![License](https://img.shields.io/github/license/disruptek/gittyup?style=flat)](#license)\n\nThis is a _higher_-level and idiomatic abstraction for\n[libgit2](https://libgit2.org/) that builds upon the\n[hlibgit2](https://github.com/haxscramper/hlibgit2) and\n[hlibssh2](https://github.com/haxscramper/hlibssh2) wrappers; the user supplies\nthe underlying libgit2 and libssh2 libraries in the environment.\n\n## Usage\n\nWe test with `libgit2-1.7.1` though earlier versions may work.\n\nThis gives some idea for the usage:\n\n```nim\nimport logging\nimport gittyup\nimport uri\n\n# a simple example of cloning a repo\nblock cloning:\n  let\n    url = parseURI\"https://github.com/disruptek/gittyup\"\n    dir = \"/some/where/gitty\"\n\n  # perform a clone; repo is a GitRepository object\n  repo := clone(url, dir):\n    # this is your error handler;\n    # code is an enum of GitResultCode\n    case code:\n    of GIT_EEXISTS:\n      error dir, \" already exists, i guess\"\n    of GIT_ENOTFOUND:\n      error url, \" isn't a git url, maybe\"\n    else:\n      # an error string more specific than $code\n      error code.dumpError\n\n    # you don't have to leave, but i recommend it\n    break\n\n  # repo is symbol pointing to a GitRepository here\n\n  # \"manual\" call invocation means you perform your\n  # own memory work, but it's sometimes more ideal\n  let\n    head = repo.headReference\n\n  # using result semantics...\n  if head.isErr:\n    echo \"error code: \", head.error\n  else:\n    echo \"head oid: \", head.get.oid\n\n# repo is now out of scope and will be freed automatically\n```\n\n## Installation\n\n```\n$ nimph clone gittyup\n```\nor if you're still using Nimble like it's 2012,\n```\n$ nimble install https://github.com/disruptek/gittyup\n```\n\n## Documentation\n\nSee [the documentation for the gittyup module](https://disruptek.github.io/gittyup/gittyup.html) as generated directly from the source.  I often find\n[the libgit2 reference documentation site](https://libgit2.org/) useful\nas well.\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisruptek%2Fgittyup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisruptek%2Fgittyup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisruptek%2Fgittyup/lists"}