{"id":14008220,"url":"https://github.com/octavore/delta","last_synced_at":"2025-04-12T23:13:29.099Z","repository":{"id":57484774,"uuid":"43323903","full_name":"octavore/delta","owner":"octavore","description":"Delta is a command-line diff tool implemented in Go.","archived":false,"fork":false,"pushed_at":"2016-09-20T07:23:49.000Z","size":737,"stargazers_count":186,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T23:13:24.628Z","etag":null,"topics":["cli","diff","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/octavore.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}},"created_at":"2015-09-28T20:02:04.000Z","updated_at":"2025-03-22T16:49:20.000Z","dependencies_parsed_at":"2022-08-26T11:10:26.788Z","dependency_job_id":null,"html_url":"https://github.com/octavore/delta","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octavore%2Fdelta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octavore%2Fdelta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octavore%2Fdelta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octavore%2Fdelta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octavore","download_url":"https://codeload.github.com/octavore/delta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643006,"owners_count":21138355,"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":["cli","diff","golang"],"created_at":"2024-08-10T11:01:25.900Z","updated_at":"2025-04-12T23:13:29.078Z","avatar_url":"https://github.com/octavore.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Delta\n\nDelta is both a Go library and a command-line utility for text diffs. Diffs\ncan be displayed in the browser, or in command-line using the `--cli` flag.\n\n## Installation\n\n    brew install octavore/tools/delta\n\n## Description\n\nDelta implements two diff functions: Smith-Waterman, and histogram diff.\n\n[Smith-Waterman](https://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm)\nis a dynamic programming algorithm for aligning two sequences, in this case text\nsequences. It originates from bioinformatics, where it is used for aligning DNA sequences.\n\n[histogram diff](http://download.eclipse.org/jgit/docs/jgit-2.0.0.201206130900-r/apidocs/org/eclipse/jgit/diff/HistogramDiff.html)\nis a diff algorithm first implemented in `JGit` and subsequently ported over\nto `git`, where it can be used with the `git diff --histogram` command. This\nimplementation post processes the histogram diff in order to push down match\nregions as far as possible. `git` also post processes diffs.\n\n## Other Usage\n\n```\ndelta --cli \u003cfileA\u003e \u003cfileB\u003e         # print text diff to stdout\ndelta --cli --html \u003cfileA\u003e \u003cfileB\u003e  # print html diff to stdout\ndelta --gist \u003cfileA\u003e \u003cfileB\u003e        # upload html diff to a gist\n```\n\n## Configure Git\n\nThe `delta` binary must be on your `$PATH` in order for this work. The\nfollowing are helpers for adding `delta` to your `~/.gitconfig` file.\n\n    delta --install   # makes delta the default for `git difftool`\n    delta --uninstall # remove delta from your gitconfig\n\n## User Config\n\nYou can configure `delta` using a `~/.deltarc` file, for example:\n\n```\n{\n  \"context\": 9,\n  \"showEmpty\": true,\n  \"shouldCollapse\": false,\n  \"highlight\": true,\n  \"unmodifiedOpacity\": 0.8,\n  \"diffFontSize\": 12\n}\n```\n\n### Options\n\nconfig key          | key type  | description\n------------------- | --------- | ------------------------------------------\n`context`           | `integer` | between 0 and 4 number of lines of context to show\n`showEmpty`         | `bool`    | whether to hide empty lines\n`shouldCollapse`    | `bool`    | whether to merge browser tabs\n`highlight`         | `bool`    | toggles syntax highlighting\n`unmodifiedOpacity` | `float`   | opacity of unmodified lines, between 0.1 and 1\n`diffFontSize`      | `integer` | font size of the diff\n\n## Browser Support\n\n![Screenshot](https://raw.github.com/octavore/delta/master/screenshot.jpg)\n\nDelta works best in Chrome and Safari. You will see a separate tab open for\neach diff file, and then the tabs will consolidate into a single tab. In\nFirefox, each diff will remain in separate tabs. This is because in Firefox,\neach file receives its own IndexedDB instance, instead of a shared instance.\n\nBrowser support relies on the following open source libraries:\n\n- [Mithril](http://mithril.js.org/)\n- [highlight.js](https://highlightjs.org/)\n- [Mousetrap](https://craig.is/killing/mice)\n- [PouchDB](http://pouchdb.com/)\n\n## Development\n\n### Compiling From Source\n\n    go get github.com/octavore/delta/delta\n\nIf `$GOPATH/bin` is on your `$PATH`, run `delta -h` for usage.\n\n### Regenerating Assets\n\nYou will need `npm` to install the necessary node packages for compiling the\nfront-end assets.\n\n[go-bindata](https://github.com/jteeuwen/go-bindata) is used to generate the\n`bindata.go`, which allows us to embed static resources into the compiled\nbinary.\n\n## TODO\n\n- make differ/histogram diff functions more consistent and add an interface.\n- more comments for godoc/golint.\n- fix race condition in update\n- favicon\n- make sidebar resizable\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctavore%2Fdelta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctavore%2Fdelta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctavore%2Fdelta/lists"}