{"id":30237918,"url":"https://github.com/stainless-api/rerereric","last_synced_at":"2025-08-15T02:57:58.707Z","repository":{"id":284243077,"uuid":"954300484","full_name":"stainless-api/rerereric","owner":"stainless-api","description":"A custom git rerere implementation that allows fuzzy matching on conflict context","archived":false,"fork":false,"pushed_at":"2025-08-08T20:55:01.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-10T00:36:56.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stainless-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-24T21:47:08.000Z","updated_at":"2025-08-08T20:55:05.000Z","dependencies_parsed_at":"2025-03-24T22:41:48.427Z","dependency_job_id":null,"html_url":"https://github.com/stainless-api/rerereric","commit_stats":null,"previous_names":["stainless-api/rerereric"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stainless-api/rerereric","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Frerereric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Frerereric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Frerereric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Frerereric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stainless-api","download_url":"https://codeload.github.com/stainless-api/rerereric/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Frerereric/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270515656,"owners_count":24598440,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-15T02:57:53.955Z","updated_at":"2025-08-15T02:57:58.633Z","avatar_url":"https://github.com/stainless-api.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rerereric\n\nrerereric is inspired by [git rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere). It is a way to cache resolutions to merge conflicts and re-apply those resolutions if they occur again. Unlike `git rerere` it allows fuzzy matching of the context lines surrounding the merge conflicts.\n\nIn particular, for two merge conflict to be considered the same:\n- They do not need to have occurred in the same file\n- They do not need to have occurred on the same line numbers\n- The surrounding context does not need to match exactly; instead, you can use the --context and --similarity arguments to specify how many lines of context to look at and how similar it needs to be (as a fraction, relative to the output of difflib)\n\nIf a merge conflict has multiple matches in the cache, we prioritize by:\n- Looking first at matches with the same filename\n- If there are still multiple, looking at how similar the context is\n- If there are still multiple, looking at how close the line numbers are\n\n## Installation\n\n```sh\n# install from PyPI\npip install https://github.com/stainless-api/rerereric\n```\n\n## Usage\n```\n// save the versions of these files that contain the conflict markers (incl number of lines of non-white space context to save before and after the conflict)\nrerereric mark_conflicts --context=3 file1.ts file2.ts\n\n// [resolve conflicts in these files]\n\n// save the resolutions you applied to a cache (looks at the same files specified in the previous step)\nrerereric save_resolutions --context=2\n\n// [conflict later re-emerges, possibly in files with different names]\n\n// read resolutions from the cache and apply them if they match (using different files is ok)\nrerereric reapply_resolutions file1.ts file3.ts --context=2 --similarity=0.9\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstainless-api%2Frerereric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstainless-api%2Frerereric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstainless-api%2Frerereric/lists"}