Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update simple.js with log command

  • Loading branch information...
commit 276566414be095ae693aadbf6d2318a8856efe25 1 parent 93bf3bb
@tblobaum authored
Showing with 29 additions and 9 deletions.
  1. +29 −9 example/simple.js
View
38 example/simple.js
@@ -1,17 +1,37 @@
-var revision = require('../')
+var git = require('../')
-revision.short(function (str) {
- console.log('revision short', str)
+git.short(function (str) {
+ console.log('short', str)
+ // => aefdd94
})
-revision.long(function (str) {
- console.log('revision long', str)
+git.long(function (str) {
+ console.log('long', str)
+ // => aefdd946ea65c88f8aa003e46474d57ed5b291d1
})
-revision.branch(function (str) {
- console.log('revision branch', str)
+git.branch(function (str) {
+ console.log('branch', str)
+ // => master
})
-revision.tag(function (str) {
- console.log('revision tag', str)
+git.tag(function (str) {
+ console.log('tag', str)
+ // => 0.1.0
+})
+
+git.log(function (array) {
+ console.log('log', array)
+ // [ [ 'aefdd946ea65c88f8aa003e46474d57ed5b291d1',
+ // 'add description',
+ // '7 hours ago',
+ // 'Thomas Blobaum' ],
+ // [ '1eb9a6c8633a5a47a47487f17b17ae545d0e26a8',
+ // 'first',
+ // '7 hours ago',
+ // 'Thomas Blobaum' ],
+ // [ '7f85b750b908d28bfeb13ad6dba47d9d604508f9',
+ // 'first commit',
+ // '2 days ago',
+ // 'Thomas Blobaum' ] ]
})
Please sign in to comment.
Something went wrong with that request. Please try again.