{"id":17800004,"url":"https://github.com/dskinner/git","last_synced_at":"2025-10-19T16:52:07.080Z","repository":{"id":57693267,"uuid":"42549522","full_name":"dskinner/git","owner":"dskinner","description":"Package git provides an incomplete pure Go implementation of Git core methods.","archived":false,"fork":false,"pushed_at":"2015-09-26T06:43:26.000Z","size":152,"stargazers_count":27,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-27T19:57:34.691Z","etag":null,"topics":["git","go"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dskinner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.bsd","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-15T22:08:45.000Z","updated_at":"2024-05-23T13:43:12.000Z","dependencies_parsed_at":"2022-09-26T21:01:09.587Z","dependency_job_id":null,"html_url":"https://github.com/dskinner/git","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskinner%2Fgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskinner%2Fgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskinner%2Fgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskinner%2Fgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dskinner","download_url":"https://codeload.github.com/dskinner/git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852432,"owners_count":20358267,"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":["git","go"],"created_at":"2024-10-27T12:13:52.158Z","updated_at":"2025-10-19T16:52:02.038Z","avatar_url":"https://github.com/dskinner.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git [![GoDoc](https://godoc.org/dasa.cc/git?status.svg)](https://godoc.org/dasa.cc/git)\n\nPackage git provides an incomplete pure Go implementation of Git core methods.\n\n## Example\n\n### Code:\n\n```go\nstore := git.TempStore()\ndefer os.RemoveAll(string(store))\n\nbuf := new(bytes.Buffer)\n\n// blob\nbdata := []byte(\"hello, world\")\n\nbw := store.Writer()\nbw.WriteHeader(git.Blob, len(bdata))\nbw.Write(bdata)\nbw.Close()\n\nbr, _ := store.Reader(bw.Hash())\nio.Copy(buf, br)\nbr.Close()\n\nbuf.WriteRune('\\n')\n\n// tree\ntdata := []byte(fmt.Sprintf(\"100644 blob %s\\t%s\\n\", bw.Hash(), \"hello.txt\"))\n\ntw := store.Writer()\ntw.WriteHeader(git.Tree, -1)\ntw.Write(tdata)\ntw.Close()\n\ntr, _ := store.Reader(tw.Hash(), git.PrettyReader)\nio.Copy(buf, tr)\ntr.Close()\n\nfmt.Println(strings.Replace(buf.String(), \"\\t\", \" \", -1))\n```\n\n### Output:\n\n```\nhello, world\n100644 blob 8c01d89ae06311834ee4b1fab2f0414d35f01102 hello.txt\n```\n\n## Caveats\n\n* Currently limited to loose objects\n* Reader and Writer for tree objects will likely fail on short reads and large content. Straight-forward to fix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdskinner%2Fgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdskinner%2Fgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdskinner%2Fgit/lists"}