Class: Treeish

Class Name Treeish
Superclass Object
File src/models/treeish.coffee

Description

This class is the base class to allow easy access to relevant actions upon any kind of oid object in git.

::constructor(ref, repo)

Constructs a new instance of Treeish.

Argument Description
ref The object ref as String.
repo The repository as PromisedGit.
Return Values
Returns a new instance of Treeish.
::checkout(options)

Checkout the Treeish in git.

Argument Description
options The options as plain Object.
Return Values
Returns a Promise.
::diff(options)

Get the Diff this Treeish introduced.

Argument Description
options The options as plain Object.
Return Values
Returns a Promise that resolves to an instance of Diff.
::diffTo(oid, options)

Get the diff to another Treeish.

Argument Description
oid The oid to diff against as String | Treeish.
options The options as plain Object.
Return Values
Returns a Promise that resolves to an instance of Diff.
::diffFrom(oid, options)

Get the diff from another Treeish.

Argument Description
oid The oid to diff against as String | Treeish.
options The options as plain Object.
Return Values
Returns a Promise that resolves to an instance of Diff.
::showFile(file)

Get the content of a file at this Treeish.

Argument Description
file The file as String.
Return Values
Returns a Promise that resolves to a String with the content of file at this treeish.
::reset(mode)

Reset the current branch to this Treeish.

Argument Description
mode The git-reset mode to use as String.
Return Values
Returns a Promise.