Jay Taylor's notes
back to listing indexcloudson/gitql
[web search]
Original source (github.com)
Clipped on: 2016-12-14
Skip to content
A git query language
Go
lexical | Go fmt | 3 years ago | |
parser | Go fmt | 3 years ago | |
runtime | Resolve some conflicts | 3 years ago | |
semantical | Wrapper Visitor interface | 3 years ago | |
.gitignore | Update git ignore file | 3 years ago | |
.travis.yml | Fix travis | 3 years ago | |
LICENSE | Add license | 3 years ago | |
Makefile | Fix travis, fixes #12 | 3 years ago | |
README.md | Fix readme about old error with ordering | 3 years ago | |
cmd.go | Prepare to new release | 3 years ago | |
gitql.go | Fix error handling | 3 years ago | |
howtouse.gif | Update howtogif again | 3 years ago | |
tables.md | Improve readme.md | 3 years ago |
README.md
Gitql
Gitql is a Git query language.
In a repository path ...
See more here
Requirements
- Go
- cmake
Install
go get -u -d github.com/cloudson/gitql
cd $GOPATH/src/github.com/cloudson/gitql
make
sudo make install
export LD_LIBRARY_PATH=$PWD/libgit2/install/lib
on linux orexport DYLD_LIBRARY_PATH=$PWD/libgit2/install/lib
on Mac OS.
Examples
gitql "your query"
or
git ql "your query"
Look the table of commits:
commits |
---|
author |
author_email |
committer |
committer_email |
hash |
date |
message |
full_message |
(see more tables here)
You can do:
select hash, author, message from commits limit 3
select hash, message from commits where 'hell' in full_message or 'Fuck' in full_message
select 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
Questions?
gitql -h
or open an issue
Notes:
- Gitql doesn't want kill
git log
😅 . It was created just for science!! - It's read-only. Nothing about delete, insert or update commits 😝
- The limit default is 10 rows
- It's inspired by textql
- But, why gitql is a compiler/interpreter instead of just read a sqlite database with all commits, tags and etc? Answer: Because we would need to sync the tables everytime before run sql and we would have sqlite bases for each repository. 😐