git-index
Version, currently 1.0.22 versions
- 1.0.3latestMar 8, 2021
- 1.0.2not indexedJul 17, 2021
github.com/wyhaines/git-index.cr
This tool makes a local database of git repositories, indexed by initial commit hashes.
Nothing has been indexed for 1.0.2 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
git-index:
github: wyhaines/git-index.cr
version: ~> 1.0.2Then run:
shards installshard.yml
No shard.yml has been indexed for 1.0.2. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
git-index
This tool takes a list of paths and checks them for git repositories. It writes to a sqlite database a table of repositories found, indexed by both the first and the second commit hashes on the repository. The rationale is that these first couple of commits are unlikely to ever change as the result of a rebase, and thus make a fairly reliable fingerprint of the identity of the repository. The motivation behind this tool is for use with Serf and the serf-hander gem or the serf-handler.cr crystal implementation to power a slick, simple deployment manger utizing a git repo and deploy hooks at the underlying source and trigger.
Building It
If you have crystal installed on your system, you can build the binary for git-index with:
shards build -p -s -t --release
If you want to build a statically linked binary (which is better for distribution to other systems):
shards build -p -s -t --release --static
In either case, the compiled binary will be found as bin/git-index.
Usage
git-index /gluster/htdocs/site.doc.com
Add the given directory to the index.
git-index -l
List all of the indexed hashes and their directories
git-index -q d950c4bbe672fe02e36009d71d88ef4ab754fa91
Perform a lookup in the index to see if that has code matches a known repository, and returns the matches, one per line.
git-index -h
See all options.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.2- Tagged
- Jul 17, 2021
- Commit
7a3cc6851c21- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/wyhaines/git-index.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 2