Created
October 19, 2016 10:39
-
-
Save ccapndave/eb696a5c931d19ac9842a6c0ff235859 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const shaHistory$ = O.create(o => { | |
const getNext = () => { | |
revwalk.next() | |
.then(value => { | |
if (value) { | |
o.onNext(value); | |
getNext(); | |
} else { | |
o.onCompleted(); | |
} | |
}) | |
.catch(err => { | |
if (err.errno !== Git.Error.CODE.ITEROVER) { | |
o.onError(err); | |
} else { | |
o.onCompleted(); | |
} | |
}); | |
}; | |
getNext(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment