一種Git查詢語言:Gitql
Gitql是一種Git查詢語言。
In a repository path ...
要求
- Go
- cmake
安裝
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.
示例
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
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!