Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djanderson/aho
A git implementation in awk
https://github.com/djanderson/aho
Last synced: 3 months ago
JSON representation
A git implementation in awk
- Host: GitHub
- URL: https://github.com/djanderson/aho
- Owner: djanderson
- License: mit
- Created: 2021-06-11T02:38:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-14T05:06:17.000Z (over 3 years ago)
- Last Synced: 2024-03-20T08:10:26.673Z (10 months ago)
- Language: Awk
- Homepage:
- Size: 1020 KB
- Stars: 776
- Watchers: 10
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-starred - djanderson/aho - A git implementation in awk (Awk)
- my-awesome-github-stars - djanderson/aho - A git implementation in awk (Awk)
README
# Aho
A Git implementation in AWK.
![Terminal session showing aho](aho.gif)
# But why?
Modern AWK is capable of a lot more than one-liners. This is a toy project to
explore some of the internals of Git and newer features of GNU AWK.It's not intended to be useful for anything other than entertainment and
education.# Quickstart
You'll need `gawk` >= 5.0, and I currently use `pigz` for zlib compression.
Everything else should be provided by GNU coreutils. In other words, this
should run on most linuxes, not so much on BSDs/Mac.```bash
$ source ./modpath
$ aho init
Initialized empty Git repository in .aho
$ aho add -v .
add '.gitignore'
add 'LICENSE'
add 'README.md'
add 'aho'
add 'aho.awk'
add 'include/add.awk'
add 'include/branches.awk'
add 'include/config.awk'
[...]
$ echo "neat" > testfile
$ aho add -v .
add 'testfile'
$ tree .aho/
.aho/
├── branches
├── config
├── description
├── HEAD
├── index
├── objects
│ ├── 16
│ │ └── dfbb852d5efb5e1a75ad336c8f62ebb94a82f0
│ ├── 42
│ │ └── 2c6135819b57720ace71e3c6c97eb072b5b430
│ ├── 51
│ │ └── 2807153b4d4abffab8490ce97e5a164fe7de1f
│ ├── 62
│ │ └── 9effea54a58d8734f57d9412a5964f69578477
│ ├── 64
│ │ └── c66bb623af4a10aa3bca2da143c75ab4e2186f
[...]
└── refs
├── heads
└── tags29 directories, 29 files
$ GIT_DIR=.aho git ls-files --stage
100664 d88545d4bb077b2e3fcefbddcf5bae071b426e9f 0 .gitignore
100664 a6ccf43e60c7876e67e3358952c0bf60a2882eef 0 LICENSE
100664 f88631a9692c0b9f9bc2f484c6fc68587bb90770 0 README.md
100775 8657d76021987bc2cd3c2d4c5958fdab053c6326 0 aho
100664 f2aeb629f8513094675557138b3f83dbfa5a4895 0 aho.awk
100664 b1c9cc72d22414a18635d33656dbc216ff774e57 0 include/add.awk
100664 512807153b4d4abffab8490ce97e5a164fe7de1f 0 include/branches.awk
100664 16dfbb852d5efb5e1a75ad336c8f62ebb94a82f0 0 include/config.awk
[...]
```# Contributing
I welcome any input that helps improve my knowledge of AWK or Git!
# TODO:
- [X] init
- [X] add/rm
- [X] status
- [X] commit
- [ ] reset
- [ ] branch
- [ ] switch
- [X] config (read-only)
- [ ] ls-files
- [X] cat-fileI don't plan to add network functionality to this (even though you totally
[can](https://www.gnu.org/software/gawk/manual/gawkinet/gawkinet.html)), so no
_clone_ or _push_.