一种 git 查询语言
Gitql
===============Gitql 是一种 Git 查询语言。
在仓库路径中……
了解更多请点击这里
⚠️ Gitql 是我的第一个 golang 项目。如果你是一名初学者,希望参考这个项目来学习(如何组织代码或编写地道的 Go 代码),我推荐你使用 polyglot。
你可以访问 releases 页面直接下载二进制文件。如果你想自己编译,只需运行 go build .。
gitql "your query"
或者
git ql "your query"
举个例子,这是 commits 表:
| commits |
|---|
| author |
| author_email |
| committer |
| committer_email |
| hash |
| date |
| message |
| full_message |
(更多表格请见这里)
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 ascselect distinct author from commits where date < '2020-01-01'gitql 或提交一个 issue
备注:
git log——它只是出于科学探索而诞生的!:sweat_smile:暂无开放 Issues,或尚未同步最近议题。