diff --git a/extra/vocabs/git/authors.txt b/extra/vocabs/git/authors.txt new file mode 100644 index 0000000000..f13c9c1e77 --- /dev/null +++ b/extra/vocabs/git/authors.txt @@ -0,0 +1 @@ +Joe Groff diff --git a/extra/vocabs/git/git.factor b/extra/vocabs/git/git.factor new file mode 100644 index 0000000000..eb945b57c7 --- /dev/null +++ b/extra/vocabs/git/git.factor @@ -0,0 +1,28 @@ +! (c)2009 Joe Groff bsd license +USING: fry io io.directories io.encodings.ascii +io.encodings.utf8 io.launcher io.pathnames kernel lexer +namespaces parser sequences splitting vocabs vocabs.loader ; +IN: vocabs.git + + + +ERROR: git-revision-not-found path ; + +: use-vocab-rev ( vocab-name rev -- ) + [ create-vocab vocab-source-path dup ] dip git-object-id + [ [ input-stream get swap parse-stream call( -- ) ] with-git-object-stream ] + [ git-revision-not-found ] if* ; + +SYNTAX: USE-REV: scan scan use-vocab-rev ;