{"id":13586803,"url":"https://github.com/xorhash/fh","last_synced_at":"2025-04-07T18:34:56.368Z","repository":{"id":201332013,"uuid":"182303123","full_name":"xorhash/fh","owner":"xorhash","description":"file history with ed(1), diff(1), awk(1), sed(1) and sh(1)","archived":false,"fork":false,"pushed_at":"2020-06-21T08:48:25.000Z","size":8,"stargazers_count":108,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-06T05:40:32.751Z","etag":null,"topics":["unix"],"latest_commit_sha":null,"homepage":null,"language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xorhash.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-04-19T17:41:06.000Z","updated_at":"2024-10-30T01:20:36.000Z","dependencies_parsed_at":"2023-10-19T20:28:48.157Z","dependency_job_id":null,"html_url":"https://github.com/xorhash/fh","commit_stats":null,"previous_names":["xorhash/fh"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorhash%2Ffh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorhash%2Ffh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorhash%2Ffh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorhash%2Ffh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xorhash","download_url":"https://codeload.github.com/xorhash/fh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247707819,"owners_count":20982855,"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":["unix"],"created_at":"2024-08-01T15:05:49.433Z","updated_at":"2025-04-07T18:34:56.097Z","avatar_url":"https://github.com/xorhash.png","language":"Roff","funding_links":[],"categories":["Roff"],"sub_categories":[],"readme":"# fh: file history\n\n**fh** records changes to a file on a per-file basis,\nsimilar to [RCS](https://en.wikipedia.org/wiki/Revision_Control_System) and\n[SCCS](https://en.wikipedia.org/wiki/Source_Code_Control_System).\nIt is, however, considerably more primitive.\n\nDesign goals:\n\n- no support for multi-user environments (no locking, etc.)\n- implemented in shell script\n- must use ed(1)\n- should work or easily be made to work on 7th Edition UNIX\n\nI've taken care not to use any shell scripting constructions that didn't\nexist in the Bourne shell, but I may have missed things;\nhowever, the shebang needs to be removed on 7th Edition UNIX.\n\n**fh** uses a chain of ed(1) scripts to construct any version of a file.\nIt even allows recording of commit messages.\n\n## Why?\n\nI saw the following passage in [diff(1) of 7th Edition UNIX](https://man.openbsd.org/UNIX-7/diff.1):\n\n\u003e The **-e** option produces a script of *a*, *c* and *d* commands for the editor *ed*, which will recreate *file2* from *file1*. The **-f** option produces a similar script, not useful with *ed*, in the opposite order. In connection with **-e**, the following shell program may help maintain multiple versions of a file. Only an ancestral file ($1) and a chain of version-to-version *ed* scripts ($2,$3,...) made by *diff* need be on hand. A `latest version' appears on the standard output.\n\u003e\n\u003e     (shift; cat $*; echo ´1,$p´) ⎪ ed - $1\n\nAfter some thinking, I figured it would be hilarious to actually implement a basic version control system on these primitives.\nIn hindsight, it's probably closer to terrifying than hilarious.\n\n## License\n\nISC, see LICENSE.\n\n## Installation and usage\n\nCopy the `fl`, `fr` and `fu` files to a directory in `$PATH`;\nmake sure they are marked as executable.\nCopy the man pages `fl.1`, `fr.1`, `fu.1` and `fh.5` to a directory in `$MANPATH`.\n\nFor usage, see the supplied man pages.\n[man.md](man.md) is available on the web.\nFor 7th Edition UNIX, the man pages written in mdoc macrosneed to be converted to old man macros first:\n\n    mkdir man\n    mandoc -Tman fl.1 \u003e man/fl.1\n    mandoc -Tman fr.1 \u003e man/fr.1\n    mandoc -Tman fu.1 \u003e man/fu.1\n    mandoc -Tman fh.5 \u003e man/fh.5\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorhash%2Ffh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxorhash%2Ffh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorhash%2Ffh/lists"}