Created
October 10, 2017 16:30
-
-
Save azenla/f8cd9addecad4eee43820a390d13fb94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with raw_commit_texts as ( | |
select "hash", encode("content", 'escape') as info from "git.objects" where type = 1 | |
), | |
commits as ( | |
select | |
"hash", | |
(regexp_match("info", 'tree ([^\s]+)'))[1] as tree, | |
(regexp_match("info", 'parent ([^\s]+)'))[1] as parent, | |
(regexp_match("info", 'author ([^\n]+)'))[1] as author, | |
(regexp_match("info", 'committer ([^\n]+)'))[1] as committer, | |
(regexp_match("info", '\n\n(.*)'))[1] as message | |
from raw_commit_texts | |
) | |
select * from commits limit 50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment