| Crates.io | gnostr-legit |
| lib.rs | gnostr-legit |
| version | 1895.933117.678085 |
| created_at | 2023-08-16 15:13:53.313156+00 |
| updated_at | 2026-01-20 19:15:37.866982+00 |
| description | add proof of work to a git commit |
| homepage | https://legit.randymcmillan.net/ |
| repository | https://github.com/randymcmillan/legit.git |
| max_upload_size | |
| id | 946047 |
| size | 169,972 |
curl -sSf https://static.rust-lang.org/rustup.sh | sh
cargo install legit
Examplegit log | grep "0000006"
commit 000000615b90566ae8559dd45852190edea79a8c
To create a commit with a subject and a multi-line body, use the -m flag multiple times. The first instance of -m will be the commit subject, and each subsequent instance will be a new line in the commit body.
gnostr legit -m "<subject>" -m "<body_line_1>" -m "<body_line_2>" ...
This is the command used to successfully create a commit:
cargo run --bin gnostr -- legit \
-m "fix(legit): improve error handling and argument parsing" \
-m "Replaced panics with graceful error handling in gnostr-legit." \
-m "Improved directory creation logic to prevent errors." \
-m "Enabled multi-line commit messages with multiple -m flags."
This resulted in the following commit message:
fix(legit): improve error handling and argument parsing
Replaced panics with graceful error handling in gnostr-legit.
Improved directory creation logic to prevent errors.
Enabled multi-line commit messages with multiple -m flags.
The command-line parser currently has a limitation: body lines cannot begin with a hyphen (-). If a line starts with a hyphen, the parser will mistakenly interpret it as a command-line flag and the command will fail.