Gitql is a Git query language.
In a repository path...
See more here
- Go
- cmake
- pkg-config
We support static compiling for linux and windows platform (amd64), so you can access the releases page and just grab the binary. If you want to compile itself follow the instructions below:
Read the dockerfile to understand the whole process.
We do not support yet static compiling. You need to have pkg-config as dependencies, so after install that, run
# Inside this repository folder
export PKG_CONFIG_PATH=${PWD}/libgit2/install/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(PWD)/libgit2/install/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(PWD)/libgit2/install/lib
make build-dynamicYou need a C compiler, Cmake and Ninja installed. Using chocolately it should be easy
choco install cmake ninja vcredist2017
set PATH=%HOMEDRIVE%\mingw64\bin;%PATH%
make buildYou can always take a look in our github actions file to understand how we build it in the ci server. If even after try the binaries or either compile yourself you couldn't use that. Open an issue.
gitql "your query"
or
git ql "your query"
As an example, this is the commits table:
| commits |
|---|
| author |
| author_email |
| committer |
| committer_email |
| hash |
| date |
| message |
| full_message |
(see more tables here)
select hash, author, message from commits limit 3select hash, message from commits where 'hell' in full_message or 'Fuck' in full_messageselect hash, message, author_email from commits where author = 'cloudson'select date, message from commits where date < '2014-04-10'select message from commits where 'hell' in message order by date asc
gitql or open an issue
Notes:
- Gitql doesn't want to kill
git log- it was created just for science! ๐ - It's read-only - no deleting, inserting, or updating tables or commits. ๐
- The default limit is 10 rows.
- It's inspired by textql.
- Gitql is a compiler/interpreter instead of just read a sqlite database with all commits, tags, etc. because we would need to sync the tables every time before run sql and we would have sqlite bases for each repository. ๐